User tests: Successful: Unsuccessful:
Pull Request resolves # .
The test can patch a users access level and check the rules in tests/System/integration/api/com_users/Levels.cy.js had two branches for the rules attribute. The string branch compared a string with an array (expect(normalized).to.eq([1, 2])), so it could never pass if it was ever reached.
The API returns rules as an array (checked locally: Array.isArray(rules) === true, value [1, 2]), so only the array branch is used. This PR replaces both branches with one assertion: .should('deep.equal', [1, 2]).
npx cypress run --spec 'tests/System/integration/install/Installation.cy.js,tests/System/integration/api/com_users/Levels.cy.js'
The test passes, but contains an unreachable branch that would always fail.
The test passes with one direct assertion.
Tested locally in the joomlaprojects/docker-images:cypress8.5 image (PHP 8.5) with MySQL 8.4 and Chrome.
Please select:
Documentation link for guide.joomla.org:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | JavaScript Unit Tests |
I have not tested this item.
I have not tested this item.
I have tested this item ✅ successfully on f903b30
I have tested this item ✅ successfully on f903b30
I have tested this item ✅ successfully on f903b30
I have tested this item ✅ successfully on f903b30
| Status | Pending | ⇒ | Ready to Commit |
RTC
RTC
I have not tested this item.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48783.