E2E: Improve Playwright test patterns in task-logs.spec.ts#63971
Closed
Uday-Choudhary wants to merge 2 commits intoapache:mainfrom
Closed
E2E: Improve Playwright test patterns in task-logs.spec.ts#63971Uday-Choudhary wants to merge 2 commits intoapache:mainfrom
Uday-Choudhary wants to merge 2 commits intoapache:mainfrom
Conversation
|
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 20, 2026
Member
choo121600
left a comment
There was a problem hiding this comment.
Thanks for your first contribution!
It looks like the static check is failing. Could you take a look?
https://github.com/apache/airflow/blob/main/contributing-docs/08_static_code_checks.rst
Replace anti-patterns with Playwright best practices:
- page.locator('[data-testid="..."]') → page.getByTestId(...)
- .waitFor({ state: "visible" }) → expect(...).toBeVisible()
- waitForLoadState("networkidle") → state-based locator waiting
- Manual count assertions → web-first expect(...).not.toHaveCount(0)
- Remove task-logs.spec.ts from testIgnore list
Closes apache#63964
0b9d243 to
36f23b7
Compare
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.
Improve Playwright test patterns in specs/task-logs.spec.ts and related page objects to align with Playwright Best Practices.
This PR focuses on improving test patterns only and does not change test coverage or behavior.
Changes included in this PR:
waitForLoadState("networkidle")in verifyStateFiltering (TaskInstancesPage.ts), relying instead on nativeexpect().toBeVisible()checks for specific UI rendering.expect(await rows.count()).toBeGreaterThan(0)to the recommended web-first assertion:await expect(rows).not.toHaveCount(0)in TaskInstancesPage.ts.logItems.first()has rendered and is visible before running regex checks against the content of thevirtualizedListcomponent.testIgnorearray in playwright.config.ts.closes: #63964
related: #63036