Review main Merged

93318[TASK] Fix flaky Playwright e2e tests

Benjamin Kott CR +2 V +2 Normal +95 −58 updated 03/24/26, 09:06

Commit message

Stabilize five tests that intermittently fail due to race conditions
and incorrect selectors.

The QR code and sys-note tests filled FormEngine fields before the
FormEngine JS had initialized, so the hidden submit input never
received the value. Switch from pressSequentially() to fill() and
await formEngineLoaded() before interacting with form fields. The
edit test now asserts on the /_redirect/ prefix which is always
present in QR code record titles, regardless of source_host.

The language switching test did not wait for the EditDocumentController
to load after clicking "Open full editing view", causing the heading
assertion to pass on stale content from the page layout module. It
also switched languages before verifying that the save had fully
re-rendered the form, leading to stale field values on the subsequent
switch back.

The recycler module's loadDeletedElements() did not cancel
in-flight AJAX requests, so overlapping calls caused the table to
re-render mid-interaction. Cancel previous requests via abort()
before starting new ones. The test now also waits for the search
response before interacting with the table.

The file clipboard multi-selection test used a fragile iframe reload
detection hack (cestIsOldPage marker). It now checks the iframe DOM
directly for multi-selection mode content and navigates via the file
tree fixture to avoid stale module responses.

The bookmark edit and delete tests failed because the edit button
overflows the visible table area. They now use dispatchEvent to
bypass visibility constraints.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Garvin Hicking +1
    • Sven Liebert +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Oliver Klee +1
    • Garvin Hicking +1
    • Sven Liebert +1
    • core-ci +1 CI

Issues 1

Files 9

Review log 2131

Show 46 earlier messages
  1. Benjamin Kott uploaded patch set 1 03/23/26, 14:06

  2. core-ci voted on patch set 1 V -1 03/23/26, 14:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98487

  3. Benjamin Kott uploaded patch set 2 V -1 03/23/26, 14:25

  4. core-ci voted on patch set 2 V -1 03/23/26, 14:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98490

  5. Christian Kuhn commented on patch set 2 03/23/26, 14:44

    It looks as if quite a bit of work happened on https://review.typo3.org/c/Packages/TYPO3.CMS/+/92937 and https://review.typo3.org/c/Packages/TYPO3.CMS/+/91999 already, which aim to solve the same issues and overlap codewise. How to continue with them?
  6. Benjamin Kott uploaded patch set 3 V -1 03/23/26, 14:52

  1. Benjamin Kott commented on patch set 3 03/23/26, 14:56

    Reply

    I've seen bennis patch, and also the one from jochen. i for now used the issue from benni to resolve it. But it's really hard to pinpoint the problem. the state i achieved now seems to be more stable at least on the local env. i am currently trying to get them also more stable in the ci env. i just want to prevent the tests to be disabled for now. we can use any existing patch to apply the changes when i am done, but also the solutions are in parts quite different
  2. core-ci voted on patch set 3 V +1 03/23/26, 15:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98493

  3. Garvin Hicking commented on patch set 3 CR +1 V +1 03/23/26, 15:12

    I take whatever I can get :)
  4. Benjamin Kott uploaded patch set 4 CR +1 V +1 03/23/26, 15:17

  5. Benjamin Kott commented on patch set 4 CR -2 03/23/26, 15:17

    the goal is to have 0 retrys
  6. Benjamin Kott uploaded patch set 5 03/23/26, 15:38

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  7. core-ci voted on patch set 5 V +1 03/23/26, 15:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98505

  8. core-ci voted on patch set 4 V +1 03/23/26, 15:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98500

  9. Benjamin Kott uploaded patch set 6 V +1 03/23/26, 15:57

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  10. core-ci voted on patch set 6 V +1 03/23/26, 16:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98506

  11. Benjamin Kott uploaded patch set 7 V +1 03/23/26, 16:12

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  12. Benjamin Kott uploaded patch set 8 03/23/26, 16:20

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  13. core-ci voted on patch set 7 V +1 03/23/26, 16:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98507

  14. core-ci voted on patch set 8 V -1 03/23/26, 16:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98508

  15. core-ci voted on patch set 8 V +1 03/23/26, 16:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98508

  16. Benjamin Kott uploaded patch set 9 V +1 03/23/26, 17:03

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  17. core-ci voted on patch set 9 V +1 03/23/26, 17:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98512

  18. Benjamin Kott voted on patch set 9 CR 0 03/23/26, 18:18

  19. Garvin Hicking voted on patch set 9 CR +1 V +1 03/23/26, 18:33

  20. Sven Liebert voted on patch set 9 CR +1 V +1 03/24/26, 06:38

  21. Georg Ringer voted on patch set 9 CR +2 V +2 03/24/26, 07:06

  22. Benni Mack commented on patch set 9 03/24/26, 08:34

    Reply

    I'll abandon mine, it started off good but AI turned it into a shit-load of workarounds in this case. OK for you @lolli@schwarzbu.ch?
  23. Oliver Klee voted on patch set 9 V +1 03/24/26, 08:46

  24. Garvin Hicking merged patch set 10 03/24/26, 08:56

  25. Christian Kuhn commented on patch set 10 03/24/26, 09:06

    Reply

    thank you benni.