Skip to content

Fix flaky Firefox calendar-tab e2e tests by dispatching a real hover#67879

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix-firefox-calendar-tooltip-e2e
Jun 2, 2026
Merged

Fix flaky Firefox calendar-tab e2e tests by dispatching a real hover#67879
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix-firefox-calendar-tooltip-e2e

Conversation

@potiuk
Copy link
Copy Markdown
Member

@potiuk potiuk commented Jun 1, 2026

The Dag Calendar tab e2e tests (airflow-core/src/airflow/ui/tests/e2e/specs/dag-calendar-tab.spec.ts) read run states from the hover tooltip (BasicTooltip), which opens on a real mouseenter after a 500ms delay.

In Firefox, the previous cell.hover({ force: true }) teleports the pointer and does not fire mouseenter, and re-hovering an already-hovered cell never re-fires it — so the existing retry loop could never recover and the three state-reading tests timed out. Chromium was unaffected. Seen in run 26766429736 (Firefox UI e2e tests, PROD image): 3 failed / 117 passed, all three in dag-calendar-tab.spec.ts.

Fix

In DagCalendarTab.getManualRunStates(), reset the pointer to (0, 0) and then move onto the cell centre in steps (page.mouse.move(x, y, { steps: 5 })) so a genuine mouseenter is dispatched on each attempt, instead of the teleporting hover({ force: true }).

Test-only change (e2e page object) — no production code touched. The UI compile/lint prek hook passes locally; the Firefox behaviour itself is verified by the e2e job in CI.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.8)

Generated-by: Claude Code (Opus 4.8) following the guidelines

@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Jun 1, 2026
@potiuk potiuk linked an issue Jun 1, 2026 that may be closed by this pull request
@potiuk potiuk force-pushed the fix-firefox-calendar-tooltip-e2e branch from 547ced7 to 68c3f3e Compare June 2, 2026 01:06
Copy link
Copy Markdown
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking a look.

Indeed I've seen those fail a few times on recent PR.

If CI is happy, i'm happy.

Comment thread airflow-core/src/airflow/ui/src/pages/Dag/Calendar/CalendarCell.tsx
The Dag Calendar tab e2e tests read run states by hovering each cell to open
the tooltip. BasicTooltip opens on a mouseenter after a 500ms delay and renders
through a portal, which synthetic pointer events do not open reliably in
headless Firefox — the three state-reading tests timed out there (chromium was
unaffected), and a stepped real-pointer hover did not help either.

Expose the per-cell run states as a data-states attribute on the calendar cell,
computed with the same view-mode-aware logic the tooltip uses, and read that
attribute in the tests instead of hovering. Reading a DOM attribute is
deterministic and backend-independent, so the tests pass on every browser.
@potiuk potiuk force-pushed the fix-firefox-calendar-tooltip-e2e branch from 68c3f3e to e6e5fc5 Compare June 2, 2026 12:09
@pierrejeambrun
Copy link
Copy Markdown
Member

pierrejeambrun commented Jun 2, 2026

nit: Description isn't accurate anymore

no production code touched and describes a page.mouse.move(x, y, {steps: 5}) hover fix. The actual diff abandons hovering entirely: it adds a data-states attribute to the production CalendarCell.tsx (+14) and reads that.

@potiuk potiuk merged commit 9d4f495 into apache:main Jun 2, 2026
85 checks passed
@potiuk potiuk deleted the fix-firefox-calendar-tooltip-e2e branch June 2, 2026 15:10
amrith92 pushed a commit to tully-oss/airflow that referenced this pull request Jun 2, 2026
amrith92 pushed a commit to tully-oss/airflow that referenced this pull request Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Track Firefox Dag Calendar tooltip e2e flake

2 participants