Browse Source

checking the back functionality for secondary group

pull/671/head
JG 3 years ago
parent
commit
b84fcaf195
  1. 18
      spec/features/schemes_spec.rb

18
spec/features/schemes_spec.rb

@ -475,8 +475,12 @@ RSpec.describe "Schemes scheme Features" do
end end
end end
it "allows changing secondary-client-group question" do context "changing secondary-client-group question" do
before do
click_link("Change", href: "/schemes/#{scheme.id}/secondary-client-group?check_answers=true") click_link("Change", href: "/schemes/#{scheme.id}/secondary-client-group?check_answers=true")
end
it "allows changing secondary-client-group question" do
expect(page).to have_current_path("/schemes/#{scheme.id}/secondary-client-group?check_answers=true") expect(page).to have_current_path("/schemes/#{scheme.id}/secondary-client-group?check_answers=true")
choose "People at risk of domestic violence" choose "People at risk of domestic violence"
@ -486,6 +490,18 @@ RSpec.describe "Schemes scheme Features" do
expect(page).to have_content "People at risk of domestic violence" expect(page).to have_content "People at risk of domestic violence"
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 support questions" do it "allows changing support questions" do
click_link("Change", href: "/schemes/#{scheme.id}/support?check_answers=true", match: :first) click_link("Change", href: "/schemes/#{scheme.id}/support?check_answers=true", match: :first)
expect(page).to have_current_path("/schemes/#{scheme.id}/support?check_answers=true") expect(page).to have_current_path("/schemes/#{scheme.id}/support?check_answers=true")

Loading…
Cancel
Save