From 6fe1ee8aa68644b74779582c971eac77aebe02e9 Mon Sep 17 00:00:00 2001 From: Ryan Eddy <44847768+RyanEddyIC@users.noreply.github.com> Date: Fri, 9 Aug 2024 18:03:04 -0400 Subject: [PATCH] add secondary check for continue button (#4261) * add secondary check for continue button * rubocop fix * add conditionals for step reuse in other tests * switch click continue steps * edit continue steps in cucumber * fix step name --- .../individual_duplicate_enrollment_warning.feature | 8 ++++---- features/step_definitions/individual_steps.rb | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/features/insured/individual_duplicate_enrollment_warning.feature b/features/insured/individual_duplicate_enrollment_warning.feature index 40f9e504f97..c9c26b525dd 100644 --- a/features/insured/individual_duplicate_enrollment_warning.feature +++ b/features/insured/individual_duplicate_enrollment_warning.feature @@ -13,7 +13,7 @@ Feature: Individual market with duplicate enrollments And user registers as an individual And Individual clicks on the Continue button of the Account Setup page Then Individual sees form to enter personal information - + Scenario: Individual adds dependent and shops for a plan. Dependent creates account, shops for a plan and sees duplicate enrollment warning When the individual clicks continue on the personal information page And Individual agrees to the privacy agreeement @@ -41,8 +41,8 @@ Feature: Individual market with duplicate enrollments And Individual answers the questions of the Identity Verification page and clicks on submit Then Individual is on the Help Paying for Coverage page When Individual does not apply for assistance and clicks continue - And the Individual clicks CONTINUE - And Individual clicks on the continue button + And Individual continues again + And Individual continues again And Individual selects a plan on plan shopping page Then Individual should see Duplicate Enrollment warning in the Confirmation page @@ -79,4 +79,4 @@ Feature: Individual market with duplicate enrollments And the user clicks on CONTINUE button And Individual clicks on continue button on Choose Coverage page And Individual selects a plan on plan shopping page - Then Individual should see Duplicate Enrollment warning in the Confirmation page \ No newline at end of file + Then Individual should see Duplicate Enrollment warning in the Confirmation page diff --git a/features/step_definitions/individual_steps.rb b/features/step_definitions/individual_steps.rb index 46d08fc94d9..b3dcf5d6c7c 100644 --- a/features/step_definitions/individual_steps.rb +++ b/features/step_definitions/individual_steps.rb @@ -639,6 +639,11 @@ class VlpDocument wait_for_ajax(3, 2) expect(page).to have_content "Choose Plan" sleep 5 + continue_btn = find_all(EmployeePersonalInformation.continue_btn) + if continue_btn.any? && !continue_btn.first&.disabled? + find(EmployeePersonalInformation.continue_btn).click + wait_for_ajax(3, 2) + end plan_rows = find_all('div.plan-row', wait: 5) if plan_rows.any? plan_rows[0].find('.plan-select').click @@ -973,6 +978,7 @@ class VlpDocument end Then(/^\w+ continues again$/) do + wait_for_ajax find(IvlChooseCoverage.continue_btn).click end