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

Cop idea: Detects chained Capybara::Node::Finders#find #72

Open
ydah opened this issue Sep 19, 2023 · 1 comment
Open

Cop idea: Detects chained Capybara::Node::Finders#find #72

ydah opened this issue Sep 19, 2023 · 1 comment
Labels

Comments

@ydah
Copy link
Member

ydah commented Sep 19, 2023

# bad
page.find('#foo').find('.bar')

# good
page.find('#foo .bar')
@ydah ydah added the cop label Sep 19, 2023
@boris-petrov
Copy link

Great idea! Note, however, that cases like:

page.find('#foo', text: 'baz').find('.bar')

Cannot be changed to the latter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants