|
|
|
|
@ -617,8 +617,6 @@ RSpec.describe "Schemes scheme Features" do
|
|
|
|
|
|
|
|
|
|
context "when changing scheme answers" do |
|
|
|
|
before do |
|
|
|
|
select another_organisation.name, from: "scheme-managing-organisation-id-field" |
|
|
|
|
click_button "Save and continue" |
|
|
|
|
fill_in_and_save_primary_client_group |
|
|
|
|
fill_in_and_save_secondary_client_group_confirmation_yes |
|
|
|
|
fill_in_and_save_secondary_client_group |
|
|
|
|
@ -626,7 +624,7 @@ RSpec.describe "Schemes scheme Features" do
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "displays change links" do |
|
|
|
|
assert_selector "a", text: "Change", count: 13 |
|
|
|
|
assert_selector "a", text: "Change", count: 12 |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "allows changing details questions" do |
|
|
|
|
@ -647,11 +645,11 @@ RSpec.describe "Schemes scheme Features" do
|
|
|
|
|
expect(page).to have_content "Check your changes before creating this scheme" |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "keeps the provider answer when swithing between other provider options" do |
|
|
|
|
click_link("Change", href: "/schemes/#{scheme.id}/details?check_answers=true", match: :first) |
|
|
|
|
choose "Another organisation" |
|
|
|
|
it "keeps the provider answer when switching between other provider options" do |
|
|
|
|
click_link("Change", href: "/schemes/#{scheme.id}/confirm-secondary-client-group?check_answers=true", match: :first) |
|
|
|
|
choose "Yes" |
|
|
|
|
click_button "Save and continue" |
|
|
|
|
expect(page).to have_content(another_organisation.name) |
|
|
|
|
expect(find_field("Offenders and people at risk of offending")).to be_checked |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "does not display the answer if it's changed to the same support provider" do |
|
|
|
|
|