From 99e52c024f7702c73b75b4e574549df37488ad06 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Tue, 9 Nov 2021 11:29:04 +0000 Subject: [PATCH] Use capybara matcher for less flakiness --- spec/features/case_log_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/features/case_log_spec.rb b/spec/features/case_log_spec.rb index 160bb883b..555799966 100644 --- a/spec/features/case_log_spec.rb +++ b/spec/features/case_log_spec.rb @@ -225,6 +225,7 @@ RSpec.describe "Test Features" do choose("case-log-incfreq-weekly-field", allow_label_click: true) click_button("Save and continue") click_link(text: "Back") + expect(page).to have_link(text: "Back") click_link(text: "Back") expect(page).to have_current_path("/case_logs") end @@ -431,7 +432,7 @@ RSpec.describe "Test Features" do fill_in("case-log-earnings-field", with: income_under_soft_limit) click_button("Save and continue") click_link(text: "Back") - expect(page).not_to have_content("Are you sure this is correct?") + expect(page).to have_no_content("Are you sure this is correct?") end it "does not clear the confirmation question if the page is returned to using the back button and the amount is still over the soft limit", js: true do