Pending

User tests: Successful: Unsuccessful:

avatar mxschmitt
mxschmitt
5 Nov 2026

Pull Request resolves # .

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

deleteInsertedItems() in tests/System/plugins/db.mjs cleans up the rows created by cy.db_* commands after each test. For users, articles and modules it also deletes from dependent tables (#__user_usergroup_map, #__user_profiles, #__session, #__content_frontpage, #__contentitem_tag_map, #__workflow_associations, #__modules_menu).

Those dependent DELETEs were pushed into the promises array from inside a .then() callback, i.e. after Promise.all(promises) had already been called on it. So the cleanupDB task resolved before they finished and any error in them was lost. The next test could start while the cleanup was still running.

This PR:

  • collects the dependent DELETEs per item and returns Promise.all() of them from the .then(), so the cleanup task only resolves when everything is deleted.
  • rejects on every MySQL/MariaDB error. Before, if (error && error.errno) resolved with undefined for errors without an errno, which hid them. The PostgreSQL branch already rejects on every error.

No test files are changed.

Testing Instructions

Run the System Tests, e.g. the specs which create users, articles and modules:

npx cypress run --spec 'tests/System/integration/install/Installation.cy.js,tests/System/integration/administrator/components/com_users/Users.cy.js,tests/System/integration/administrator/components/com_content/Article.cy.js,tests/System/integration/administrator/components/com_modules/Module.cy.js'

or the complete suite. Code review: compare the old and new deleteInsertedItems().

Actual result BEFORE applying this Pull Request

The cleanup of dependent tables runs after the cleanupDB task has already resolved. MySQL errors without errno are silently ignored.

Expected result AFTER applying this Pull Request

All tests pass. The cleanupDB task waits for all DELETE queries, and DB errors fail the test.

Tested locally in the joomlaprojects/docker-images:cypress8.5 image (PHP 8.5) with MySQL 8.4 and Chrome: complete suite with all specs (169 incl. the re-enabled smart search spec): 726 passed, 2 skipped, 1 failed. The failure is plugins/system/webauthn/WebauthnPlugin.cy.js, because plugins/system/webauthn/fido.jwt could not be downloaded in my local container (CI provides it as artifact). It is unrelated to this change.

Link to documentations

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

avatar mxschmitt mxschmitt - open - 5 Nov 2026
avatar mxschmitt mxschmitt - change - 5 Nov 2026
Status New ⇒ Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Nov 2026
Category ⇒ JavaScript Unit Tests
avatar mxschmitt mxschmitt - change - 5 Nov 2026
The description was changed
avatar mxschmitt mxschmitt - edited - 5 Nov 2026
avatar tecpromotion tecpromotion - test_item - 8 Nov 2026 - Tested successfully
avatar tecpromotion
tecpromotion - comment - 8 Nov 2026

I have tested this item ✅ successfully on 724885e


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48781.

avatar tecpromotion
tecpromotion - comment - 8 Nov 2026

I have tested this item ✅ successfully on 724885e


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48781.

avatar laoneo laoneo - test_item - 9 Nov 2026 - Tested successfully
avatar laoneo
laoneo - comment - 9 Nov 2026

I have tested this item ✅ successfully on 724885e


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48781.

avatar laoneo
laoneo - comment - 9 Nov 2026

I have tested this item ✅ successfully on 724885e


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48781.

avatar alikon alikon - change - 9 Nov 2026
The description was changed
avatar alikon
alikon - comment - 9 Nov 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48781.

avatar alikon
alikon - comment - 9 Nov 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48781.

avatar alikon
alikon - comment - 9 Nov 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48781.

avatar alikon alikon - change - 9 Nov 2026
Status Pending ⇒ Ready to Commit
avatar alikon
alikon - comment - 9 Nov 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48781.

avatar alikon
alikon - comment - 9 Nov 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48781.

Add a Comment

Login with GitHub to post a comment