From 98246f15f9eb00bfb047b0fbc1ae6a0206793804 Mon Sep 17 00:00:00 2001 From: Steve Laing Date: Tue, 16 Oct 2018 14:49:47 +0100 Subject: [PATCH] Add tracking domain to service sign in form --- app/views/content_items/service_sign_in/_choose_sign_in.html.erb | 1 + test/integration/service_sign_in/choose_sign_in_test.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/views/content_items/service_sign_in/_choose_sign_in.html.erb b/app/views/content_items/service_sign_in/_choose_sign_in.html.erb index 8e7bb6758..919939ae3 100644 --- a/app/views/content_items/service_sign_in/_choose_sign_in.html.erb +++ b/app/views/content_items/service_sign_in/_choose_sign_in.html.erb @@ -16,6 +16,7 @@ <% data_attrs = { module: "track-radio-group" } data_attrs["tracking-code"] = @content_item.tracking_code if @content_item.tracking_code + data_attrs["tracking-domain"] = @content_item.tracking_domain if @content_item.tracking_domain data_attrs["tracking-name"] = @content_item.tracking_name if @content_item.tracking_name %> <%= form_tag({controller: 'content_items', action: 'service_sign_in_options'}, diff --git a/test/integration/service_sign_in/choose_sign_in_test.rb b/test/integration/service_sign_in/choose_sign_in_test.rb index 1431ded02..9548ebfc8 100644 --- a/test/integration/service_sign_in/choose_sign_in_test.rb +++ b/test/integration/service_sign_in/choose_sign_in_test.rb @@ -22,6 +22,7 @@ class ChooseSignInTest < ActionDispatch::IntegrationTest assert page.has_css?('.gem-c-back-link[href="/log-in-file-self-assessment-tax-return"]', text: 'Back') assert page.has_css?('form[data-module="track-radio-group"]') assert page.has_css?("form[data-tracking-code='UA-xxxxxx']") + assert page.has_css?("form[data-tracking-domain='tax.service.gov.uk']") assert page.has_css?("form[data-tracking-name='somethingClicky']") within "#content form" do