From 2d4ff8683772f7aacc35e3d321dbfd6aa2f725ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Tue, 29 Aug 2023 19:56:09 +0200 Subject: [PATCH] Add and apply Capybara/NegationMatcher rubocop rule This rule was added in rubocop-rspec 2.14.0. We were already following it most of the time. --- .rubocop.yml | 3 +++ spec/system/comments/budget_investments_valuation_spec.rb | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 252159fda..20182a149 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -483,6 +483,9 @@ RSpec/Capybara/FeatureMethods: - scenario - xscenario +RSpec/Capybara/NegationMatcher: + Enabled: true + RSpec/Capybara/VisibilityMatcher: Enabled: true diff --git a/spec/system/comments/budget_investments_valuation_spec.rb b/spec/system/comments/budget_investments_valuation_spec.rb index 1dc008483..d282f5e1e 100644 --- a/spec/system/comments/budget_investments_valuation_spec.rb +++ b/spec/system/comments/budget_investments_valuation_spec.rb @@ -273,9 +273,9 @@ describe "Internal valuation comments on Budget::Investments" do visit valuation_budget_budget_investment_path(budget, investment) expect(page).to have_css(".comment.comment.comment.comment.comment.comment.comment.comment") - expect(page).to have_no_css(".comment-votes") - expect(page).to have_no_css(".js-flag-actions") - expect(page).to have_no_css(".moderation-actions") + expect(page).not_to have_css(".comment-votes") + expect(page).not_to have_css(".js-flag-actions") + expect(page).not_to have_css(".moderation-actions") end end