Skip to content

Commit b43bb20

Browse files
authored
[5.2] cypress login tests (#44837)
None of the login tests were working as they had only been tested on http When tested in a real work with https the webauthn plugin is also present and the tests all failed This PR updates the cypress get identifier to more accurately target the login button Signed-off-by: BrianTeeman <[email protected]>
1 parent fc25444 commit b43bb20

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/System/integration/api/com_users/Users.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ describe('Test that users API endpoint', () => {
8181
cy.get('#username').type('test');
8282
cy.get('#password').type('test');
8383
cy.get('#remember').check();
84-
cy.get('.controls > .btn').click();
84+
cy.get('.controls > button[type="submit"].btn').click();
8585
cy.visit('/index.php?option=com_users&view=login');
8686
cy.get('.com-users-logout').should('contain.text', 'Log out');
8787
});

tests/System/integration/site/components/com_users/Login.cy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ describe('Test in frontend that the users login view', () => {
66
cy.get('#username').type('test');
77
cy.get('#password').type('test');
88
cy.get('#remember').check();
9-
cy.get('.controls > .btn').click();
9+
cy.get('.controls > button[type="submit"].btn').click();
1010
cy.visit('/index.php?option=com_users&view=login');
1111

1212
cy.get('.com-users-logout').should('contain.text', 'Log out');
@@ -22,7 +22,7 @@ describe('Test in frontend that the users login view', () => {
2222
cy.get('#username').type('test');
2323
cy.get('#password').type('test');
2424
cy.get('#remember').check();
25-
cy.get('.controls > .btn').click();
25+
cy.get('.controls > button[type="submit"].btn').click();
2626
cy.get('a:contains(Automated test login)').click();
2727

2828
cy.get('.com-users-logout').should('contain.text', 'Log out');

tests/System/integration/site/modules/mod_login/Default.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('Test in frontend that the login module', () => {
1515
cy.get('#modlgn-username-16').type('test');
1616
cy.get('#modlgn-passwd-16').type('test');
1717
cy.get('input[name="remember"]').check();
18-
cy.get('.mod-login__submit > .btn').click();
18+
cy.get('button[name="Submit"]').click();
1919

2020
cy.get('.mod-login-logout').should('contain.text', 'Hi automated test user');
2121
});

0 commit comments

Comments
 (0)