From a52b0895c66de5590dc42b8a7ef7cdcb1841c326 Mon Sep 17 00:00:00 2001 From: JG Date: Wed, 22 Jun 2022 16:20:57 +0100 Subject: [PATCH] removed gem and further tests --- Gemfile | 2 -- spec/features/schemes_spec.rb | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index d88dd2af8..12d0bbdff 100644 --- a/Gemfile +++ b/Gemfile @@ -28,8 +28,6 @@ gem "notifications-ruby-client" # A modest javascript framework for the html you already have gem "stimulus-rails" # Spreadsheet parsing -gem "securerandom" - gem "roo" # Json Schema gem "json-schema" diff --git a/spec/features/schemes_spec.rb b/spec/features/schemes_spec.rb index 79d9dbbe2..c3f399ead 100644 --- a/spec/features/schemes_spec.rb +++ b/spec/features/schemes_spec.rb @@ -257,6 +257,36 @@ RSpec.describe "Schemes scheme Features" do it "lets me fill in the scheme details" do expect(page).to have_content "What client group is this scheme intended for?" end + + context "when I select primary client group details" do + before do + choose "Homeless families with support needs" + end + + it "lets me confirm if I want to select secondary group details" do + expect(page).to have_content "Does this scheme provide for another client group?" + end + + context "when I confirm the secondary group" do + before do + choose "Yes" + end + + it "lets me select secondary client group detail" do + expect(page).to have_content "Does this scheme provide for another client group?" + end + + context "when I select the secondary group" do + before do + choose "Homeless families with support needs" + end + + it "lets me select secondary client group detail" do + expect(page).to have_content "Does this scheme provide for another client group?" + end + end + end + end end end end