From 471cfea4a3a076b57c1e2befc41035f7c6c62086 Mon Sep 17 00:00:00 2001 From: JG Date: Mon, 27 Jun 2022 12:02:43 +0100 Subject: [PATCH] checking the back functionality for support answers --- spec/features/schemes_spec.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spec/features/schemes_spec.rb b/spec/features/schemes_spec.rb index b3ea1a39b..9c02040a7 100644 --- a/spec/features/schemes_spec.rb +++ b/spec/features/schemes_spec.rb @@ -353,6 +353,17 @@ RSpec.describe "Schemes scheme Features" do expect(page).to have_content "Check your changes before updating this scheme" 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}/support") + expect(page).to have_content "What support does this scheme provide?" + end + end + context "when changing answers" do it "displays change links" do assert_selector "a", text: "Change", count: 12