diff --git a/app/views/locations/index.html.erb b/app/views/locations/index.html.erb index f8b02397d..d65d5930a 100644 --- a/app/views/locations/index.html.erb +++ b/app/views/locations/index.html.erb @@ -52,5 +52,6 @@ <% end %> <% end %> <% end %> +<%= govuk_button_link_to "Add a location", new_location_path(id: @scheme.id), secondary: true %> <%== render partial: "pagy/nav", locals: { pagy: @pagy, item_name: "locations" } %> diff --git a/spec/features/schemes_spec.rb b/spec/features/schemes_spec.rb index f3495dc35..763edd66e 100644 --- a/spec/features/schemes_spec.rb +++ b/spec/features/schemes_spec.rb @@ -243,6 +243,16 @@ RSpec.describe "Schemes scheme Features" do end end + context "when the user clicks add location" do + before do + click_link("Locations") + click_link("Add a location") + end + + it "shows the new location form" do + expect(page).to have_content("Add a location to this scheme") + end + end end end end