Flaky e2e test: my-games.spec.ts sees two "No games with this result." on a filter switch #406

Closed
opened 2026-10-15 08:11:49 +00:00 by root · 1 comment
root commented 2026-10-15 08:11:49 +00:00 (Migrated from gitlab.core-project.space)

What happens

In CI, apps/e2e/tests/my-games.spec.ts › "lists a resigned Game for both Players with their own result under each filter, and its link reads anywhere" fails intermittently at line 60, right after switching the filter to Won:

Error: strict mode violation: getByText('No games with this result.') resolved to 2 elements:
    1) getByLabel('All games').getByText('No games with this result.')
    2) getByLabel('Won').getByText('No games with this result.')

Where seen

  • MR !529, pipeline #126, job 1137 (e2e). The retry, job 1142, passed with no code change. Main's pipelines were green on the same test, so it is a flake, not a regression.

Likely cause

apps/front/src/games/my-games.ui.tsx maps every filter to a TabsContent, and each panel renders the same rows and counts for the current filter. Base UI keeps the leaving panel mounted for a moment during the tab change. So the old "All games" panel briefly shows the Won filter's empty state beside the new panel.

Cost

A manual rerun each time it hits, holding the merge request until the e2e job passes.

Expected

Only the active filter's panel shows rows or the empty state, so the test passes deterministically. Reproduce by looping the spec (--repeat-each) before fixing.

## What happens In CI, `apps/e2e/tests/my-games.spec.ts` › "lists a resigned Game for both Players with their own result under each filter, and its link reads anywhere" fails intermittently at line 60, right after switching the filter to Won: ``` Error: strict mode violation: getByText('No games with this result.') resolved to 2 elements: 1) getByLabel('All games').getByText('No games with this result.') 2) getByLabel('Won').getByText('No games with this result.') ``` ## Where seen - MR !529, pipeline #126, job 1137 (`e2e`). The retry, job 1142, passed with no code change. Main's pipelines were green on the same test, so it is a flake, not a regression. ## Likely cause `apps/front/src/games/my-games.ui.tsx` maps every filter to a `TabsContent`, and each panel renders the same `rows` and counts for the *current* filter. Base UI keeps the leaving panel mounted for a moment during the tab change. So the old "All games" panel briefly shows the Won filter's empty state beside the new panel. ## Cost A manual rerun each time it hits, holding the merge request until the e2e job passes. ## Expected Only the active filter's panel shows rows or the empty state, so the test passes deterministically. Reproduce by looping the spec (`--repeat-each`) before fixing.
root commented 2026-10-15 21:16:33 +00:00 (Migrated from gitlab.core-project.space)

Fixed on main by 4623f0b0: only the chosen filter's panel renders rows or the empty-result line, so a panel still transitioning out holds nothing. Looping the spec with --repeat-each=20 passed 20/20.

Fixed on main by 4623f0b0: only the chosen filter's panel renders rows or the empty-result line, so a panel still transitioning out holds nothing. Looping the spec with --repeat-each=20 passed 20/20.
root (Migrated from gitlab.core-project.space) closed this issue 2026-10-15 21:16:35 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amaurycoudr/chess-project#406
No description provided.