Skip to content

Commit

Permalink
Remove Explore Super Menu AB Test code
Browse files Browse the repository at this point in the history
The test has concluded and all users now get the new header.
  • Loading branch information
chao-xian committed Oct 4, 2021
1 parent 2d333b7 commit ca6d5f6
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 99 deletions.
26 changes: 0 additions & 26 deletions app/controllers/ab_tests/explore_menu_ab_testable.rb

This file was deleted.

15 changes: 0 additions & 15 deletions app/controllers/content_items_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class ContentItemsController < ApplicationController
include Slimmer::Template
include AbTests::ExploreMenuAbTestable
include AbTests::SabPagesTestable

rescue_from GdsApi::HTTPForbidden, with: :error_403
Expand All @@ -13,11 +11,6 @@ class ContentItemsController < ApplicationController
rescue_from PresenterBuilder::SpecialRouteReturned, with: :error_notfound
rescue_from PresenterBuilder::GovernmentReturned, with: :error_notfound

before_action :set_explore_menu_response
after_action :set_slimmer_template

helper_method :explore_menu_variant, :explore_menu_variant_b?

attr_accessor :content_item, :taxonomy_navigation

def show
Expand Down Expand Up @@ -55,14 +48,6 @@ def service_sign_in_options

private

def set_slimmer_template
if explore_menu_variant_b?
slimmer_template "core_layout_explore_header"
else
slimmer_template "core_layout"
end
end

def is_history_page?
@content_item.document_type == "history"
end
Expand Down
2 changes: 0 additions & 2 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
<meta name="description" content="<%= strip_tags(@content_item.description) %>" />
<% end %>

<%= explore_menu_variant.analytics_meta_tag.html_safe %>

<%= yield :extra_head_content %>
</head>
<body>
Expand Down
7 changes: 0 additions & 7 deletions test/controllers/content_items_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
class ContentItemsControllerTest < ActionController::TestCase
include GdsApi::TestHelpers::ContentStore
include GovukAbTesting::MinitestHelpers
include AbTests::ExploreMenuAbTestable

test "routing handles paths with no format or locale" do
assert_routing(
Expand Down Expand Up @@ -367,12 +366,6 @@ class ContentItemsControllerTest < ActionController::TestCase
assert_equal response.headers["Access-Control-Allow-Origin"], "*"
end

test "request for Explore navigational super menu from slimmer" do
content_item = content_store_has_schema_example("case_study", "case_study")
get :show, params: { path: path_for(content_item) }
assert_response_not_modified_for_ab_test(AbTests::ExploreMenuAbTestable)
end

def path_for(content_item, locale = nil)
base_path = content_item["base_path"].sub(/^\//, "")
base_path.gsub!(/\.#{locale}$/, "") if locale
Expand Down
49 changes: 0 additions & 49 deletions test/controllers/explore_ab_test.rb

This file was deleted.

0 comments on commit ca6d5f6

Please sign in to comment.