Skip to content

Commit 4630a16

Browse files
gyaneshgouraw-oktadependabot[bot]developerkunal
authored
fix/cypress (#857)
## 📝 Pull Request Description ### 🔄 Changes - The selectors in the `loginToAuth0` function were updated to correctly target Auth0 input fields. - The username and password fields are now selected using their IDs, `#username` and `#password`, respectively. - The submit button is now selected using `button[type="submit"][name="action"]` and a case-insensitive check for the text "continue". ### 🧪 Testing - The updated login functionality was tested. - Cypress end-to-end tests were used to verify successful login using the updated selectors. - All tests passed after the changes were implemented. ### 💥 Impact - This change fixes a bug in the login functionality. - The system's login process is now more robust and reliable. - There is no performance impact. ### 📋 Checklist - [ ] Code follows the project's coding standards - [ ] Tests have been added/updated - [ ] Documentation has been updated - [ ] All tests are passing --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kunal Dawar <[email protected]>
1 parent 9a10c78 commit 4630a16

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

__tests__/auth-provider.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ describe('Auth0Provider', () => {
423423
await waitFor(() => {
424424
expect(result.current.logout).toBeInstanceOf(Function);
425425
});
426-
act(() => {
426+
await act(() => {
427427
result.current.logout();
428428
});
429429
expect(clientMock.logout).toHaveBeenCalled();

cypress/e2e/smoke.cy.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ if (!EMAIL || !PASSWORD) {
88
}
99

1010
const loginToAuth0 = (): void => {
11-
cy.get('.auth0-lock-input-username .auth0-lock-input').clear().type(EMAIL);
12-
cy.get('.auth0-lock-input-password .auth0-lock-input').clear().type(PASSWORD);
13-
cy.get('.auth0-lock-submit').click();
11+
cy.get('#username').clear().type(EMAIL);
12+
cy.get('#password').clear().type(PASSWORD);
13+
cy.get('button[type="submit"][name="action"]').contains(/^continue$/i).click({ force: true });
1414
};
1515

1616
describe('Smoke tests', () => {

package-lock.json

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)