Review 14.3 Merged

93920[BUGFIX] Stabilize Playwright module-loaded waiter

Christian Kuhn CR +2 V +2 Normal +96 −53 updated 05/02/26, 21:57

Commit message

Waiting for backend modules to finish loading has been a
recurring source of test flakes since the Codeception era.
The patch hopes to put it to rest for Playwright.

The fixture methods `FormEngine->formEngineLoaded()` and
`BackendPage->moduleLoaded()` attach their listener for
`typo3-module-loaded` inside `page.waitForFunction()`, which
Playwright executes in the browser via a round-trip after
the JS call returns. Callers fire the triggering action on
the next line, so the listener sometimes arrives after the
event has already dispatched and the helper runs out the 30s
timeout. The "Open in new window" language test flakes on
this path.

The patch replaces the one-shot listener with an idempotent
counter installed eagerly via `page.evaluate()`. Awaiting the
fixture leaves the listener in place before returning, and
the returned waiter resolves once the counter advances.

The same test has a second flake: `fill()` on Page Title runs
before FormEngine has re-initialized the input after a
language switch, so the init pass overwrites the typed value.
The patch waits for `data-formengine-input-initialized` on
the input before filling and before reading it back.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
  • Verified V +2 Done
    • Christian Kuhn +2
    • core-ci +1 CI

Issues 1

Files 10

Review log 34

  1. Christian Kuhn commented on patch set 1 05/02/26, 21:13

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 05/02/26, 21:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101414

  3. Christian Kuhn voted on patch set 1 CR +2 V +2 05/02/26, 21:57

  4. Christian Kuhn merged patch set 2 05/02/26, 21:57