diff --git a/spec/features/schemes_spec.rb b/spec/features/schemes_spec.rb index 4e6690635..b65e9a4bc 100644 --- a/spec/features/schemes_spec.rb +++ b/spec/features/schemes_spec.rb @@ -399,15 +399,28 @@ RSpec.describe "Schemes scheme Features" do end end - it "allows changing primary-client-group question" do - click_link("Change", href: "/schemes/#{scheme.id}/primary-client-group?check_answers=true") - expect(page).to have_current_path("/schemes/#{scheme.id}/primary-client-group?check_answers=true") + context "changing primary client group" do + it "allows changing primary-client-group question" do + click_link("Change", href: "/schemes/#{scheme.id}/primary-client-group?check_answers=true") + expect(page).to have_current_path("/schemes/#{scheme.id}/primary-client-group?check_answers=true") - choose "Older people with support needs" - click_button "Save and continue" + choose "Older people with support needs" + click_button "Save and continue" - expect(page).to have_current_path("/schemes/#{scheme.id}/check-answers") - expect(page).to have_content "Older people with support needs" + expect(page).to have_current_path("/schemes/#{scheme.id}/check-answers") + expect(page).to have_content "Older people with support needs" + end + + context "when I press the back button" do + before do + click_link "Back" + end + + it "lets me select the support answers" do + expect(page).to have_current_path("/schemes/#{scheme.id}/check-answers") + expect(page).to have_content "Check your changes before updating this scheme" + end + end end it "allows changing secondary-client-group question" do