Skip to content

Fix XComs e2e filter tests: scope the filter input by testid (#72438) - #73666

Merged
vatsrahul1001 merged 1 commit into
v3-3-testfrom
backport-72438-xcoms-e2e-v3-3-test
Sep 24, 2026
Merged

vatsrahul1001 merged 1 commit into
v3-3-testfrom
backport-72438-xcoms-e2e-v3-3-test

Conversation

@vatsrahul1001

Copy link
Copy Markdown
Contributor

Backport of #72438 to v3-3-test.

The XComs e2e filter tests located the active filter pill's input via page.locator("div").filter({ hasText: \${filterName}:` }).first(), which matches an ancestor wrapping the whole table; getByRole("textbox")on it then resolved to every XCom-value Monaco editor and failed with "resolved to N elements instead of 1". This gives the actively-editing pill's input a stabledata-testid="filter-pill-input"` and targets it directly.

The original PR's FilterBar.test.tsx change is omitted — that unit-test file does not exist on v3-3-test, so this backport carries only the e2e fix (component testid + page object).

(cherry picked from commit 0f7f45f)


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

* Fix XComs e2e filter tests: scope the filter input by testid

xcoms.spec.ts's filter tests locate the active filter pill's input via
page.locator("div").filter({ hasText: `${filterName}:` }), which
matches any ancestor whose descendant text contains that string.
matches, and .first() no longer reliably picks the actual pill -
getByRole("textbox") on it resolves to every textbox inside whichever
div wins, throwing "resolved to 12 elements instead of 1".

Give the actively-editing pill's input a stable data-testid
(filter-pill-input) instead of relying on ancestor text matching, and
scope XComsPage.applyFilter() to it directly. Only one pill is ever in
edit mode at a time, so the testid alone is enough - no per-filter key
plumbing needed.

Added a FilterBar test that fails without the fix (verified locally by
reverting the testid and confirming the new test - and only that
test - breaks).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015kAvbZ6SeKgp6jbGcvpXSh

* Add newsfragment

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015kAvbZ6SeKgp6jbGcvpXSh

* Revert "Add newsfragment"

This reverts commit 06fd055.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Kunal8954 <your-github-email@example.com>
(cherry picked from commit 0f7f45f)
@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Sep 24, 2026
@vatsrahul1001
vatsrahul1001 merged commit ce22fe6 into v3-3-test Sep 24, 2026
83 checks passed
@vatsrahul1001
vatsrahul1001 deleted the backport-72438-xcoms-e2e-v3-3-test branch September 24, 2026 15:23
@github-actions github-actions Bot added this to the Airflow 3.3.3 milestone Sep 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.3.3 based on: bug fix merged to version branch
If this milestone is not correct, please update it to the appropriate milestone.

This comment was generated by Milestone Tag Assistant.

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.

2 participants