Skip to content

Commit 48d6eb8

Browse files
authored
Merge pull request #3105 from alphagov/stop-al-description-test
Revert "Add annual leave entitlement AB test"
2 parents b607d84 + d4fb4ee commit 48d6eb8

File tree

10 files changed

+1
-187
lines changed

10 files changed

+1
-187
lines changed

app/assets/stylesheets/smart_answers.scss

-15
Original file line numberDiff line numberDiff line change
@@ -375,19 +375,4 @@ $is-ie: false !default;
375375
vertical-align: top;
376376
}
377377

378-
.ab-context {
379-
padding: 0;
380-
margin: 0;
381-
382-
h2 {
383-
border: none;
384-
@include bold-19;
385-
margin: 0 0 1em;
386-
position: relative;
387-
388-
@include ie-lte(8) {
389-
line-height: 1.2em;
390-
}
391-
}
392-
}
393378
}

app/controllers/concerns/benchmark_holiday_entitlement_ab_testable.rb

-36
This file was deleted.

app/controllers/smart_answers_controller.rb

-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ class SmartAnswersController < ApplicationController
22
include Slimmer::GovukComponents
33
include Slimmer::Headers
44
include EducationNavigationABTestable
5-
include BenchmarkHolidayEntitlementABTestable
65

76
before_action :find_smart_answer, except: %w(index)
87
before_action :redirect_response_to_canonical_url, only: %w{show}
@@ -16,8 +15,6 @@ class SmartAnswersController < ApplicationController
1615
:should_present_new_navigation_view?,
1716
:page_is_under_ab_test?,
1817
:present_taxonomy_sidebar?,
19-
:is_holiday_entitlement_tested_path?,
20-
:should_show_holiday_entitlement_variant?
2118
)
2219

2320
rescue_from SmartAnswer::FlowRegistry::NotFound, with: :error_404
@@ -38,10 +35,6 @@ def show
3835
set_education_navigation_response_header(content_item)
3936
end
4037

41-
if is_holiday_entitlement_tested_path?
42-
set_benchmark_holiday_entitlement_response_header
43-
end
44-
4538
render page_type
4639
}
4740
if Rails.application.config.expose_govspeak

app/views/layouts/smart_answers.html.erb

-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
<% if page_is_under_ab_test?(@content_item) %>
88
<%= education_navigation_variant.analytics_meta_tag.html_safe %>
99
<% end %>
10-
11-
<% if is_holiday_entitlement_tested_path? %>
12-
<%= benchmark_holiday_entitlement_variant.analytics_meta_tag.html_safe %>
13-
<% end %>
1410
<% end %>
1511

1612
<% if should_present_new_navigation_view?(@content_item) %>

app/views/smart_answers/landing.html.erb

-5
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@
1616
<article role="article" class="group" data-debug-template-path="<%= start_node.relative_erb_template_path %>">
1717
<div class="inner">
1818
<div class="intro">
19-
20-
<% if should_show_holiday_entitlement_variant? %>
21-
<%= start_node.ab_body %>
22-
<% else %>
2319
<%= start_node.body %>
24-
<% end %>
2520

2621
<p class="get-started">
2722
<a rel="nofollow" href="<%= start_button_href %>" class="big button"><%= start_button %></a>

app/views/smart_answers/question.html.erb

-16
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,6 @@
99
<% question = @presenter.current_node %>
1010

1111
<div class="step current">
12-
13-
<% if should_show_holiday_entitlement_variant? %>
14-
<div class="ab-context">
15-
<h2 id="leave-year-dates">
16-
Leave year dates
17-
</h2>
18-
<p>
19-
The leave year will usually be in an employee’s contract. If it isn’t, their leave year will start:
20-
</p>
21-
<ul>
22-
<li>on their first day (if the job began after 1 October 1998)</li>
23-
<li>on 1 October (if the job began on or before 1 October 1998)</li>
24-
</ul>
25-
</div>
26-
<% end %>
27-
2812
<%= form_tag calculate_current_question_path(@presenter), :method => :get %>
2913
<div class="current-question" id="current-question">
3014

lib/smart_answer_flows/calculate-your-holiday-entitlement/calculate_your_holiday_entitlement.govspeak.erb

-8
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,3 @@
2020
- on 1 October (if the job began on or before 1 October 1998)
2121

2222
<% end %>
23-
24-
<% content_for :ab_body do %>
25-
Use this tool to calculate holiday entitlement for:
26-
27-
- a full leave year
28-
- part of a leave year, if the job started or finished part way through the year
29-
30-
<% end %>

test/data/calculate-your-holiday-entitlement-files.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
lib/smart_answer/calculators/holiday_entitlement.rb: dab915508991c038dcc0fd51935bcf82
3-
lib/smart_answer_flows/calculate-your-holiday-entitlement/calculate_your_holiday_entitlement.govspeak.erb: 2ef053da554acbe99f7fb8df8126f9a1
3+
lib/smart_answer_flows/calculate-your-holiday-entitlement/calculate_your_holiday_entitlement.govspeak.erb: 448c48df1c04abbf03ded760e29a227f
44
lib/smart_answer_flows/calculate-your-holiday-entitlement/outcomes/_your_employer_with_rounding.govspeak.erb: 968b6d15a99334328227528f3feea6ba
55
lib/smart_answer_flows/calculate-your-holiday-entitlement/outcomes/annualised_hours_done.govspeak.erb: 5be498f482bc4686f612cdca0dbbc2ab
66
lib/smart_answer_flows/calculate-your-holiday-entitlement/outcomes/casual_or_irregular_hours_done.govspeak.erb: f2b0964438fdb8b9ef4aaa4972bd7041

test/fixtures/smart_answer_flows/bridge-of-death/bridge_of_death.govspeak.erb

-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,3 @@
1515
These questions three
1616
Ere the other side he see.
1717
<% end %>
18-
19-
<% content_for :ab_body do %>
20-
There are some who call me Tim!
21-
<% end %>

test/functional/smart_answers_controller_test.rb

-91
Original file line numberDiff line numberDiff line change
@@ -274,97 +274,6 @@ def teardown
274274
end
275275
end
276276

277-
context "Annual leave descrption placement A/B testing" do
278-
context "pages in test" do
279-
setup do
280-
@controller.stubs(:is_holiday_entitlement_tested_path?).returns(true)
281-
282-
content_item = {
283-
"base_path" => '/bridge-of-death'
284-
}
285-
286-
Services.content_store.stubs(:content_item)
287-
.with("/bridge-of-death")
288-
.returns(content_item)
289-
end
290-
291-
context "landing page" do
292-
should "show the original text for the 'A' version" do
293-
with_variant BenchmarkALDescription1: "A" do
294-
get :show, params: { id: 'bridge-of-death' }
295-
296-
assert_match(/He who would cross the Bridge of Death/, response.body)
297-
assert_no_match(/Tim/, response.body)
298-
end
299-
end
300-
301-
should "show the alternate text for the 'B' version" do
302-
with_variant BenchmarkALDescription1: "B" do
303-
get :show, params: { id: 'bridge-of-death' }
304-
305-
assert_match(/There are some who call me Tim!/, response.body)
306-
assert_no_match(/these questions threee/, response.body)
307-
end
308-
end
309-
end
310-
311-
context "question page" do
312-
should "show the original text for the 'A' version" do
313-
with_variant BenchmarkALDescription1: "A" do
314-
get :show, params: { id: 'bridge-of-death', started: 'y', responses: ['what-is-your-quest'] }
315-
316-
assert_match(/To seek the Holy Grail/, response.body)
317-
assert_no_match(/The leave year will/, response.body)
318-
end
319-
end
320-
321-
should "show the additional text for the 'B' version" do
322-
with_variant BenchmarkALDescription1: "B" do
323-
get :show, params: { id: 'bridge-of-death', started: 'y', responses: ['what-is-your-quest'] }
324-
325-
assert_match(/The leave year will/, response.body)
326-
assert_match(/To seek the Holy Grail/, response.body)
327-
end
328-
end
329-
end
330-
end
331-
332-
context "pages not in test" do
333-
setup do
334-
@controller.stubs(:is_holiday_entitlement_tested_path?).returns(false)
335-
336-
content_item = {
337-
"base_path" => '/bridge-of-death'
338-
}
339-
340-
Services.content_store.stubs(:content_item)
341-
.with("/bridge-of-death")
342-
.returns(content_item)
343-
end
344-
345-
context "landing page" do
346-
should "show the original text" do
347-
setup_ab_variant "BenchmarkCmButton1", "B"
348-
349-
get :show, params: { id: 'bridge-of-death' }
350-
assert_match(/He who would cross the Bridge of Death/, response.body)
351-
assert_no_match(/Tim/, response.body)
352-
end
353-
end
354-
355-
context "question page" do
356-
should "show the original text" do
357-
setup_ab_variant "BenchmarkCmButton1", "B"
358-
359-
get :show, params: { id: 'bridge-of-death', started: 'y', responses: ['what-is-your-quest'] }
360-
361-
assert_match(/To seek the Holy Grail/, response.body)
362-
assert_no_match(/The leave year will/, response.body)
363-
end
364-
end
365-
end
366-
end
367-
368277
context "GET /<slug>/visualise" do
369278
should "display the visualisation" do
370279
stub_smart_answer_in_content_store("smart-answers-controller-sample")

0 commit comments

Comments
 (0)