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: like a Capybara/FindElementValueEq cop #5

Open
ydah opened this issue Aug 2, 2022 · 1 comment
Open

Cop idea: like a Capybara/FindElementValueEq cop #5

ydah opened this issue Aug 2, 2022 · 1 comment
Labels

Comments

@ydah
Copy link
Member

ydah commented Aug 2, 2022

original issue: rubocop/rubocop-rspec#1342 (comment)

# bad
expect(find('input').value).to eq('foobar')
# good
expect(page).to have_field(with: 'foobar')
@dmytro-savochkin
Copy link

I would LOVE this!
However I understand it might be pretty hard to implement, especially if not limiting to just .value -> have_field. It can be also .text -> have_content for example (and quite a few others?).

@pirj pirj transferred this issue from rubocop/rubocop-rspec Dec 29, 2022
@ydah ydah added the cop label Feb 16, 2023
@ydah ydah changed the title Cop idea: like a RSpec/Capybara/FindElementValueEq cop Cop idea: like a Capybara/FindElementValueEq cop Mar 20, 2023
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