Review main Merged

97032[TASK] Wait for processed JavaScript modules in e2e tests

Oli Bartsch CR +2 V +2 Hard +277 −106 updated 10/24/26, 05:57

Commit message

The "typo3-module-loaded" event is dispatched with the load event of
the content frame. JavaScript modules invoked with instructions are
imported dynamically by the JavaScript item handler and may still be
pending at that point. Tests interacting with the module right away
could therefore lose clicks, as the event handlers were not attached
yet, e.g. for the context menu or tabs.

The item handler now registers the items it processes, and the new
internal function "whenItemsProcessed()" of
"@typo3/core/java-script-item-processor" resolves once the document
is loaded and all of them have been processed. "processItems()"
returns a promise for that purpose; failing items are still reported.

The Playwright fixtures wait for it after each module load, using one
shared helper instead of two copies. Selecting a page in the page
tree now waits for the module to be loaded as well, so a waiter
installed afterwards no longer resolves on the load event of the
previous module. Specs selecting the root node use the new
"openRoot()" of the page tree fixture instead of clicking it without
waiting.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
  • Verified V +2 Done
    • Georg Ringer +2
    • core-ci +1 CI

Issues 1

Files 13

Review log 68

  1. Oli Bartsch uploaded patch set 1 10/22/26, 19:56

  2. core-ci voted on patch set 1 V +1 10/22/26, 20:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112182

  3. Oliver Klee voted on patch set 1 V +1 10/22/26, 20:09

  4. Benni Mack voted on patch set 1 CR +1 V +1 10/23/26, 07:02

  5. Oli Bartsch rebased onto patch set 2 CR +1 V +1 10/24/26, 05:42

  6. core-ci voted on patch set 2 V +1 10/24/26, 05:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112391

  7. Georg Ringer voted on patch set 2 CR +2 V +2 10/24/26, 05:57

  8. Georg Ringer merged patch set 3 10/24/26, 05:57