From bf0724b6d7005303e71645fce24c084d2f31e817 Mon Sep 17 00:00:00 2001 From: Darius Dzien Date: Fri, 10 May 2024 11:48:22 -0500 Subject: [PATCH 1/4] SRCH-5151 Hide old SERP settings in Super Admin and Admin Center --- app/controllers/admin/affiliates_controller.rb | 3 +-- spec/controllers/admin/affiliates_controller_spec.rb | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/admin/affiliates_controller.rb b/app/controllers/admin/affiliates_controller.rb index fd74ea6f60..c56357fb5a 100644 --- a/app/controllers/admin/affiliates_controller.rb +++ b/app/controllers/admin/affiliates_controller.rb @@ -123,8 +123,7 @@ class Admin::AffiliatesController < Admin::AdminController end config.update.columns.add_subgroup 'Display Settings' do |name_group| - display_columns = %i[use_redesigned_results_page - show_search_filter_settings + display_columns = %i[show_search_filter_settings looking_for_government_services footer_fragment header_tagline_font_family diff --git a/spec/controllers/admin/affiliates_controller_spec.rb b/spec/controllers/admin/affiliates_controller_spec.rb index afacc12689..c94a411da1 100644 --- a/spec/controllers/admin/affiliates_controller_spec.rb +++ b/spec/controllers/admin/affiliates_controller_spec.rb @@ -98,7 +98,7 @@ describe 'Display Settings subgroup' do let(:display_columns) do - %i[ use_redesigned_results_page footer_fragment header_tagline_font_family + %i[ footer_fragment header_tagline_font_family header_tagline_font_size header_tagline_font_style no_results_pointer page_one_more_results_pointer navigation_dropdown_label related_sites_dropdown_label looking_for_government_services show_search_filter_settings ] From a8dacbe35ecaeda4c5345d7a803be88c7fdd0897 Mon Sep 17 00:00:00 2001 From: Darius Dzien Date: Fri, 10 May 2024 11:49:40 -0500 Subject: [PATCH 2/4] Update view --- app/views/sites/shared/_manage_display_sub_nav.html.haml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/views/sites/shared/_manage_display_sub_nav.html.haml b/app/views/sites/shared/_manage_display_sub_nav.html.haml index d9919fc92a..b3d66069b9 100644 --- a/app/views/sites/shared/_manage_display_sub_nav.html.haml +++ b/app/views/sites/shared/_manage_display_sub_nav.html.haml @@ -4,9 +4,5 @@ %li{ site_nav_css_class_hash('displays') }= link_to 'Display Overview', edit_site_display_path(@site) %li{ site_nav_css_class_hash('visual_designs') }= link_to t('sites.visual_designs.edit.visual_design', scope: 'admin_center'), edit_site_visual_design_path(@site) - - unless @site.use_redesigned_results_page - %li{ site_nav_css_class_hash('font_and_colors') }= link_to 'Legacy Font & Colors', edit_site_font_and_colors_path(@site) - %li{ site_nav_css_class_hash('image_assets') }= link_to 'Legacy Image Assets', edit_site_image_assets_path(@site) - %li{ site_nav_css_class_hash('header_and_footers') }= link_to 'Legacy Header & Footer', edit_site_header_and_footer_path(@site) %li{ site_nav_css_class_hash('no_results_pages') }= link_to 'No Results Page', edit_site_no_results_pages_path(@site) %li{ site_nav_css_class_hash('alerts') }= link_to 'Search Page Alert', edit_site_alert_path(@site) From 23d5755d2f638cbbe86c20055cbb5e87cf12b512 Mon Sep 17 00:00:00 2001 From: Darius Dzien Date: Fri, 10 May 2024 11:59:09 -0500 Subject: [PATCH 3/4] Remove preview warning and update tests --- app/views/sites/visual_designs/edit.html.haml | 3 --- config/locales/admin_center/en.yml | 4 ---- features/admin_center_manage_display.feature | 17 ----------------- 3 files changed, 24 deletions(-) diff --git a/app/views/sites/visual_designs/edit.html.haml b/app/views/sites/visual_designs/edit.html.haml index 6dfbe28650..263bf44029 100644 --- a/app/views/sites/visual_designs/edit.html.haml +++ b/app/views/sites/visual_designs/edit.html.haml @@ -13,9 +13,6 @@ = render_flash_message = render_error_messages(@site) - - unless @site.use_redesigned_results_page - %p= t('admin_center.sites.visual_designs.edit.preview_warning', email: mail_to(SUPPORT_EMAIL_ADDRESS)).html_safe - %ul.navigation_tabs %li %h3 diff --git a/config/locales/admin_center/en.yml b/config/locales/admin_center/en.yml index 5017f6ee25..5dfaffbefa 100644 --- a/config/locales/admin_center/en.yml +++ b/config/locales/admin_center/en.yml @@ -42,10 +42,6 @@ en: visual_designs: edit: preview_button: Preview Redesigned Display - preview_warning: | - These settings are for preview purposes only. If you would like to use the new display layout for your - results, contact %{email} and we will enable it for you. By the end of March 2024, all sites still using - the old layout will be updated to the new layout. sections: fonts_and_colors: Fonts & Colors header_and_footer: Header & Footer diff --git a/features/admin_center_manage_display.feature b/features/admin_center_manage_display.feature index 40e070c546..e6cb936fa9 100644 --- a/features/admin_center_manage_display.feature +++ b/features/admin_center_manage_display.feature @@ -460,7 +460,6 @@ Feature: Manage Display And I am logged in with email "john@agency.gov" When I go to the agency.gov's Visual Design page Then I should see "Visual design (new)" - And the page body should not contain "These settings are for preview purposes only." And I should see "Fonts & Colors" within the navigation tabs And I should see "Results Format" within the navigation tabs And I should see "Image Assets" within the navigation tabs @@ -641,7 +640,6 @@ Feature: Manage Display And I am logged in with email "john@agency.gov" When I go to the agency.gov's Visual Design page Then I should see "Visual design (new)" - And the page body should contain "These settings are for preview purposes only." Scenario: Display sub navigation links when "Use Redesigned Results Page" is true Given the following Affiliates exist: @@ -653,18 +651,3 @@ Feature: Manage Display And I should not see a link to "Legacy Font & Colors" in the active site sub navigation And I should not see a link to "Legacy Image Assets" in the active site sub navigation And I should not see a link to "Legacy Header & Footer" in the active site sub navigation - - Scenario: Display sub navigation links when "Use Redesigned Results Page" is false - Given the following Affiliates exist: - | display_name | name | contact_email | first_name | last_name | - | agency site | agency.gov | john@agency.gov | John | Bar | - And I am logged in with email "john@agency.gov" - When I go to the agency.gov's Manage Display page - Then I should see "Visual design (new)" - And the page body should not contain "These settings are for preview purposes only." - And I follow "Legacy Font & Colors" - And I should see a link to "Legacy Font & Colors" in the active site sub navigation - And I follow "Legacy Image Assets" - And I should see a link to "Legacy Image Assets" in the active site sub navigation - And I follow "Legacy Header & Footer" - And I should see a link to "Legacy Header & Footer" in the active site sub navigation From 3c3f723141fbd4dfa63cb495c27249b2a8828d22 Mon Sep 17 00:00:00 2001 From: Darius Dzien Date: Fri, 10 May 2024 12:25:25 -0500 Subject: [PATCH 4/4] Remove old Cucumber test --- features/admin.feature | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/features/admin.feature b/features/admin.feature index 4fd853668d..7c301d0afe 100644 --- a/features/admin.feature +++ b/features/admin.feature @@ -59,25 +59,6 @@ Feature: Administration And I press "Update" Then I should see "New Name" - @javascript - Scenario: Editing an affiliate's Display Settings as an admin - Given the following Affiliates exist: - | display_name | name | contact_email | first_name | last_name | website | use_redesigned_results_page | - | agency site | agency.gov | one@foo.gov | One | Foo | http://beta.agency.gov | false | - When I go to the admin sites page - When I follow "Edit" within the first scaffold row - Then I should see "Settings (Show)" - And I should see "Enable/disable Settings (Show)" - And I should see "Display Settings (Show)" - And I should see "Analytics-Tracking Code (Show)" - When I follow "Show" within the third subsection row - And I check "Use redesigned results page" - And I press "Update" - Then I should see "agency site" - When I follow "Edit" within the first scaffold row - When I follow "Show" within the third subsection row - And the "Use redesigned results page" checkbox should be checked - Scenario: Visiting the users admin page as an admin When I go to the admin home page And I follow "Users" within ".main"