Skip to content

[5.3] Fix the selector in login tests when running on https#44837

Merged
laoneo merged 2 commits intojoomla:5.3-devfrom
brianteeman:apitest
Feb 7, 2025
Merged

[5.3] Fix the selector in login tests when running on https#44837
laoneo merged 2 commits intojoomla:5.3-devfrom
brianteeman:apitest

Conversation

@brianteeman
Copy link
Contributor

@brianteeman brianteeman commented Feb 7, 2025

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

Testing Instructions

run the cypress tests with https

 npx cypress run --spec '.\tests\System\integration\api\com_users\Users.cy.js'
 npx cypress run --spec '.\tests\System\integration\site\components\com_users\Login.cy.js'
 npx cypress run --spec '.\tests\System\integration\site\modules\mod_login\Default.cy.js' 

Actual result BEFORE applying this Pull Request

tests fail with error message
CypressError: cy.click()can only be called on a single element. Your subject contained 2 elements. Pass{ multiple: true } if you want to serially click each element.

Expected result AFTER applying this Pull Request

tests complete successfully

Note

This does not resolve the fact that the cypress tests should be running under https otherwise they are incomplete or risky tests

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

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 <brian@teeman.net>
@brianteeman brianteeman changed the base branch from 5.2-dev to 5.3-dev February 7, 2025 12:25
@brianteeman brianteeman changed the title [5.2] cypress login tests [5.3] cypress login tests Feb 7, 2025
@laoneo laoneo added this to the Joomla! 5.3.0 milestone Feb 7, 2025
@laoneo
Copy link
Member

laoneo commented Feb 7, 2025

Thanks. As soon as we are green here, it will be merged. Despite the fix, you discovered a bigger issue and we should change our tests to https, as in #44835, as this is nowadays the standard.

@laoneo laoneo enabled auto-merge (squash) February 7, 2025 12:41
@laoneo laoneo removed the PR-5.2-dev label Feb 7, 2025
@laoneo laoneo changed the title [5.3] cypress login tests [5.3] Fix the selector in login tests when running on https Feb 7, 2025
@laoneo laoneo merged commit b43bb20 into joomla:5.3-dev Feb 7, 2025
3 checks passed
@brianteeman
Copy link
Contributor Author

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants