Capybara
Capybara/AmbiguousClick
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed |
|---|---|---|---|---|
Disabled |
Yes |
No |
2.22 |
- |
Specify the exact target to click on.
In projects where accessibility needs to be considered, it is crucial to specify the click target precisely.
Capybara/AssertStyle
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed |
|---|---|---|---|---|
Enabled |
Yes |
Always |
2.23 |
3.0 |
Checks for usage of deprecated assert style method.
Capybara/FindAllFirst
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed |
|---|---|---|---|---|
Enabled |
Yes |
Always (Unsafe) |
2.22 |
3.0 |
Enforces use of first instead of all with first or [0].
Safety
This cop’s autocorrection is unsafe because all returns a
Capybara::Result (an enumerable collection), while first
returns a single Capybara::Node::Element. Replacing all
with first may break code that depends on the return value
being a collection (e.g. calling .each on the result).
Capybara/RedundantWithinFind
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed |
|---|---|---|---|---|
Enabled |
Yes |
Always |
2.20 |
3.0 |
Checks for redundant within find(…) calls.
Capybara/SpecificActions
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed |
|---|---|---|---|---|
Enabled |
Yes |
No |
2.14 |
3.0 |
Checks for there is a more specific actions offered by Capybara.