fix(ui/e2e): improve Playwright test patterns in task-logs.spec.ts#63990
Merged
choo121600 merged 2 commits intoMar 24, 2026
Merged
Conversation
…pache#63964) Replace Playwright anti-patterns with best practices in task-logs spec. Changes in task-logs.spec.ts: - Replace locator('[data-testid="..."]') with getByTestId() (6 occurrences) - Replace locator('[data-testid^="virtualized-item-"]') with getByTestId(/^virtualized-item-/) regex pattern Changes in playwright.config.ts: - Remove task-logs.spec.ts from testIgnore list closes apache#63964
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
choo121600
reviewed
Mar 22, 2026
Contributor
|
@choo121600 is this PR ready to be merged? |
Member
Oops, I missed this pr 😅 |
choo121600
approved these changes
Mar 24, 2026
choo121600
approved these changes
Mar 24, 2026
choo121600
left a comment
Member
There was a problem hiding this comment.
Overall, this looks good 👍
However, due to another issue with this part, I’ll keep it disabled for now.
Thanks for the contribution!
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
vatsrahul1001
pushed a commit
that referenced
this pull request
Mar 25, 2026
…63990) * fix(ui/e2e): improve Playwright test patterns in task-logs.spec.ts (#63964) Replace Playwright anti-patterns with best practices in task-logs spec. Changes in task-logs.spec.ts: - Replace locator('[data-testid="..."]') with getByTestId() (6 occurrences) - Replace locator('[data-testid^="virtualized-item-"]') with getByTestId(/^virtualized-item-/) regex pattern Changes in playwright.config.ts: - Remove task-logs.spec.ts from testIgnore list closes #63964 * Update airflow-core/src/airflow/ui/playwright.config.ts --------- Co-authored-by: Tyson Cung <tysoncung@example.com> Co-authored-by: Yeonguk Choo <choo121600@gmail.com>
nailo2c
pushed a commit
to nailo2c/airflow
that referenced
this pull request
Mar 30, 2026
…pache#63990) * fix(ui/e2e): improve Playwright test patterns in task-logs.spec.ts (apache#63964) Replace Playwright anti-patterns with best practices in task-logs spec. Changes in task-logs.spec.ts: - Replace locator('[data-testid="..."]') with getByTestId() (6 occurrences) - Replace locator('[data-testid^="virtualized-item-"]') with getByTestId(/^virtualized-item-/) regex pattern Changes in playwright.config.ts: - Remove task-logs.spec.ts from testIgnore list closes apache#63964 * Update airflow-core/src/airflow/ui/playwright.config.ts --------- Co-authored-by: Tyson Cung <tysoncung@example.com> Co-authored-by: Yeonguk Choo <choo121600@gmail.com>
Suraj-kumar00
pushed a commit
to Suraj-kumar00/airflow
that referenced
this pull request
Apr 7, 2026
…pache#63990) * fix(ui/e2e): improve Playwright test patterns in task-logs.spec.ts (apache#63964) Replace Playwright anti-patterns with best practices in task-logs spec. Changes in task-logs.spec.ts: - Replace locator('[data-testid="..."]') with getByTestId() (6 occurrences) - Replace locator('[data-testid^="virtualized-item-"]') with getByTestId(/^virtualized-item-/) regex pattern Changes in playwright.config.ts: - Remove task-logs.spec.ts from testIgnore list closes apache#63964 * Update airflow-core/src/airflow/ui/playwright.config.ts --------- Co-authored-by: Tyson Cung <tysoncung@example.com> Co-authored-by: Yeonguk Choo <choo121600@gmail.com>
abhijeets25012-tech
pushed a commit
to abhijeets25012-tech/airflow
that referenced
this pull request
Apr 9, 2026
…pache#63990) * fix(ui/e2e): improve Playwright test patterns in task-logs.spec.ts (apache#63964) Replace Playwright anti-patterns with best practices in task-logs spec. Changes in task-logs.spec.ts: - Replace locator('[data-testid="..."]') with getByTestId() (6 occurrences) - Replace locator('[data-testid^="virtualized-item-"]') with getByTestId(/^virtualized-item-/) regex pattern Changes in playwright.config.ts: - Remove task-logs.spec.ts from testIgnore list closes apache#63964 * Update airflow-core/src/airflow/ui/playwright.config.ts --------- Co-authored-by: Tyson Cung <tysoncung@example.com> Co-authored-by: Yeonguk Choo <choo121600@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
task-logs.spec.tsusespage.locator('[data-testid="..."]')instead of Playwright's built-ingetByTestId()method, which is the recommended approach per Playwright best practices.The spec is also currently in the
testIgnorelist.Solution
Changes in
task-logs.spec.ts:page.locator('[data-testid="..."]')withpage.getByTestId()(6 occurrences)page.locator('[data-testid^="virtualized-item-"]')withpage.getByTestId(/^virtualized-item-/)regex patternChanges in
playwright.config.ts:task-logs.spec.tsfromtestIgnorelistFiles Changed
airflow-core/src/airflow/ui/tests/e2e/specs/task-logs.spec.tsairflow-core/src/airflow/ui/playwright.config.tsChecklist
page.waitForFunction()with DOM queries → N/A (not present)page.waitForTimeout()→ N/A (not present)waitForLoadState("networkidle")→ N/A (not present)page.evaluate()for DOM manipulation → N/A (not present):has-text()→ N/A (not present)Part of #63036
Closes #63964