Repository navigation
Description
Under which category would you file this issue?
Airflow Core
Apache Airflow version
3.3.1
What happened and how to reproduce it?
Description
tests/e2e/specs/xcoms.spec.ts → verify filtering by key pattern and verify filtering by Dag display name fail deterministically on main in Chromium, Firefox, and WebKit. All 4 retry attempts fail with a Playwright strict-mode violation.
This is blocking unrelated PRs' CI (e.g. #72425), since the failure reproduces on main regardless of what the PR changes.
Root cause
airflow-core/src/airflow/ui/tests/e2e/pages/XComsPage.ts, applyFilter():
const filterPill = this.page
.locator("div")
.filter({ hasText: `${filterName}:` })
.first();
const filterInput = filterPill.getByRole("textbox");
await expect(filterInput).toBeVisible({ timeout: 30_000 });Playwright's hasText filter matches on an element's full rendered text content, including all descendants. Since .filter() matches every div containing the substring "Key:" (or "Dag ID:") anywhere in its subtree, .first() in DOM order now resolves to a large ancestor wrapper rather than the small filter-pill div — so getByRole("textbox") inside it matches every textbox on the page instead of just the filter input.
This appears to have been introduced by #71554 ("UI: Consolidate table controls into a header row above the table", commit 5999abe), which restructured the table-controls DOM so more ancestor divs now contain the filter label text.
Reproduction
Failing run (PR #72425, based on current main):
Chromium: https://github.com/apache/airflow/actions/runs/33610282179/job/100195299938
Firefox: https://github.com/apache/airflow/actions/runs/33610282179/job/100195299429
WebKit: https://github.com/apache/airflow/actions/runs/33610282179/job/100195299536
Playwright error (Chromium):
[chromium] › tests/e2e/specs/xcoms.spec.ts:57:3 › XComs Page › verify filtering by Dag display name
Error: strict mode violation: locator resolved to 12 elements instead of 1
XComsPage.ts:59 getByRole("textbox")
What you think should happen instead?
The filter-pill lookup should be scoped to a specific container (e.g. a data-testid on the pill added in #71554's new header row) instead of page.locator("div").filter({ hasText }), so it can't match arbitrary ancestor wrappers that happen to contain the same text.
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Activity