Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Edge (Unreleased)

## 2.22.0 (2025-03-10)

- Add `Capybara/AmbiguousClick` cop and make soft-deprecated `Capybara/ClickLinkOrButtonStyle` cop. If you want to use `EnforcedStyle: strict`, use `Capybara/AmbiguousClick` cop instead. ([@ydah])
- Add new `Capybara/FindAllFirst` cop. ([@ydah])
- Add a new `Capybara/NegationMatcherAfterVisit` cop. ([@ydah])
Expand Down
8 changes: 4 additions & 4 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ Capybara:
Capybara/AmbiguousClick:
Description: Specify the exact target to click on.
Enabled: false
VersionAdded: "<<next>>"
VersionAdded: '2.22'
Reference: https://www.rubydoc.info/gems/rubocop-capybara/RuboCop/Cop/Capybara/AmbiguousClick

Capybara/ClickLinkOrButtonStyle:
Description: Checks for methods of button or link clicks.
Enabled: false
VersionAdded: '2.19'
VersionChanged: "<<next>>"
VersionChanged: '2.22'
EnforcedStyle: link_or_button
SupportedStyles:
- link_or_button
Expand All @@ -36,7 +36,7 @@ Capybara/CurrentPathExpectation:
Capybara/FindAllFirst:
Description: Enforces use of `first` instead of `all` with `first` or `[0]`.
Enabled: pending
VersionAdded: "<<next>>"
VersionAdded: '2.22'
Reference: https://www.rubydoc.info/gems/rubocop-capybara/RuboCop/Cop/Capybara/FindAllFirst

Capybara/MatchStyle:
Expand All @@ -59,7 +59,7 @@ Capybara/NegationMatcher:
Capybara/NegationMatcherAfterVisit:
Description: Do not allow negative matchers to be used immediately after `visit`.
Enabled: pending
VersionAdded: "<<next>>"
VersionAdded: '2.22'
Reference: https://www.rubydoc.info/gems/rubocop-capybara/RuboCop/Cop/Capybara/NegationMatcherAfterVisit

Capybara/RedundantWithinFind:
Expand Down
2 changes: 1 addition & 1 deletion docs/antora.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: rubocop-capybara
title: RuboCop Capybara
version: ~
version: '2.22'
nav:
- modules/ROOT/nav.adoc
8 changes: 4 additions & 4 deletions docs/modules/ROOT/pages/cops_capybara.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
| Disabled
| Yes
| No
| <<next>>
| 2.22
| -
|===

Expand Down Expand Up @@ -53,7 +53,7 @@ click_button('foo')
| Yes
| No
| 2.19
| <<next>>
| 2.22
|===

Checks for methods of button or link clicks.
Expand Down Expand Up @@ -175,7 +175,7 @@ expect(page).to match(variable)
| Pending
| Yes
| Always
| <<next>>
| 2.22
| -
|===

Expand Down Expand Up @@ -333,7 +333,7 @@ expect(page).not_to have_css('a')
| Pending
| Yes
| No
| <<next>>
| 2.22
| -
|===

Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/capybara/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module RuboCop
module Capybara
# Version information for the Capybara RuboCop plugin.
module Version
STRING = '2.21.0'
STRING = '2.22.0'
end
end
end
Loading