idrisakorede opened a new pull request, #63199:
URL: https://github.com/apache/airflow/pull/63199
Refactor `DagRunsPage.ts` to align with Playwright best practices.
This PR is part of the E2E test improvement effort tracked in #63036.
**Changes in `DagRunsPage.ts`:**
- `page.locator('table, div[role="table"]')` → `page.getByRole("table")`
- `waitForLoadState("networkidle")` removed (×2) — subsequent
`toBeVisible()` assertions already handle waiting
- `.waitFor({ state: "visible" })` → `await expect(...).toBeVisible()`
- `page.locator('text="..."')` → `page.getByText("...")`
- Manual assertions (`expect(await ...).toBeGreaterThan(0)`) → web-first
assertions (`await expect(...).not.toHaveCount(0)`)
- Manual `textContent()` + `toContain()` → `await
expect(...).toContainText()`
- `expect((await link.textContent())?.trim()).toBeTruthy()` → `await
expect(link).not.toHaveText("")`
**No changes to `dag-runs.spec.ts`** — the spec file already delegates to
the page object and has no anti-patterns.
No test coverage or behavior changes. Patterns only.
closes: #63168
related: #63036
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (please specify the tool below)
Generated-by: Claude following [the
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
---
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]