|
|
@ -365,12 +365,16 @@ RSpec.describe "Schemes scheme Features" do |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
context "when changing answers" do |
|
|
|
context "when changing answers" do |
|
|
|
|
|
|
|
context "changing details" do |
|
|
|
|
|
|
|
before do |
|
|
|
|
|
|
|
click_link("Change", href: "/schemes/#{scheme.id}/details?check_answers=true", match: :first) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it "displays change links" do |
|
|
|
it "displays change links" do |
|
|
|
assert_selector "a", text: "Change", count: 12 |
|
|
|
assert_selector "a", text: "Change", count: 12 |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it "allows changing details questions" do |
|
|
|
it "allows changing details questions" do |
|
|
|
click_link("Change", href: "/schemes/#{scheme.id}/details?check_answers=true", match: :first) |
|
|
|
|
|
|
|
expect(page).to have_current_path("/schemes/#{scheme.id}/details?check_answers=true") |
|
|
|
expect(page).to have_current_path("/schemes/#{scheme.id}/details?check_answers=true") |
|
|
|
|
|
|
|
|
|
|
|
fill_in "Scheme name", with: "Example" |
|
|
|
fill_in "Scheme name", with: "Example" |
|
|
@ -383,6 +387,18 @@ RSpec.describe "Schemes scheme Features" do |
|
|
|
expect(page).to have_content "Yes – registered care home providing nursing care" |
|
|
|
expect(page).to have_content "Yes – registered care home providing nursing care" |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
context "when I press the back button" do |
|
|
|
|
|
|
|
before do |
|
|
|
|
|
|
|
click_link "Back" |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "lets me select the support answers" do |
|
|
|
|
|
|
|
expect(page).to have_current_path("/schemes/#{scheme.id}/check-answers") |
|
|
|
|
|
|
|
expect(page).to have_content "Check your changes before updating this scheme" |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it "allows changing primary-client-group question" do |
|
|
|
it "allows changing primary-client-group question" do |
|
|
|
click_link("Change", href: "/schemes/#{scheme.id}/primary-client-group?check_answers=true") |
|
|
|
click_link("Change", href: "/schemes/#{scheme.id}/primary-client-group?check_answers=true") |
|
|
|
expect(page).to have_current_path("/schemes/#{scheme.id}/primary-client-group?check_answers=true") |
|
|
|
expect(page).to have_current_path("/schemes/#{scheme.id}/primary-client-group?check_answers=true") |
|
|
|