Skip to content

Improve Playwright test patterns in xcoms page object #63966#65645

Open
haseebmalik18 wants to merge 4 commits intoapache:mainfrom
haseebmalik18:improve-xcoms-e2e-patterns
Open

Improve Playwright test patterns in xcoms page object #63966#65645
haseebmalik18 wants to merge 4 commits intoapache:mainfrom
haseebmalik18:improve-xcoms-e2e-patterns

Conversation

@haseebmalik18
Copy link
Copy Markdown
Contributor

Improve Playwright test patterns in XComsPage.ts to align with best practices.

  • Replace page.locator('[data-testid="..."]') with page.getByTestId()
  • Replace locator('[role="..."]') with getByRole()
  • Replace CSS filter({ hasText }) on th with getByRole("columnheader", { name })
  • Replace locator("input") with getByRole("textbox")
  • Replace manual assertions (expect(count).toBeGreaterThan(0)) with web-first assertions (await expect(rows).not.toHaveCount(0))
  • Replace textContent() manual checks with not.toHaveText("")
  • Replace page.evaluate()-style DOM queries with locator-based .or() chains
  • Extract reusable tableRows locator to reduce repetition

closes: #63966

@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Apr 21, 2026
@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Apr 22, 2026
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. ready for maintainer review Set after triaging when all criteria pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

E2E: Improve Playwright test patterns in specs/xcoms.spec.ts

2 participants