Skip to content

feat: Replace Playwright anti-patterns with web-first assertions in drag-list#63559

Open
bittoby wants to merge 2 commits intoapache:mainfrom
bittoby:feat/e2e-improve-playwright-patterns-dags-list
Open

feat: Replace Playwright anti-patterns with web-first assertions in drag-list#63559
bittoby wants to merge 2 commits intoapache:mainfrom
bittoby:feat/e2e-improve-playwright-patterns-dags-list

Conversation

@bittoby
Copy link

@bittoby bittoby commented Mar 13, 2026

Replace Playwright anti-patterns with web-first assertions in dags-list.spec.ts and DagsPage.ts to align with Playwright best practices. No test coverage or behavior changes.

  • Remove all waitForTimeout() calls - replaced with state-based waiting (expect().toBeVisible/Hidden/toHaveCount, waitForResponse)
  • Replace CSS :has-text() and locator("text=") with getByRole(), getByTestId(), and .filter({ hasText: })
  • Convert boolean-returning verify methods (verifyDagExists, verifyCardViewVisible, verifyTableViewVisible) to Promise<void> with web-first expect() assertions
  • Replace while loop + waitForTimeout polling in verifyDagRunStatus with expect.poll()
  • Fix broken needsReviewFilter selector (button:has-text("Needs Review")getByTestId("dags-needs-review-filter"))

closes: #63426

Was generative AI tooling used to co-author this PR?
  • Yes (Claude Code, claude-sonnet-4-6)

Generated-by: Claude Code (claude-sonnet-4-6) following the guidelines

@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Mar 13, 2026
@bittoby
Copy link
Author

bittoby commented Mar 13, 2026

@choo121600 Please review this PR. Welcome to any feedback!

Copy link
Member

@choo121600 choo121600 left a comment

Choose a reason for hiding this comment

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

It looks like the static check is failing.
You might find the following guide helpful in resolving it :)

https://github.com/apache/airflow/blob/main/contributing-docs/08_static_code_checks.rst

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.

E2E: Improve Playwright test patterns in dags-list.spec.ts

2 participants