diff --git a/config/forms/2021_2022.json b/config/forms/2021_2022.json index 8b4a8f983..f7177fc6b 100644 --- a/config/forms/2021_2022.json +++ b/config/forms/2021_2022.json @@ -34,6 +34,26 @@ } ] }, + "schemes": { + "header": "", + "description": "", + "questions": { + "scheme_name": { + "check_answer_label": "Scheme name", + "header": "What scheme is this log for?", + "hint_text": "", + "type": "select", + "answer_options": { + "": "Select an option" + } + } + }, + "depends_on": [ + { + "supported_housing_schemes_enabled?" : true + } + ] + }, "renewal": { "header": "", "description": "", diff --git a/spec/features/schemes_spec.rb b/spec/features/schemes_spec.rb index f772a24c8..7a2354b35 100644 --- a/spec/features/schemes_spec.rb +++ b/spec/features/schemes_spec.rb @@ -132,4 +132,15 @@ RSpec.describe "Supported housing scheme Features" do end end end + + context "when a data provider is setting up their supported housing lettings log" do + let(:case_log) { FactoryBot.create(:case_log, :in_progress) } + let!(:scheme) { FactoryBot.create(:scheme, service_name: "test scheme") } + + it "they are able to select a scheme from a list of schemes their organisation owns or manages" do + visit("#{case_log.id}/scheme") + expect(page).to have_content("What scheme is this log for?") + page.should have_select('scheme-selection', :options => ['test scheme']) + end + end end