From edaedaf369eec25fdc8b539ed872d1cfc98dee31 Mon Sep 17 00:00:00 2001 From: chao-xian Date: Thu, 2 Apr 2026 14:20:41 +0100 Subject: [PATCH] Update Copy Of Answers test to be more adaptable The feature flag won't work... also each form will optionally have the page in the flow once that is put in place in Admin. Co-authored-by: Thomas Iles --- spec/support/feature_helpers.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/spec/support/feature_helpers.rb b/spec/support/feature_helpers.rb index 16cd540..f8e5dab 100644 --- a/spec/support/feature_helpers.rb +++ b/spec/support/feature_helpers.rb @@ -359,7 +359,7 @@ def form_is_filled_in_by_form_filler(live_form_link, yes_branch: false, confirma end # rubocop:enable Style/IdenticalConditionalBranches - if filler_answer_email_enabled? + if page.find("h1").has_content?("Do you want to get an email with a copy of your answers?") logger.info "And I am asked if I want a copy of my answers" expect(page.find("h1")).to have_content "Do you want to get an email with a copy of your answers?" choose "No", visible: false @@ -587,10 +587,6 @@ def skip_file_upload? ENV.fetch("SKIP_FILE_UPLOAD", false) end - def filler_answer_email_enabled? - Settings.features.filler_answer_email_enabled - end - def visit_product_page logger.info "Visiting product pages at #{forms_product_page_url}" visit forms_product_page_url