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. 13
      spec/features/schemes_spec.rb

13
spec/features/schemes_spec.rb

@ -399,6 +399,7 @@ RSpec.describe "Schemes scheme Features" do
end
end
context "changing primary client group" do
it "allows changing primary-client-group question" do
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")
@ -410,6 +411,18 @@ RSpec.describe "Schemes scheme Features" do
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
it "allows changing secondary-client-group question" do
click_link("Change", href: "/schemes/#{scheme.id}/secondary-client-group?check_answers=true")
expect(page).to have_current_path("/schemes/#{scheme.id}/secondary-client-group?check_answers=true")

Loading…
Cancel
Save