Skip to content

Commit edaedaf

Browse files
chao-xianthomasiles
andcommitted
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 <tom.iles@digital.cabinet-office.gov.uk>
1 parent 8098433 commit edaedaf

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)