-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat: add prefer-user-facing-locators rule #160
feat: add prefer-user-facing-locators rule #160
Conversation
Not really a fan of the name here, what about
Honestly not sure I like those options either, hmm. |
@mskelton What about |
Would definitely use this rule! the |
Problem with I think I would like to proceed with |
@mskelton That's a good point you're making. I would then change the name of the rule to your suggested |
Yes, the rule should detect all usages of |
Talking about the naming again. I think it would make sense to align it with other rules like Another thing: should this rule be included in the recommended config and with which level of severity should this rule report? |
Yeah, good call, This should definitely NOT be in the recommended config. While the other methods are better when possible to use, there are still plenty of valid use cases for |
f9bb9d3
to
7b9ec83
Compare
Ok, I've made the changes you've requested. |
5f91eab
to
a6e5ad4
Compare
🎉 This PR is included in version 0.16.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Should this rule be added to the list of rules in the readme? |
@seanlaff Indeed it should, I missed that before. If you are willing to open a PR, that'd be appreciated! |
@seanlaff It's in the readme now |
This merge request adds a rule that prefers the usage of user-facing locators over
page.locator()
. Using user-facing selectors makes the tests more robust.Resolves: #123