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

Open
3 tasks
unlikelyzero opened this issue Dec 17, 2023 · 1 comment · May be fixed by #7581
Open
3 tasks
Labels
type:maintenance tests, chores, or project maintenance

Comments

@unlikelyzero
Copy link
Collaborator

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' })

@unlikelyzero unlikelyzero modified the milestones: Target:3.3.0, Target:4.0.0 Jan 17, 2024
@unlikelyzero unlikelyzero linked a pull request Mar 12, 2024 that will close this issue
15 tasks
@akhenry akhenry removed this from the Target:4.0.0 milestone Mar 18, 2024
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