Add and apply Capybara/VisibilityMatcher rule

This rule was added in rubocop-rspec 1.39.0. The `visible: false` option
is equivalent to `visible: :all`, but we generally use it meaning
`visible: :hidden` for positive expectations and `visible: :all` for
negative expectations.

The only exceptations are tests where we count the number of map icons
present. I'm assuming in this case we care about the number of map icons
independently on whether they are currently shown in the map, so I'm
keeping the `visible: :all` behavior in this case.
This commit is contained in:
Javi Martín
2020-10-13 18:29:37 +02:00
parent 6088334dbf
commit dd7d6440ec
12 changed files with 35 additions and 30 deletions

View File

@@ -26,6 +26,9 @@ Capybara/FeatureMethods:
- scenario
- xscenario
Capybara/VisibilityMatcher:
Enabled: true
FactoryBot/AttributeDefinedStatically:
Enabled: true