From e20877eabad0a0875ea888f14543fcc73f492361 Mon Sep 17 00:00:00 2001 From: Colby Swandale <996377+colby-swandale@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:55:16 +1100 Subject: [PATCH] Replace has_content with assert_text --- test/system/webauthn_verification_test.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/system/webauthn_verification_test.rb b/test/system/webauthn_verification_test.rb index 7f756a0c4f0..629ef9bd719 100644 --- a/test/system/webauthn_verification_test.rb +++ b/test/system/webauthn_verification_test.rb @@ -39,7 +39,7 @@ class WebAuthnVerificationTest < ApplicationSystemTestCase Browser::Chrome.any_instance.stubs(:safari?).returns true - assert page.has_content?("Success!") + assert_text "Success!" assert_current_path(successful_verification_webauthn_verification_path) assert_link_is_expired @@ -58,8 +58,8 @@ class WebAuthnVerificationTest < ApplicationSystemTestCase assert redirect_to("http://localhost:#{@port}?code=#{@verification.otp}") assert redirect_to(failed_verification_webauthn_verification_path) - assert page.has_content?("Failed to fetch") - assert page.has_content?("Please close this browser and try again.") + assert_text "Failed to fetch" + assert_text "Please close this browser and try again." assert_link_is_expired assert_failed_verification_not_found end @@ -91,8 +91,8 @@ class WebAuthnVerificationTest < ApplicationSystemTestCase click_on "Authenticate" assert redirect_to(failed_verification_webauthn_verification_path) - assert page.has_content?("Failed to fetch") - assert page.has_content?("Please close this browser and try again.") + assert_text "Failed to fetch" + assert_text "Please close this browser and try again." assert_link_is_expired assert_failed_verification_not_found end