Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[e2e] Update eslint guidelines to disallow page.locator in favor of web-first locators like page.getByRole #7307

Closed
3 tasks done
unlikelyzero opened this issue Dec 17, 2023 · 1 comment · Fixed by #7581
Closed
3 tasks done
Labels
type:maintenance tests, chores, or project maintenance

Comments

@unlikelyzero
Copy link
Collaborator

unlikelyzero commented Dec 17, 2023

Summary

This will be a fairly large undertaking, but the playwright eslint plugin can help us find all examples of page.locator and replace with page.getByRole()

  • Upgrade to eslint-playwright >1.6.0
  • Set playwright eslint rule for no-nth-methods and no-raw-locators to required
  • Skip for the performance/contract tests
@unlikelyzero unlikelyzero added the type:maintenance tests, chores, or project maintenance label Dec 17, 2023
@unlikelyzero unlikelyzero added this to the Target:3.3.0 milestone Dec 17, 2023
@unlikelyzero
Copy link
Collaborator Author

Notable violations:

  • Create Menu injects icon getByRole('menuitem', { name: ' Display Layout' })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:maintenance tests, chores, or project maintenance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants