rubocop-rspec icon indicating copy to clipboard operation
rubocop-rspec copied to clipboard

[RSpec/Capybara/SpecificMatcher] False-positive with pseudo-classes

Open boris-petrov opened this issue 2 years ago • 1 comments

expect(page).to have_selector('button:first-of-type:focus')

This gives a warning but I don't think it's possible to express this with have_button.

cc @ydah

boris-petrov avatar Aug 03 '22 17:08 boris-petrov

Indeed it is. Thank you so much @boris-petrov

I guess we need to consider the cases that cannot be replaced by pseudo-classes. It may take some time, but I will work on it.

ydah avatar Aug 04 '22 02:08 ydah