diff --git a/app/controllers/content_items_controller.rb b/app/controllers/content_items_controller.rb index 53b26cd89..e8f8009cc 100644 --- a/app/controllers/content_items_controller.rb +++ b/app/controllers/content_items_controller.rb @@ -25,6 +25,9 @@ def show load_content_item temporary_ab_test_find_utr_page + temporary_ab_test_stop_self_employed + temporary_ab_test_sa_video_return_1 + temporary_ab_test_sa_video_pay_bill set_expiry if is_service_manual? @@ -293,5 +296,77 @@ def temporary_ab_test_find_utr_page @content_item.body.sub!(placeholder, replacement) end end + + def temporary_ab_test_stop_self_employed + placeholder = "{{ab_test_sa_video_stop_self_employed}}" + if @content_item.base_path == "/stop-being-self-employed" && @content_item.body.include?(placeholder) + ab_test = GovukAbTesting::AbTest.new( + "SAVideoStopSelfEmployed", + dimension: 47, # https://docs.google.com/spreadsheets/d/1h4vGXzIbhOWwUzourPLIc8WM-iU1b6WYOVDOZxmU1Uo/edit#gid=254065189&range=69:69 + allowed_variants: %w[A B Z], + control_variant: "Z", + ) + @requested_variant = ab_test.requested_variant(request.headers) + @requested_variant.configure_response(response) + + replacement = case @requested_variant.variant_name + when "A" + I18n.t("ab_tests.sa_video_stop_self_employed.A") + when "B" + I18n.t("ab_tests.sa_video_stop_self_employed.B") + else + I18n.t("ab_tests.sa_video_stop_self_employed.Z") + end + @content_item.body.sub!(placeholder, replacement) + end + end + + def temporary_ab_test_sa_video_return_1 + placeholder = "{{ab_test_sa_video_return_1}}" + if @content_item.base_path == "/log-in-file-self-assessment-tax-return" && @content_item.body.include?(placeholder) + ab_test = GovukAbTesting::AbTest.new( + "SAVideoReturn1", + dimension: 47, + allowed_variants: %w[A B Z], + control_variant: "Z", + ) + @requested_variant = ab_test.requested_variant(request.headers) + @requested_variant.configure_response(response) + + replacement = case @requested_variant.variant_name + when "A" + I18n.t("ab_tests.sa_video_return_1.A") + when "B" + I18n.t("ab_tests.sa_video_return_1.B") + else + I18n.t("ab_tests.sa_video_return_1.Z") + end + @content_item.body.sub!(placeholder, replacement) + end + end + + def temporary_ab_test_sa_video_pay_bill + placeholder = "{{ab_test_sa_video_pay_bill}}" + if @content_item.base_path == "/pay-self-assessment-tax-bill" && @content_item.current_part_body.include?(placeholder) + ab_test = GovukAbTesting::AbTest.new( + "SAVideoPayBill", + dimension: 47, + allowed_variants: %w[A B Z], + control_variant: "Z", + ) + @requested_variant = ab_test.requested_variant(request.headers) + @requested_variant.configure_response(response) + + replacement = case @requested_variant.variant_name + when "A" + I18n.t("ab_tests.sa_video_pay_bill.A") + when "B" + I18n.t("ab_tests.sa_video_pay_bill.B") + else + I18n.t("ab_tests.sa_video_pay_bill.Z") + end + @content_item.current_part_body.sub!(placeholder, replacement) + end + end # /TEMPORARY end diff --git a/app/views/content_items/guide.html.erb b/app/views/content_items/guide.html.erb index 315d48e39..b1ea2586e 100644 --- a/app/views/content_items/guide.html.erb +++ b/app/views/content_items/guide.html.erb @@ -152,6 +152,8 @@ <% if ga4_scroll_track_headings_paths.include?(full_url) %> <% end %> + + <%= @requested_variant.analytics_meta_tag.html_safe if @requested_variant.present? %> <% end %> <% unless @content_item.requesting_a_part? %> diff --git a/config/locales/ar.yml b/config/locales/ar.yml index d851e6caf..c5a0547cb 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -5,6 +5,18 @@ ar: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/az.yml b/config/locales/az.yml index 9a5ae9915..6a42679e6 100644 --- a/config/locales/az.yml +++ b/config/locales/az.yml @@ -5,6 +5,18 @@ az: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/be.yml b/config/locales/be.yml index c80e7d66f..53c1694d2 100644 --- a/config/locales/be.yml +++ b/config/locales/be.yml @@ -5,6 +5,18 @@ be: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/bg.yml b/config/locales/bg.yml index ee008c988..4739840ac 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -5,6 +5,18 @@ bg: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/bn.yml b/config/locales/bn.yml index 60b51da6b..513f94aba 100644 --- a/config/locales/bn.yml +++ b/config/locales/bn.yml @@ -5,6 +5,18 @@ bn: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 0b8661fec..3cc404b76 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -5,6 +5,18 @@ cs: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/cy.yml b/config/locales/cy.yml index 26a0804bf..3ee205c9d 100644 --- a/config/locales/cy.yml +++ b/config/locales/cy.yml @@ -5,6 +5,18 @@ cy: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/da.yml b/config/locales/da.yml index 8ba2ab2c0..d08916e71 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -5,6 +5,18 @@ da: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/de.yml b/config/locales/de.yml index 769cbf8d0..74379c4af 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -5,6 +5,18 @@ de: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: @@ -75,8 +87,8 @@ de: original_consultation: Originale Anhörung ran_from: Diese Anhörung lief ab respond_online: Online antworten - visit_soon: Besuchen Sie diese Seite bald wieder, um das Ergebnis dieser öffentlichen Rückmeldung herunterzuladen. summary: + visit_soon: Besuchen Sie diese Seite bald wieder, um das Ergebnis dieser öffentlichen Rückmeldung herunterzuladen. was: war ways_to_respond: Möglichkeiten, um zu antworten write_to: 'Schreiben Sie an:' diff --git a/config/locales/dr.yml b/config/locales/dr.yml index 9296a5097..88f73c372 100644 --- a/config/locales/dr.yml +++ b/config/locales/dr.yml @@ -5,6 +5,18 @@ dr: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: @@ -75,8 +87,8 @@ dr: original_consultation: مشاورهء اصلی ran_from: این مشاوره اجرا میشود از respond_online: بصورت آنلاین پاسخ دهید - visit_soon: به زودی بار دیگر از این صفحه دیدن نمایید تا نتیجه را از این فیدبک عمومی دانلود نمایید summary: + visit_soon: به زودی بار دیگر از این صفحه دیدن نمایید تا نتیجه را از این فیدبک عمومی دانلود نمایید was: بود ways_to_respond: طریقه هایی پاسخ دهی write_to: 'نوشته کنید به:' diff --git a/config/locales/el.yml b/config/locales/el.yml index 730c46a7d..e4aa0ed9b 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -5,6 +5,18 @@ el: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/en.yml b/config/locales/en.yml index b5fc1ecd0..e4a454718 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -5,6 +5,18 @@ en: A: in the HMRC app under 'Your details' or in the 'Self Assessment' section B: in the HMRC app - watch a video about finding your UTR number in the app Z: in the HMRC app under 'Your details' or in the 'Self Assessment' section + sa_video_pay_bill: + A:
Go to your HM Revenue and Customs (HMRC) online account and set up a Direct Debit. Choose the Budget Payment Plan option and follow the instructions to set up your plan.
+ B:Go to your HM Revenue and Customs (HMRC) online account and set up a Direct Debit. Choose the Budget Payment Plan option and follow the instructions to set up your plan.
Go to your HM Revenue and Customs (HMRC) online account and set up a Direct Debit. Choose the Budget Payment Plan option and follow the instructions to set up your plan.
+ sa_video_return_1: + A: "You do not have to complete your return in one go. You can save your entry and go back to it later if you need to.
" + B:You do not have to complete your return in one go. You can save your entry and go back to it later if you need to.
You do not have to complete your return in one go. You can save your entry and go back to it later if you need to.
" + sa_video_stop_self_employed: + A:You’ll need to provide your National Insurance number and your UTR number.
+ B:You’ll need to provide your National Insurance number and your UTR number.
Watch this video to find out how to tell HMRC you're stopping self-employment
+ Z:You’ll need to provide your National Insurance number and your UTR number.
call_for_evidence: and: and another_website_html: This call for evidence %{closed} held on another website diff --git a/config/locales/es-419.yml b/config/locales/es-419.yml index c508978f5..298a5d914 100644 --- a/config/locales/es-419.yml +++ b/config/locales/es-419.yml @@ -5,6 +5,18 @@ es-419: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/es.yml b/config/locales/es.yml index 5b54053b7..39440f1de 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -5,6 +5,18 @@ es: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/et.yml b/config/locales/et.yml index cac6919f1..36ff912db 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -5,6 +5,18 @@ et: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/fa.yml b/config/locales/fa.yml index 3d37eb149..6f82fed76 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -5,6 +5,18 @@ fa: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/fi.yml b/config/locales/fi.yml index a5b5abc46..a8e680065 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -5,6 +5,18 @@ fi: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 78d4580dd..0146367ed 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -5,6 +5,18 @@ fr: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/gd.yml b/config/locales/gd.yml index 72fd6589b..ffc5144d6 100644 --- a/config/locales/gd.yml +++ b/config/locales/gd.yml @@ -5,6 +5,18 @@ gd: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/gu.yml b/config/locales/gu.yml index dd66768dd..70da89192 100644 --- a/config/locales/gu.yml +++ b/config/locales/gu.yml @@ -5,6 +5,18 @@ gu: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/he.yml b/config/locales/he.yml index 196cd474b..17ca76250 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -5,6 +5,18 @@ he: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/hi.yml b/config/locales/hi.yml index c110d504b..725c6862e 100644 --- a/config/locales/hi.yml +++ b/config/locales/hi.yml @@ -5,6 +5,18 @@ hi: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/hr.yml b/config/locales/hr.yml index b6ac3ab8f..b14028189 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -5,6 +5,18 @@ hr: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/hu.yml b/config/locales/hu.yml index da4af534d..8ea44b88b 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -5,6 +5,18 @@ hu: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/hy.yml b/config/locales/hy.yml index 4badbf87d..62ebc7855 100644 --- a/config/locales/hy.yml +++ b/config/locales/hy.yml @@ -5,6 +5,18 @@ hy: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/id.yml b/config/locales/id.yml index 80ffe1b2c..ea0c166ed 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -5,6 +5,18 @@ id: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/is.yml b/config/locales/is.yml index 7bb4ee502..3069be82e 100644 --- a/config/locales/is.yml +++ b/config/locales/is.yml @@ -5,6 +5,18 @@ is: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/it.yml b/config/locales/it.yml index fe6c930d5..de1a07626 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -5,6 +5,18 @@ it: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/ja.yml b/config/locales/ja.yml index aee1ef457..2af306a81 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -5,6 +5,18 @@ ja: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/ka.yml b/config/locales/ka.yml index e9f33e925..3224e7a84 100644 --- a/config/locales/ka.yml +++ b/config/locales/ka.yml @@ -5,6 +5,18 @@ ka: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/kk.yml b/config/locales/kk.yml index 555c367dd..7ea822a74 100644 --- a/config/locales/kk.yml +++ b/config/locales/kk.yml @@ -5,6 +5,18 @@ kk: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 3932fc338..ea2196da7 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -5,6 +5,18 @@ ko: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/lt.yml b/config/locales/lt.yml index 9ccb776c2..2a164a067 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -5,6 +5,18 @@ lt: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/lv.yml b/config/locales/lv.yml index f898656b8..92924f202 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -5,6 +5,18 @@ lv: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/ms.yml b/config/locales/ms.yml index 8dddfb0de..4865a310b 100644 --- a/config/locales/ms.yml +++ b/config/locales/ms.yml @@ -5,6 +5,18 @@ ms: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/mt.yml b/config/locales/mt.yml index 5cf72c8aa..3b926712a 100644 --- a/config/locales/mt.yml +++ b/config/locales/mt.yml @@ -5,6 +5,18 @@ mt: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/ne.yml b/config/locales/ne.yml index 2a1c858b1..fa710a4f1 100644 --- a/config/locales/ne.yml +++ b/config/locales/ne.yml @@ -5,6 +5,18 @@ ne: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 938ddce36..a6f9fb1cd 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -5,6 +5,18 @@ nl: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/no.yml b/config/locales/no.yml index b59e8a024..e351f89d7 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -5,6 +5,18 @@ A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/pa-pk.yml b/config/locales/pa-pk.yml index 6b8b9750c..3a529a3c1 100644 --- a/config/locales/pa-pk.yml +++ b/config/locales/pa-pk.yml @@ -5,6 +5,18 @@ pa-pk: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/pa.yml b/config/locales/pa.yml index b52fd4f85..38aa51f3f 100644 --- a/config/locales/pa.yml +++ b/config/locales/pa.yml @@ -5,6 +5,18 @@ pa: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/pl.yml b/config/locales/pl.yml index d7e9f2efe..ddd03177b 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -5,6 +5,18 @@ pl: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/ps.yml b/config/locales/ps.yml index dd21483f6..9696d0367 100644 --- a/config/locales/ps.yml +++ b/config/locales/ps.yml @@ -5,6 +5,18 @@ ps: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 9fbb83ed8..545b0d4eb 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -5,6 +5,18 @@ pt: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/ro.yml b/config/locales/ro.yml index b90d644a3..00a8610e4 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -5,6 +5,18 @@ ro: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/ru.yml b/config/locales/ru.yml index ea91a7cca..a175246fc 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -5,6 +5,18 @@ ru: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/si.yml b/config/locales/si.yml index 3d8ad4a91..68a0f4e26 100644 --- a/config/locales/si.yml +++ b/config/locales/si.yml @@ -5,6 +5,18 @@ si: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/sk.yml b/config/locales/sk.yml index 6c2241b28..8b40383aa 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -5,6 +5,18 @@ sk: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 1b70a0439..22acb777b 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -5,6 +5,18 @@ sl: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/so.yml b/config/locales/so.yml index 3e38b7900..5a59ec5cf 100644 --- a/config/locales/so.yml +++ b/config/locales/so.yml @@ -5,6 +5,18 @@ so: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/sq.yml b/config/locales/sq.yml index a6abf3896..750f2bf41 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -5,6 +5,18 @@ sq: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/sr.yml b/config/locales/sr.yml index ddcadc63b..d2737df67 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -5,6 +5,18 @@ sr: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 6d0617397..64da0d916 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -5,6 +5,18 @@ sv: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/sw.yml b/config/locales/sw.yml index 846cf4e77..0c823ca53 100644 --- a/config/locales/sw.yml +++ b/config/locales/sw.yml @@ -5,6 +5,18 @@ sw: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/ta.yml b/config/locales/ta.yml index efa645943..0804041b8 100644 --- a/config/locales/ta.yml +++ b/config/locales/ta.yml @@ -5,6 +5,18 @@ ta: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/th.yml b/config/locales/th.yml index 0d9ff8bb9..e0d1f1815 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -5,6 +5,18 @@ th: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/tk.yml b/config/locales/tk.yml index a12d5200f..f1be451a5 100644 --- a/config/locales/tk.yml +++ b/config/locales/tk.yml @@ -5,6 +5,18 @@ tk: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 3adfc1bce..84763076c 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -5,6 +5,18 @@ tr: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/uk.yml b/config/locales/uk.yml index ac5b41a08..1f39d0b4d 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -5,6 +5,18 @@ uk: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/ur.yml b/config/locales/ur.yml index 6f666c36d..d7d63fc03 100644 --- a/config/locales/ur.yml +++ b/config/locales/ur.yml @@ -5,6 +5,18 @@ ur: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/uz.yml b/config/locales/uz.yml index 03d286aaa..32287f660 100644 --- a/config/locales/uz.yml +++ b/config/locales/uz.yml @@ -5,6 +5,18 @@ uz: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/vi.yml b/config/locales/vi.yml index de499ff1f..cf27bcccc 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -5,6 +5,18 @@ vi: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/yi.yml b/config/locales/yi.yml index 8f7d44c4e..3c0263221 100644 --- a/config/locales/yi.yml +++ b/config/locales/yi.yml @@ -5,6 +5,18 @@ yi: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/zh-hk.yml b/config/locales/zh-hk.yml index 70594fc0f..2b0727c96 100644 --- a/config/locales/zh-hk.yml +++ b/config/locales/zh-hk.yml @@ -5,6 +5,18 @@ zh-hk: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/zh-tw.yml b/config/locales/zh-tw.yml index 25446572b..5e546b191 100644 --- a/config/locales/zh-tw.yml +++ b/config/locales/zh-tw.yml @@ -5,6 +5,18 @@ zh-tw: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/config/locales/zh.yml b/config/locales/zh.yml index a3082f66b..195a2eeb3 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -5,6 +5,18 @@ zh: A: B: Z: + sa_video_pay_bill: + A: + B: + Z: + sa_video_return_1: + A: + B: + Z: + sa_video_stop_self_employed: + A: + B: + Z: call_for_evidence: and: another_website_html: diff --git a/test/controllers/content_items_controller_test.rb b/test/controllers/content_items_controller_test.rb index 5e4c880c5..7d2922d95 100644 --- a/test/controllers/content_items_controller_test.rb +++ b/test/controllers/content_items_controller_test.rb @@ -364,6 +364,50 @@ class ContentItemsControllerTest < ActionController::TestCase assert_equal "true", @response.headers[Slimmer::Headers::REMOVE_SEARCH_HEADER] end + test "AB test replaces content on the stop-being-self-employed page with default" do + content_item = content_store_has_schema_example("answer", "answer") + content_item["base_path"] = "/stop-being-self-employed" + content_item["details"]["body"] = "{{ab_test_sa_video_stop_self_employed}}" + + stub_content_store_has_item(content_item["base_path"], content_item) + with_variant SAVideoStopSelfEmployed: "Z" do + get :show, params: { path: path_for(content_item) } + assert_response :success + assert_no_match "{{ab_test_sa_video_stop_self_employed}}", response.body + assert_match I18n.t("ab_tests.sa_video_stop_self_employed.Z").to_s, response.body + end + end + + test "AB test replaces content on the stop-being-self-employed page with variant A" do + content_item = content_store_has_schema_example("answer", "answer") + content_item["base_path"] = "/stop-being-self-employed" + content_item["details"]["body"] = "{{ab_test_sa_video_stop_self_employed}}" + + stub_content_store_has_item(content_item["base_path"], content_item) + + with_variant SAVideoStopSelfEmployed: "A" do + get :show, params: { path: path_for(content_item) } + assert_response :success + assert_no_match "{{ab_test_sa_video_stop_self_employed}}", response.body + assert_match I18n.t("ab_tests.sa_video_stop_self_employed.A").to_s, response.body + end + end + + test "AB test replaces content on the stop-being-self-employed page with variant B" do + content_item = content_store_has_schema_example("answer", "answer") + content_item["base_path"] = "/stop-being-self-employed" + content_item["details"]["body"] = "{{ab_test_sa_video_stop_self_employed}}" + + stub_content_store_has_item(content_item["base_path"], content_item) + + with_variant SAVideoStopSelfEmployed: "B" do + get :show, params: { path: path_for(content_item) } + assert_response :success + assert_no_match "{{ab_test_sa_video_stop_self_employed}}", response.body + assert_match I18n.t("ab_tests.sa_video_stop_self_employed.B").to_s, response.body + end + end + test "AB test replaces content on the find-utr-number page with default" do content_item = content_store_has_schema_example("answer", "answer") content_item["base_path"] = "/find-utr-number" @@ -371,12 +415,12 @@ class ContentItemsControllerTest < ActionController::TestCase stub_content_store_has_item(content_item["base_path"], content_item) - request.headers["HTTP_GOVUK_ABTEST_FINDUTRNUMBERVIDEOLINKS"] = nil - - get :show, params: { path: path_for(content_item) } - assert_response :success - assert_no_match "{{ab_test_find_utr_number_video_links}}", response.body - assert_match "