Browse Source

Add failing spec

pull/72/head
baarkerlounger 4 years ago
parent
commit
d3135622d1
  1. 12
      spec/features/case_log_spec.rb

12
spec/features/case_log_spec.rb

@ -388,6 +388,7 @@ RSpec.describe "Test Features" do
fill_in("case-log-net-income-field", with: income_over_soft_limit)
choose("case-log-net-income-frequency-weekly-field", allow_label_click: true)
click_button("Save and continue")
expect(page).not_to have_content("For net incomes that fall outside the expected range you must confirm they're correct")
check("case-log-override-net-income-validation-override-net-income-validation-field", allow_label_click: true)
click_button("Save and continue")
expect(page).to have_current_path("/case_logs/#{case_log.id}/net_income_uc_proportion")
@ -402,6 +403,17 @@ RSpec.describe "Test Features" do
click_button("Save and continue")
expect(page).to have_current_path("/case_logs/#{case_log.id}/net_income_uc_proportion")
end
it "clears the confirmation question if the page is returned to using the back button" do
visit("/case_logs/#{case_log.id}/net_income")
fill_in("case-log-net-income-field", with: income_over_soft_limit)
choose("case-log-net-income-frequency-weekly-field", allow_label_click: true)
click_button("Save and continue")
fill_in("case-log-net-income-field", with: income_under_soft_limit)
click_button("Save and continue")
click_link(text: "Back")
expect(page).not_to have_content("For net incomes that fall outside the expected range you must confirm they're correct")
end
end
end

Loading…
Cancel
Save