Skip to content

Commit

Permalink
Merge pull request #1310 from alphagov/remove-obsolete-UA-test
Browse files Browse the repository at this point in the history
Remove analytics tests which are not appropriate for the GA4 world
  • Loading branch information
KludgeKML authored Jul 4, 2024
2 parents 8599734 + 949df94 commit 808396a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 24 deletions.
6 changes: 0 additions & 6 deletions features/apps/frontend.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ Feature: Frontend
When I visit "/"
Then I should see "Welcome to GOV.UK"

@notcloudfront
Scenario: Check the client can talk to Google Analytics
When I visit "/"
And I consent to cookies
Then the page view should be tracked

Scenario: Check the frontend can talk to Licensing
When I visit "/find-licences/busking-licence"
Then I should see "Busking licence"
Expand Down
5 changes: 0 additions & 5 deletions features/step_definitions/ab_testing_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@
@original_bucket = bucket
end

Then(/^the bucket is reported to Google Analytics$/) do
sought = "cd40=Example%3A#{@ab_cookie_value}"
expect(browser_has_analytics_request_containing sought).to be(true)
end

Then(/^I stay on the same bucket when I keep visiting "(.*?)"$/) do |path|
20.times do
request_options = default_request_options.merge(cookies: {"ABTest-Example": @ab_cookie_value})
Expand Down
4 changes: 0 additions & 4 deletions features/step_definitions/analytics.rb

This file was deleted.

9 changes: 0 additions & 9 deletions features/support/browser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@ def browser_has_request_with_url_containing(sought)
end
end

def browser_has_analytics_request_containing(sought)
wait_until do
browser_has_request_containing do |url, post_data|
url.start_with?("https://www.google-analytics.com") &&
(url.include?(sought) || post_data.include?(sought))
end
end
end

def browser_has_request_containing
# Most logs look like this:
#
Expand Down

0 comments on commit 808396a

Please sign in to comment.