Skip to content

Commit 1e951d6

Browse files
authored
Merge pull request #247 from govuk-forms/fix-conditional-copy-page
Update Copy Of Answers test to be more adaptable
2 parents d8690c7 + edaedaf commit 1e951d6

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

spec/support/feature_helpers.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ def form_is_filled_in_by_form_filler(live_form_link, yes_branch: false, confirma
359359
end
360360
# rubocop:enable Style/IdenticalConditionalBranches
361361

362-
if filler_answer_email_enabled?
362+
if page.find("h1").has_content?("Do you want to get an email with a copy of your answers?")
363363
logger.info "And I am asked if I want a copy of my answers"
364364
expect(page.find("h1")).to have_content "Do you want to get an email with a copy of your answers?"
365365
choose "No", visible: false
@@ -587,10 +587,6 @@ def skip_file_upload?
587587
ENV.fetch("SKIP_FILE_UPLOAD", false)
588588
end
589589

590-
def filler_answer_email_enabled?
591-
Settings.features.filler_answer_email_enabled
592-
end
593-
594590
def visit_product_page
595591
logger.info "Visiting product pages at #{forms_product_page_url}"
596592
visit forms_product_page_url

0 commit comments

Comments
 (0)