Browse Source

testing clickable locations link under correct context

pull/704/head
JG 3 years ago
parent
commit
67d0306c92
  1. 22
      spec/features/schemes_spec.rb

22
spec/features/schemes_spec.rb

@ -412,6 +412,17 @@ RSpec.describe "Schemes scheme Features" do
expect(page).to have_content "Check your changes before creating this scheme"
end
context "when I select to view locations" do
before do
click_link "Locations"
end
it "displays information about locations" do
expect(page).to have_content "Locations"
expect(page).to have_content "#{scheme.locations.count} locations"
end
end
context "and I select to create a scheme" do
before do
click_link "Create scheme"
@ -443,17 +454,6 @@ RSpec.describe "Schemes scheme Features" do
end
end
end
context "when I select to view locations" do
before do
click_link "/schemes/#{scheme.id}/check-answers#locations"
end
it "displays information about locations" do
expect(page).to have_content "Locations"
expect(page).to have_content "#{scheme.locations.count} locations"
end
end
end
context "when changing answers" do

Loading…
Cancel
Save