Skip to content

feat: Improve Playwright test patterns in plugins.spec.ts and PluginsPage.ts#63562

Open
bittoby wants to merge 5 commits intoapache:mainfrom
bittoby:feat/e2e-improve-playwright-patterns-plugins
Open

feat: Improve Playwright test patterns in plugins.spec.ts and PluginsPage.ts#63562
bittoby wants to merge 5 commits intoapache:mainfrom
bittoby:feat/e2e-improve-playwright-patterns-plugins

Conversation

@bittoby
Copy link

@bittoby bittoby commented Mar 13, 2026

Improve Playwright test patterns in plugins.spec.ts and PluginsPage.ts to align with Playwright Best Practices.

This PR improves test patterns only. It does not change test coverage or behavior.

Changes in PluginsPage.ts:

  • Replace page.waitForFunction() with DOM queries with locator-based waitFor()
  • Expose nameColumn and sourceColumn as typed Locator properties instead of methods returning string[]

Changes in plugins.spec.ts:

  • Replace manual assertions on extracted values with web-first assertions (not.toHaveCount(), not.toBeEmpty(), toHaveCount())

related: #63429


Was generative AI tooling used to co-author this PR?
  • Yes (Claude Code, claude-sonnet-4-6)

Generated-by: Claude Code (claude-sonnet-4-6) following the guidelines

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

bittoby commented Mar 13, 2026

@choo121600 Could you please review this PR?
thank you

@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Mar 14, 2026
@bittoby
Copy link
Author

bittoby commented Mar 15, 2026

@haseebmalik18 Thanks for your feedback!

@bittoby
Copy link
Author

bittoby commented Mar 16, 2026

@choo121600 @haseebmalik18 Please review again
thank you

@bittoby bittoby force-pushed the feat/e2e-improve-playwright-patterns-plugins branch from be07461 to 5e0bf39 Compare March 16, 2026 05:58
@bittoby
Copy link
Author

bittoby commented Mar 16, 2026

@choo121600 Review again. I updated

@choo121600 choo121600 linked an issue Mar 16, 2026 that may be closed by this pull request
8 tasks
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.

Overall looks good to me :)
Let's wait for CI to pass.

Comment on lines +45 to +47
const count = await pluginsPage.rows.count();

for (const name of pluginNames) {
expect(name.trim().length).toBeGreaterThan(0);
expect(count).toBeGreaterThan(0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be improved using a web-first assertion pattern like this?

await expect(pluginsPage.rows).not.toHaveCount(0);
const count = await pluginsPage.rows.count();

@bittoby bittoby force-pushed the feat/e2e-improve-playwright-patterns-plugins branch from 451dccb to 2a91d6a Compare March 16, 2026 11:47
@bittoby bittoby requested a review from choo121600 March 16, 2026 11:47
@bittoby
Copy link
Author

bittoby commented Mar 16, 2026

@choo121600 All tests passed!

@bittoby
Copy link
Author

bittoby commented Mar 17, 2026

@choo121600 could you also review this PR, too?

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 plugins.spec.ts

4 participants