diff --git a/app/components/check_records/navigation_component.html.erb b/app/components/check_records/navigation_component.html.erb index e49bfa39..d1f302d6 100644 --- a/app/components/check_records/navigation_component.html.erb +++ b/app/components/check_records/navigation_component.html.erb @@ -1,15 +1,68 @@ -<%= - govuk_header(service_name: t("check_records_service.name"), service_url: check_records_root_path) do |header| - if request.path != check_records_not_authorised_path - if current_dsi_user - if FeatureFlags::FeatureFlag.active?(:bulk_search) - header.with_navigation_item(href: check_records_search_path, text: "Find a record") - header.with_navigation_item(href: new_check_records_bulk_search_path, text: "Find multiple records") - end - header.with_navigation_item(href: check_records_dsi_sign_out_path(id_token_hint: session[:id_token]), text: "Sign out") - elsif request.path != check_records_sign_in_path - header.with_navigation_item(href: check_records_sign_in_path, text: "Sign in") - end - end - end -%> +<% if request.path != check_records_not_authorised_path %> +
+
+ +
+
+
+
+
+ +
+
+
+<% end %> \ No newline at end of file diff --git a/spec/system/check_records/unauthorised_user_signs_in_spec.rb b/spec/system/check_records/unauthorised_user_signs_in_spec.rb index 991e2156..39c20aeb 100644 --- a/spec/system/check_records/unauthorised_user_signs_in_spec.rb +++ b/spec/system/check_records/unauthorised_user_signs_in_spec.rb @@ -19,9 +19,7 @@ def then_i_am_redirected_to_the_unauthorised_page expect(page).to have_content("You cannot use the DfE Sign-in account for Test Org to check a teacher’s record") expect(page).to have_link("sign out and start again", href: "/check-records/auth/dfe/sign-out?id_token_hint=abc123") - within(".govuk-header__content") do - expect(page).not_to have_link("Sign in") - expect(page).not_to have_link("Sign out") - end + expect(page).not_to have_link("Sign in") + expect(page).not_to have_link("Sign out") end end diff --git a/spec/system/check_records/user_accepts_terms_and_conditions_spec.rb b/spec/system/check_records/user_accepts_terms_and_conditions_spec.rb index 36065b69..e10cbb73 100644 --- a/spec/system/check_records/user_accepts_terms_and_conditions_spec.rb +++ b/spec/system/check_records/user_accepts_terms_and_conditions_spec.rb @@ -30,7 +30,7 @@ private def then_i_am_signed_in - within("header") { expect(page).to have_content "Sign out" } + within("#navigation") { expect(page).to have_content "Sign out" } expect(DsiUser.count).to eq 1 expect(DsiUserSession.count).to eq 1 end diff --git a/spec/system/check_records/user_belonging_to_closed_org_signs_in_spec.rb b/spec/system/check_records/user_belonging_to_closed_org_signs_in_spec.rb index 55f48715..8eb43f6a 100644 --- a/spec/system/check_records/user_belonging_to_closed_org_signs_in_spec.rb +++ b/spec/system/check_records/user_belonging_to_closed_org_signs_in_spec.rb @@ -19,10 +19,5 @@ def then_i_am_not_authorised "You cannot use the DfE Sign-in account for Test Org to check a teacher’s record" ) expect(page).to have_link("sign out and start again", href: "/check-records/auth/dfe/sign-out?id_token_hint=abc123") - - within(".govuk-header__content") do - expect(page).not_to have_link("Sign in") - expect(page).not_to have_link("Sign out") - end end end diff --git a/spec/system/check_records/user_signs_in_spec.rb b/spec/system/check_records/user_signs_in_spec.rb index fa67bd53..61b7d301 100644 --- a/spec/system/check_records/user_signs_in_spec.rb +++ b/spec/system/check_records/user_signs_in_spec.rb @@ -15,7 +15,7 @@ private def then_i_am_signed_in - within("header") { expect(page).to have_content "Sign out" } + within("#navigation") { expect(page).to have_content "Sign out" } expect(DsiUser.count).to eq 1 expect(DsiUserSession.count).to eq 1 end diff --git a/spec/system/support/unauthorised_user_signs_in_spec.rb b/spec/system/support/unauthorised_user_signs_in_spec.rb index 9bc5a0a1..7c4ca952 100644 --- a/spec/system/support/unauthorised_user_signs_in_spec.rb +++ b/spec/system/support/unauthorised_user_signs_in_spec.rb @@ -26,12 +26,10 @@ def then_i_am_redirected_to_the_unauthorised_page expect(page).to have_content("You cannot use the DfE Sign-in account for Test Org to check a teacher’s record") expect(page).to have_link("sign out and start again", href: "/check-records/auth/dfe/sign-out?id_token_hint=abc123") - within(".govuk-header__content") do - expect(page).not_to have_link("Features") - expect(page).not_to have_link("Staff") - expect(page).not_to have_link("Sign in") - expect(page).not_to have_link("Sign out") - end + expect(page).not_to have_link("Features") + expect(page).not_to have_link("Staff") + expect(page).not_to have_link("Sign in") + expect(page).not_to have_link("Sign out") end def when_i_visit_the_support_interface