Skip to content

Commit

Permalink
Remove cookieless A/A test
Browse files Browse the repository at this point in the history
This commit removes the cookieless A/A test introduced in #1951.
  • Loading branch information
Karl Baker committed Feb 11, 2021
1 parent 1369f52 commit e2e12d9
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 267 deletions.
116 changes: 0 additions & 116 deletions app/assets/javascripts/modules/cookieless-tracker.js

This file was deleted.

32 changes: 0 additions & 32 deletions app/assets/javascripts/modules/track-variant.js

This file was deleted.

2 changes: 0 additions & 2 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ class ApplicationController < ActionController::Base
# For APIs, you may want to use :null_session instead.
protect_from_forgery except: :service_sign_in_options

include CookielessTestable

if ENV["BASIC_AUTH_USERNAME"]
http_basic_authenticate_with(
name: ENV.fetch("BASIC_AUTH_USERNAME"),
Expand Down
31 changes: 0 additions & 31 deletions app/controllers/concerns/cookieless_testable.rb

This file was deleted.

5 changes: 0 additions & 5 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@
<% if @content_item.description %>
<meta name="description" content="<%= strip_tags(@content_item.description) %>" />
<% end %>

<%= cookieless_variant.analytics_meta_tag.html_safe %>
<% unless cookieless_variant.variant?('Z') %>
<meta name="Cookieless-Variant" content="<%= cookieless_variant.variant_name %>" data-module="track-variant">
<% end %>

<%= yield :extra_head_content %>
</head>
Expand Down
61 changes: 0 additions & 61 deletions spec/javascripts/track-variant-spec.js

This file was deleted.

20 changes: 0 additions & 20 deletions test/controllers/content_items_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -385,26 +385,6 @@ class ContentItemsControllerTest < ActionController::TestCase
assert_select ".gem-c-contextual-footer", false
end

%w[A B].each do |test_variant|
test "record cookieless hit when in variant #{test_variant}" do
with_variant CookielessAATest: test_variant.to_s do
content_item = content_store_has_schema_example("case_study", "case_study")

get :show, params: { path: path_for(content_item) }
assert_select "meta[data-module=track-variant][content=#{test_variant}]"
end
end
end

test "not record cookieless hit when in variant Z" do
with_variant CookielessAATest: "Z" do
content_item = content_store_has_schema_example("case_study", "case_study")

get :show, params: { path: path_for(content_item) }
assert_select "meta[data-module=track-variant]", false
end
end

def path_for(content_item, locale = nil)
base_path = content_item["base_path"].sub(/^\//, "")
base_path.gsub!(/\.#{locale}$/, "") if locale
Expand Down

0 comments on commit e2e12d9

Please sign in to comment.