mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-06 22:36:07 +00:00
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:
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user