From 1134a68dcb677210f2d1f5d59586ff9b37f23a9d Mon Sep 17 00:00:00 2001 From: JG Date: Mon, 27 Jun 2022 11:58:34 +0100 Subject: [PATCH] checking the back functionality for primary gourp --- 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 a10061afd..5bf51bb37 100644 --- a/spec/features/schemes_spec.rb +++ b/spec/features/schemes_spec.rb @@ -289,6 +289,17 @@ RSpec.describe "Schemes scheme Features" do expect(page).to have_content "Does this scheme provide for another client group?" end + context "when I press the back button" do + before do + click_link "Back" + end + + it "lets me select the primary client group" do + expect(page).to have_current_path("/schemes/#{scheme.id}/primary-client-group") + expect(page).to have_content "What client group is this scheme intended for?" + end + end + context "when I confirm the secondary group" do before do choose "Yes"