Skip to content

feat: Improve Playwright test patterns in home-dashboard.spec.ts#63448

Merged
choo121600 merged 1 commit intoapache:mainfrom
Desel72:fix/improve-playwright-home-dashboard-patterns
Mar 13, 2026
Merged

feat: Improve Playwright test patterns in home-dashboard.spec.ts#63448
choo121600 merged 1 commit intoapache:mainfrom
Desel72:fix/improve-playwright-home-dashboard-patterns

Conversation

@Desel72
Copy link
Contributor

@Desel72 Desel72 commented Mar 12, 2026

Replace Playwright anti-patterns with best practices in home-dashboard spec and HomePage page object.

Changes in HomePage.ts:

  • Replace button:has-text("DAG Import Errors") with getByRole("button", { name: "DAG Import Errors" })
  • Replace waitFor({ state: "visible" }) with web-first expect().toBeVisible() (2 occurrences)

Changes in home-dashboard.spec.ts:

  • Replace page.waitForURL() with web-first expect(page).toHaveURL() (2 occurrences)
  • Remove redundant manual expect(url).toContain() assertions after URL checks

closes: #63428

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

Desel72 commented Mar 12, 2026

@choo121600 Could you review this PR first?

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.

LGTM, Thanks ;)

@choo121600 choo121600 merged commit 672bfe8 into apache:main Mar 13, 2026
79 checks passed
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 home-dashboard.spec.ts

2 participants