Closed tagliala closed 8 months ago
# No offenses: name with multiple `[]` have_css("input[name='post[author_attributes][first_name]']")
CssSelector.attributes
detects input[name='foo[bar][baz]']
as a nested hash of attributres
selector
"input[name='foo[bar][baz]']"
(byebug) CssSelector.attributes(selector)
{"name"=>"'foo[bar'", "baz]'"=>nil}
# Offense: Capybara/SpecificMatcher
have_css("input[type=submit]")
# No offenses detected (`value` attribute, should be replaceable with `with`)
have_css("input[type=submit][value='x']")
The "with" option is intended for specifying text content, so it may not be interchangeable with the "value" attribute as they are not equivalent, don't you think?
The "with" option is intended for specifying text content, so it may not be interchangeable with the "value" attribute as they are not equivalent, don't you think?
Thanks for the clarification, not aware of this difference
Hello,
apologies if this is a duplicate. I've searched but I couldn't find anything relevant
In the efforts of adding RuboCop Capybara to activeadmin at activeadmin/activeadmin#8025
we've noticed that some offenses are not being detected
Quoting from: https://github.com/activeadmin/activeadmin/pull/8025#issuecomment-1763293243
Don't know if these offenses can be detected, but I thought I should report the above