Ensure pages have contextual navigation

It would be good to know if it breaks!
I didn't think it worth updating every single settings specs to test for this...
But I've tested on the 'general settings' page because this is the default page when clicking on 'Configuration'.
This commit is contained in:
David Cook
2025-02-12 15:01:51 +11:00
parent b2eec79a29
commit f55cdcdd34
3 changed files with 7 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
dmin= render partial: 'spree/admin/shared/configuration_menu'
= render partial: 'spree/admin/shared/configuration_menu'
- content_for :page_title do
= t("spree.states")

View File

@@ -17,6 +17,9 @@ RSpec.describe "General Settings" do
expect(page).to have_content("General Settings")
expect(find("#site_name").value).to eq("OFN Demo Site")
expect(find("#site_url").value).to eq("demo.openfoodnetwork.org")
# and it has contextual navigation
expect(page).to have_link "General Settings"
end
end

View File

@@ -35,6 +35,9 @@ RSpec.describe "States" do
it "should correctly display the states" do
visit spree.admin_country_states_path(country)
expect(page).to have_content(state.name)
# and it has contextual navigation
expect(page).to have_link "General Settings"
end
end