diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index c8845eb20..511be0722 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -37,6 +37,11 @@ href: services_path, active: current_page?(services_path), } + + menu_option << { + text: "Switch app", + href: Plek.find("signon"), + } %> <%= render "govuk_publishing_components/components/layout_header", { diff --git a/spec/system/main_menu_spec.rb b/spec/system/main_menu_spec.rb index 2a4461d5a..ec9c9bf5f 100644 --- a/spec/system/main_menu_spec.rb +++ b/spec/system/main_menu_spec.rb @@ -9,13 +9,14 @@ stub_organisations_api_has_organisations_with_bodies([{ "title" => "Department of Randomness", "details" => { "slug" => "random-department" } }]) end - it "shows only the Services menu item" do + it "shows only the Services/Switch app menu items" do visit "/" within(".govuk-header__container") do - expect(page).not_to have_content("Broken Links") - expect(page).not_to have_content("Councils") - expect(page).to have_content("Services") + expect(page).not_to have_link("Broken Links") + expect(page).not_to have_link("Councils") + expect(page).to have_link("Services") + expect(page).to have_link("Switch app") end end end @@ -23,13 +24,14 @@ context "as a GDS Editor" do before { login_as_gds_editor } - it "shows all three menu options" do + it "shows all four menu options" do visit "/" within(".govuk-header__container") do - expect(page).to have_content("Broken Links") - expect(page).to have_content("Councils") - expect(page).to have_content("Services") + expect(page).to have_link("Broken Links") + expect(page).to have_link("Councils") + expect(page).to have_link("Services") + expect(page).to have_link("Switch app") end end end