Browse Source

checking the back functionality for returning to check answers from primary group page

pull/671/head
JG 3 years ago
parent
commit
33697d4b93
  1. 27
      spec/features/schemes_spec.rb

27
spec/features/schemes_spec.rb

@ -399,15 +399,28 @@ RSpec.describe "Schemes scheme Features" do
end end
end end
it "allows changing primary-client-group question" do context "changing primary client group" do
click_link("Change", href: "/schemes/#{scheme.id}/primary-client-group?check_answers=true") it "allows changing primary-client-group question" do
expect(page).to have_current_path("/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")
choose "Older people with support needs" choose "Older people with support needs"
click_button "Save and continue" click_button "Save and continue"
expect(page).to have_current_path("/schemes/#{scheme.id}/check-answers") expect(page).to have_current_path("/schemes/#{scheme.id}/check-answers")
expect(page).to have_content "Older people with support needs" expect(page).to have_content "Older people with support needs"
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 end
it "allows changing secondary-client-group question" do it "allows changing secondary-client-group question" do

Loading…
Cancel
Save