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

Misunderstanding with Capybara/NegationMatcher #57

Closed
ydakuka opened this issue Jul 8, 2023 · 4 comments · Fixed by #60
Closed

Misunderstanding with Capybara/NegationMatcher #57

ydakuka opened this issue Jul 8, 2023 · 4 comments · Fixed by #60

Comments

@ydakuka
Copy link

ydakuka commented Jul 8, 2023

Actual behavior

The default behavior of the rubocop-capybara is inconsistent with the rspec style guide.

Reference 1: https://rspec.rubystyle.guide/#capybara-negative-selectors
Reference 2: https://docs.rubocop.org/rubocop-capybara/cops_capybara.html#capybaranegationmatcher

Expected behavior

The rspec style guide will be corrected.

@mvz
Copy link

mvz commented Jan 3, 2024

@ydah how up-to-date is the rspec style guide really? That rule may stem from a time when not_to have.. would not invoke Capybara's timeout logic.

@pirj
Copy link
Member

pirj commented Jan 3, 2024

@mvz it might be significantly outdated. I maintain it, but I’m not an expert in Capybara, so most of Capybara-related guidelines are inherited from older guides. I appreciate if you could contribute and update the guide.

@ydah
Copy link
Member

ydah commented Jan 3, 2024

Maybe we should extract factory_bot and capybara guidelines from rspec-style-guide?

@pirj
Copy link
Member

pirj commented Jan 3, 2024

There are not enough guidelines for Capybara/FB now. But if someone is up to create such a guide, I’d be happy to move existing guidelines there.

siegfault pushed a commit to siegfault/expiration that referenced this issue Jan 7, 2024
Though the default was changed in
rubocop/rubocop-capybara#57, there is some
confusion around desired behavior and I think this reads better.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants