From baac6473c529636d16628e4e0f1804ca550b8fac Mon Sep 17 00:00:00 2001 From: Ivan Kuchin Date: Wed, 13 May 2026 16:12:06 +0200 Subject: [PATCH] use `to have_no` instead of `not_to have` in capybara --- spec/support/flash/expectations.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/support/flash/expectations.rb b/spec/support/flash/expectations.rb index 98f295b7cf3..5521c8ba189 100644 --- a/spec/support/flash/expectations.rb +++ b/spec/support/flash/expectations.rb @@ -24,7 +24,7 @@ module Flash def expect_no_flash(type: :success, message: nil, exact_message: nil, wait: 10) if type.nil? - expect(page).not_to have_test_selector("op-primer-flash-message") + expect(page).to have_no_test_selector("op-primer-flash-message") else expected_css = expected_flash_css(type) expect(page).to have_no_css(expected_css, wait:, **{ text: message, exact_text: exact_message }.compact)