Skip to content

Commit

Permalink
refactor(smoke): use env variables (#6866)
Browse files Browse the repository at this point in the history
  • Loading branch information
anshbansal authored Dec 29, 2022
1 parent 122c024 commit 1d0bb1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions smoke-test/tests/cypress/cypress/integration/login/login.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
describe('login', () => {
it('logs in', () => {
cy.visit('/');
cy.get('input[data-testid=username]').type('datahub');
cy.get('input[data-testid=password]').type('datahub');
cy.get('input[data-testid=username]').type(Cypress.env('ADMIN_USERNAME'));
cy.get('input[data-testid=password]').type(Cypress.env('ADMIN_PASSWORD'));
cy.contains('Sign In').click();
cy.contains('Welcome back, DataHub');
});
Expand Down
2 changes: 1 addition & 1 deletion smoke-test/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def get_frontend_session():


def get_admin_username() -> str:
return os.getenv("ADMIN_USERNAME", "datahub")
return get_admin_credentials()[0]


def get_admin_credentials():
Expand Down

0 comments on commit 1d0bb1c

Please sign in to comment.