Skip to content

Commit 41abebb

Browse files
authored
Merge pull request #5288 from alphagov/revert-5063-register-to-vote-scroll-tracking
Revert "[IA-1757] Add scroll tracking to /register-to-vote"
2 parents 82f1fd5 + c4b0ee5 commit 41abebb

4 files changed

Lines changed: 0 additions & 37 deletions

File tree

app/presenters/transaction_presenter.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,4 @@ def start_button_text
1313
content_item.start_button_text
1414
end
1515
end
16-
17-
def scroll_tracking?
18-
["/register-to-vote"].include?(content_item.base_path)
19-
end
2016
end

app/views/transaction/show.html.erb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
<% if content_item.hide_from_search_engines? %>
1111
<meta name="robots" content="noindex, nofollow">
1212
<% end %>
13-
14-
<% if @transaction_presenter.scroll_tracking? %>
15-
<meta name="govuk:scroll-tracker" content="" data-module="ga4-scroll-tracker">
16-
<% end %>
1713
<% end %>
1814

1915
<%= render layout: "shared/base_page", locals: {

spec/presenter/transaction_presenter_spec.rb

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,4 @@ def subject(content_item)
4747
end
4848
end
4949
end
50-
51-
context "when scroll_tracking? is present" do
52-
describe "#scroll_tracking" do
53-
it "is false when on the incorrect base path" do
54-
content_store_response["base_path"] = "/random"
55-
content_item = Transaction.new(content_store_response)
56-
expect(subject(content_item).scroll_tracking?).to be(false)
57-
end
58-
59-
it "is true when on the correct base path" do
60-
content_store_response["base_path"] = "/register-to-vote"
61-
content_item = Transaction.new(content_store_response)
62-
expect(subject(content_item).scroll_tracking?).to be(true)
63-
end
64-
end
65-
end
6650
end

spec/system/transaction_spec.rb

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -180,17 +180,4 @@
180180
end
181181
end
182182
end
183-
184-
context "when a transaction path is '/register-to-vote'" do
185-
it "renders the scroll tracking meta tag" do
186-
content_store_has_example_item("/register-to-vote", schema: "transaction")
187-
visit "/register-to-vote"
188-
189-
expect(page.status_code).to eq(200)
190-
191-
within("head", visible: :all) do
192-
expect(page).to have_selector("meta[name='govuk:scroll-tracker'][content=''][data-module='ga4-scroll-tracker']", visible: :hidden)
193-
end
194-
end
195-
end
196183
end

0 commit comments

Comments
 (0)