Browse Source

WIP - adding schemes question to setup

Freezing work on this currently as we're refactoring how the setup section
is handled and most of the work on this ticket will be within the setup
section. Doing this now would invovle having to redo work once that setup is
complete so just adding this WIP in the meantime to return to this after
the refactoring is done.
CLDC-1249-data-inputters-can-select-supported-housing-schemes
Dushan Despotovic 3 years ago
parent
commit
db6cd7d3f3
  1. 20
      config/forms/2021_2022.json
  2. 11
      spec/features/schemes_spec.rb

20
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": "",

11
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

Loading…
Cancel
Save