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

[SpecificMatcher] False-negatives #119

Open
boris-petrov opened this issue May 14, 2024 · 1 comment
Open

[SpecificMatcher] False-negatives #119

boris-petrov opened this issue May 14, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@boris-petrov
Copy link
Contributor

expect(page).to have_no_css('input[placeholder="foo"]')

This is not caught but can be replaced to:

expect(page).to have_no_field(placeholder: 'foo')
@boris-petrov
Copy link
Contributor Author

Other attributes should be handled too - like type:

expect(page).to have_no_css('input[type="checkbox"]')

Must be:

expect(page).to have_no_field(type: 'checkbox')

Also, the same is true for finders:

find('input[placeholder="City"]')

Should be marked as an error as it can be replaced with:

find_field(placeholder: 'City')

@ydah ydah added the bug Something isn't working label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants