Skip to content

Commit

Permalink
replace have_content with have_css round 1
Browse files Browse the repository at this point in the history
  • Loading branch information
ATBull81 committed Jan 9, 2025
1 parent 1a95a88 commit 1b29a91
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 46 deletions.
18 changes: 9 additions & 9 deletions app/views/welcome/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@
<div id="welcome-nav-options">
<div class="row justify-content-center">
<% if ::EnrollRegistry[:aca_shop_market].enabled? %>
<%= sanitize(link_to l10n(".employee_portal"), privacy_insured_employee_index_path, class: "btn btn-outline-primary mr-2 mb-2") %>
<%= sanitize(link_to l10n(".employee_portal"), privacy_insured_employee_index_path, class: "btn btn-outline-primary mr-2 mb-2", data: { cuke: "employee_portal_link" }) %>
<% end %>
<% if individual_market_is_enabled? %>
<%= link_to_with_noopener_noreferrer(l10n(".consumer_family_portal"), privacy_insured_consumer_role_index_path(uqhp: true), class: "btn btn-outline-primary mr-2 mb-2") %>
<%= link_to_with_noopener_noreferrer(l10n(".consumer_family_portal"), privacy_insured_consumer_role_index_path(uqhp: true), class: "btn btn-outline-primary mr-2 mb-2", data: { cuke: "consumer_family_portal_link" }) %>
<% end %>
<% if medicaid_tax_credits_link_is_enabled? %>
<%= link_to_with_noopener_noreferrer(l10n(".assisted_consumer_family_portal"), privacy_insured_consumer_role_index_path(aqhp: true), class: "btn btn-outline-primary mr-2 mb-2") %>
<%= link_to_with_noopener_noreferrer(l10n(".assisted_consumer_family_portal"), privacy_insured_consumer_role_index_path(aqhp: true), class: "btn btn-outline-primary mr-2 mb-2", data: { cuke: "assisted_consumer_family_portal_link" }) %>
<% end %>
<%= sanitize(link_to l10n(".returning_user"), family_account_path, class: "btn btn-outline-primary mr-2 mb-2") %>
<% if ::EnrollRegistry[:aca_shop_market].enabled? %>
<%= link_to_with_noopener_noreferrer(l10n(".employer_portal"), benefit_sponsors.new_profiles_registration_path(:profile_type => :benefit_sponsor), class: "btn btn-outline-primary mr-2 mb-2") %>
<%= link_to_with_noopener_noreferrer(l10n(".employer_portal"), benefit_sponsors.new_profiles_registration_path(:profile_type => :benefit_sponsor), class: "btn btn-outline-primary mr-2 mb-2", data: { cuke: "employer_portal_link" }) %>
<% end %>
<%= link_to_with_noopener_noreferrer(l10n(".broker_agency_portal"), benefit_sponsors.new_profiles_registration_path(:profile_type => :broker_agency, portal: true), class: "btn btn-outline-primary mr-2 mb-2") %>
<%= link_to_with_noopener_noreferrer(l10n(".broker_agency_portal"), benefit_sponsors.new_profiles_registration_path(:profile_type => :broker_agency, portal: true), class: "btn btn-outline-primary mr-2 mb-2", data: { cuke: "broker_agency_portal_link" }) %>
<% if general_agency_enabled? %>
<%= link_to_with_noopener_noreferrer(l10n(".general_agency_portal"), benefit_sponsors.new_profiles_registration_path(:profile_type => :general_agency, portal: true), class: "btn btn-outline-primary mr-2 mb-2") %>
<%= link_to_with_noopener_noreferrer(l10n(".general_agency_portal"), benefit_sponsors.new_profiles_registration_path(:profile_type => :general_agency, portal: true), class: "btn btn-outline-primary mr-2 mb-2", data: { cuke: "general_agency_portal_link" }) %>
<% end %>
<%= sanitize(link_to l10n(".hbx_portal"), exchanges_hbx_profiles_root_path, class: "btn btn-outline-primary mr-2 mb-2 hbx-portal") %>
<%= sanitize(link_to l10n(".hbx_portal"), exchanges_hbx_profiles_root_path, class: "btn btn-outline-primary mr-2 mb-2 hbx-portal", data: { cuke: "hbx_portal_link" }) %>
<% if !user_signed_in? %>
<%= link_to_with_noopener_noreferrer(l10n(".broker_registration"), benefit_sponsors.new_profiles_registration_path(:profile_type => :broker_agency), class: "btn btn-outline-primary mr-2 mb-2 broker-registration") %>
<%= link_to_with_noopener_noreferrer(l10n(".broker_registration"), benefit_sponsors.new_profiles_registration_path(:profile_type => :broker_agency), class: "btn btn-outline-primary mr-2 mb-2 broker-registration", data: { cuke: "broker_registration_portal_link" }) %>
<% if general_agency_enabled? %>
<%= link_to_with_noopener_noreferrer(l10n(".general_agency_registration"), benefit_sponsors.new_profiles_registration_path(:profile_type => :general_agency), class: "btn btn-outline-primary mr-2 mb-2") %>
<%= link_to_with_noopener_noreferrer(l10n(".general_agency_registration"), benefit_sponsors.new_profiles_registration_path(:profile_type => :general_agency), class: "btn btn-outline-primary mr-2 mb-2", data: { cuke: "general_agency_registration_portal_link" }) %>
<% end %>
<% end %>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<p class="alert alert-error hide"></p>
<div class="row">
<div class="col-md-10">
<h2 class="fa-darkblue">Your Preferences</h2>
<h2 class="fa-darkblue preferences">Your Preferences</h2>
</div>
</div>
<p>Tell us your preferences. When you're finished, select CONTINUE.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
end

When(/^the user clicks Income & Coverage section on the left navigation$/) do
expect(page).to have_content('Income and Coverage Info')
expect(page).to have_css('.interaction-click-control-income-and-coverage-info', text: 'Income and Coverage Info')
end

Then(/^the cursor will display disabled\.$/) do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
end

Then(/they should see the Contact Customer Support and Certified Applicant Counselor links?/) do
page.should have_content('Help from a Customer Service Representative')
page.should have_content('Help from a Certified Applicant Counselor')
page.should have_css('.interaction-click-control-help-from-a-customer-service-representative', text: 'Help from a Customer Service Representative')
page.should have_css('.interaction-click-control-help-from-a-certified-applicant-counselor-(cac)', text: 'Help from a Certified Applicant Counselor')
end

Then(/they should not see the Contact Customer Support and Certified Applicant Counselor links?/) do
page.should_not have_content('Help from a Customer Service Representative')
page.should_not have_content('Help from a Certified Applicant Counselor')
page.should_not have_css('.interaction-click-control-help-from-a-customer-service-representative', text: 'Help from a Customer Service Representative')
page.should_not have_css('.interaction-click-control-help-from-a-certified-applicant-counselor-(cac)', text: 'Help from a Certified Applicant Counselor')
end
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
end

Then(/^they should see the Assisted Consumer Family Portal tile$/) do
expect(page).to have_content("Assisted Consumer")
expect(page).to have_css('[data-cuke="assisted_consumer_family_portal_link"]', text: 'Assisted Consumer')
end

Then(/^they should not see the Assisted Consumer Family Portal tile$/) do
expect(page).to_not have_content("Assisted Consumer")
expect(page).to have_css('[data-cuke="assisted_consumer_family_portal_link"]', text: 'Assisted Consumer')
end

Given(/consumer visits the privacy notice page?/) do
visit '/insured/consumer_role/privacy?aqhp=true'
end

Then(/^they should be redirected to the enroll app home page$/) do
expect(page).to have_content("Medicaid And Tax Credits Link Is Disabled")
expect(page).to have_css('.container', text: "Medicaid And Tax Credits Link Is Disabled")
end
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

Given(/^the Family Relationships link displays in the left column of the page$/) do
expect(page).to have_content('Family Relationships')
expect(page).to have_css('.interaction-click-control-family-relationships', text: 'Family Relationships')
end

Then(/^the Family Relationships link is disabled$/) do
Expand All @@ -18,8 +18,6 @@
end

Then(/^the user will navigate to the Family relationships page$/) do
# binding.pry
# expect(page).to have_content('Household Relationships')
expect(page).to have_content('Family Relationships')
expect(page).to have_content('HOUSEHOLD MEMBER')
expect(page).to have_css('.interaction-click-control-family-relationships', text: 'Family Relationships')
expect(page).to have_css('div', text: 'HOUSEHOLD MEMBER')
end
44 changes: 22 additions & 22 deletions features/financial_assistance/step_definitions/fa_not_applying.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

And(/the primary member has filled mandatory information required$/) do
visit privacy_insured_consumer_role_index_path
expect(page).to have_content("Your Information")
expect(page).to have_content("CONTINUE")
expect(page).to have_css('div', text: "Your Information")
expect(page).to have_css('.interaction-click-control-continue', text: "Continue to Next Step")
find(YourInformation.continue_btn).click
fill_in IvlPersonalInformation.first_name, with: "Patrick"
fill_in IvlPersonalInformation.last_name, with: "Doe"
Expand All @@ -27,7 +27,7 @@
find(IvlPersonalInformation.male_radiobtn).click
find(:xpath, '//label[@for="is_applying_coverage_true"]').click
find('.btn', text: 'CONTINUE').click
expect(page).to have_content("Next, we need to verify if you or you and your family are eligible to enroll in coverage through #{EnrollRegistry[:enroll_app].setting(:short_name).item}. Select CONTINUE.")
expect(page).to have_css('.alert-success', text: "Next, we need to verify if you or you and your family are eligible to enroll in coverage through #{EnrollRegistry[:enroll_app].setting(:short_name).item}. Select CONTINUE.")
find('.btn', text: 'CONTINUE').click
click_and_wait_on_stylized_radio('//label[@for="person_us_citizen_true"]', "person_us_citizen_true", "person[us_citizen]", "true")
click_and_wait_on_stylized_radio('//label[@for="person_naturalized_citizen_false"]', "person_naturalized_citizen_false", "person[naturalized_citizen]", "false")
Expand All @@ -45,17 +45,17 @@
end

Given(/^the primary member authorizes system to call EXPERIAN$/) do
expect(page).to have_content('Authorization and Consent')
expect(page).to have_css('.darkblue', text: 'Authorization and Consent')
find(:xpath, '//label[@for="agreement_agree"]').click
find('.btn', text: 'CONTINUE').click
end

Given(/^system receives a positive response from the EXPERIAN$/) do
expect(page).to have_content('Verify Identity')
expect(page).to have_css('h2', text: 'Verify Identity')
end

Given(/^the user answers all the VERIFY IDENTITY questions$/) do
expect(page).to have_content('Verify Identity')
expect(page).to have_css('h2', text: 'Verify Identity')
find(:xpath, '//label[@for="interactive_verification_questions_attributes_0_response_id_a"]').click
find(:xpath, '//label[@for="interactive_verification_questions_attributes_1_response_id_c"]').click
end
Expand All @@ -69,7 +69,7 @@
end

Then(/^the user will navigate to the Help Paying for Coverage page$/) do
expect(page).to have_content('Your Application for Premium Reductions')
expect(page).to have_css('.darkblue', text: 'Your Application for Premium Reductions')
end

Given(/^the user navigates to the "Household Info" page with "no" selected$/) do
Expand All @@ -84,7 +84,7 @@
end

And(/^the user fills the the add member form/) do
expect(page).to have_content(/lives with primary subscriber/i)
expect(page).to have_css('strong', text: /lives with primary subscriber/i)
fill_in "dependent[first_name]", :with => "John"
fill_in "dependent[last_name]", :with => "Doe"
fill_in "dependent[ssn]", :with => "763434355"
Expand All @@ -106,7 +106,7 @@
end

And(/^the user fills the applicant add member form with indian member yes/) do
expect(page).to have_content('Lives with primary subscriber')
expect(page).to have_css('label[for="dependent_same_with_primary"]', text: 'Lives with primary subscriber')
fill_in "applicant[first_name]", :with => "John"
fill_in "applicant[last_name]", :with => "Doe"
fill_in "applicant[ssn]", :with => "763434355"
Expand All @@ -126,7 +126,7 @@
And(/^the user fills the applicant add member form with indian member no/) do
sleep 5

expect(page).to have_content('Lives with primary subscriber')
expect(page).to have_css('label[for="dependent_same_with_primary"]', text: 'Lives with primary subscriber')
fill_in "applicant[first_name]", :with => "John"
fill_in "applicant[last_name]", :with => "Doe"
fill_in "applicant[ssn]", :with => "763434355"
Expand Down Expand Up @@ -157,7 +157,7 @@
end

Then(/user should still see the member of a tribe question/) do
expect(page).to have_content('Is this person a member of an')
expect(page).to have_css('label', text: 'Is this person a member of an')
end

And(/the user clicks submit applicant form/) do
Expand All @@ -171,7 +171,7 @@

Then(/the user should see an error message for indian tribal name/) do
sleep 1
expect(page).to have_text("Tribal name is required when native american / alaska native is selected")
expect(page).to have_css('li', text: "Tribal name is required when native american / alaska native is selected")
end

Then(/the user should see an error message for indian tribal id/) do
Expand All @@ -183,7 +183,7 @@
end

Then(/the user should see an error for tribal name containing a number/) do
expect(page).to have_content("cannot contain numbers")
expect(page).to have_css('li', text: "cannot contain numbers")
end

Given(/AI AN Details feature is enabled/) do
Expand All @@ -207,7 +207,7 @@
end

Then(/the user should see the AI AN Details fields/) do
expect(page).to have_content("Where is this person's tribe located?")
expect(page).to have_css('label', text: "Where is this person's tribe located?")
end

And(/^the user clicks the PREVIOUS link1/) do
Expand All @@ -217,7 +217,7 @@

Then(/^the user navigates to Help Paying for Coverage page/) do
sleep 2
expect(page).to have_content('Your Application for Premium Reductions')
expect(page).to have_css('.darkblue', text: 'Your Application for Premium Reductions')
end

Given(/^the user navigates to the "Household Info" page with "yes" selected/) do
Expand All @@ -233,14 +233,14 @@
end

And(/^the .+ is navigated to Application checklist page/) do
expect(page).to have_content('Application Checklist')
expect(page).to have_css('.darkblue', text: 'Application Checklist')
end

And(/^the .+ is navigated to year selection page/) do
if EnrollRegistry[:enroll_app].setting(:site_key).item.to_s.downcase == 'dc'
expect(page).to have_content('districtdirect.dc.gov')
expect(page).to have_css('a', text: 'districtdirect.dc.gov')
else
expect(page).to have_content(/submit a webform/)
expect(page).to have_css('p', text: /submit a webform/)
end
end

Expand Down Expand Up @@ -277,9 +277,9 @@
find(IvlPersonalInformation.need_coverage_yes).click
find(IvlPersonalInformation.continue_btn).click
if EnrollRegistry[:bs4_consumer_flow].enabled?
expect(page).to have_content("We need to verify if you or you and your family are eligible to enroll in coverage through CoverME.gov.")
expect(page).to have_css('.alert-success', text: "We need to verify if you or you and your family are eligible to enroll in coverage through CoverME.gov.")
else
expect(page).to have_content("Next, we need to verify if you or you and your family are eligible to enroll in coverage through #{EnrollRegistry[:enroll_app].setting(:short_name).item}. Select CONTINUE.")
expect(page).to have_css('.alert-success', text: "Next, we need to verify if you or you and your family are eligible to enroll in coverage through #{EnrollRegistry[:enroll_app].setting(:short_name).item}. Select CONTINUE.")
end
find(IvlPersonalInformation.continue_btn_2).click
find(IvlPersonalInformation.us_citizen_or_national_yes_radiobtn).click
Expand Down Expand Up @@ -318,9 +318,9 @@
find(IvlPersonalInformation.continue_btn).click

if EnrollRegistry[:bs4_consumer_flow].enabled?
expect(page).to have_content("We need to verify if you or you and your family are eligible to enroll in coverage through CoverME.gov.")
expect(page).to have_css('.alert-success', text: "We need to verify if you or you and your family are eligible to enroll in coverage through CoverME.gov.")
else
expect(page).to have_content("Next, we need to verify if you or you and your family are eligible to enroll in coverage through #{EnrollRegistry[:enroll_app].setting(:short_name).item}. Select CONTINUE.")
expect(page).to have_css('.alert-success', text: "Next, we need to verify if you or you and your family are eligible to enroll in coverage through #{EnrollRegistry[:enroll_app].setting(:short_name).item}. Select CONTINUE.")
end
find(IvlPersonalInformation.continue_btn_2).click
find(IvlPersonalInformation.us_citizen_or_national_yes_radiobtn).click
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Then(/^the user is on the Your Preferences page$/) do
find('#eligibility_easier_yes').click
find('#mailed_yes').click if FinancialAssistanceRegistry.feature_enabled?(:voter_registration_through_hbx)
expect(page).to have_content('Your Preferences')
expect(page).to have_css('.preferences', text: 'Your Preferences')
end

Given(/^the user has a parent living outside the home$/) do
Expand Down

0 comments on commit 1b29a91

Please sign in to comment.