From 7d9f7d7219f5c06fa11037223a1b3aa2710af98c Mon Sep 17 00:00:00 2001 From: Ryan Eddy <44847768+RyanEddyIC@users.noreply.github.com> Date: Fri, 17 Jan 2025 08:45:57 -0500 Subject: [PATCH] Csp cucumber fixes 3 (#4922) * benefit application warning modal cucumber fix * broker employers cucumber fixes * fix disabled button check * general agency staff cucumber fixes * broker search cucumber fixes * job income cucumber fixes * ee waive cucumber fixes * update disabled button css selector * new plan year cucumber fixes * plan year filter cucumber fixes * fix admin paper cucumber step * extend oe cucumber fixes * rubocop fix * actual rubocop fix * update radio input checked selector --- app/assets/javascripts/group_selection.js | 11 ++-- app/assets/javascripts/plan_shopping.js.erb | 4 ++ .../ui-components/sidebars/plan_filters.js | 7 +++ .../_edit_open_enrollment.html.erb | 11 +--- .../_new_benefit_application.html.slim | 2 +- .../_oe_extendable_applications.html.erb | 14 +---- .../hbx_profiles/edit_open_enrollment.js.erb | 10 +++- .../new_benefit_application.js.erb | 4 ++ .../oe_extendable_applications.js.erb | 16 ++++- app/views/shared/_signup_progress.html.haml | 2 +- .../v1/filters/_plan_filters.html.erb | 6 +- ..._broker_agency_staff_information.html.slim | 20 +------ ...general_agency_staff_information.html.slim | 20 +------ .../benefit_sponsors/application.js.erb | 11 +++- .../broker_agency_staff_roles.js | 42 +++++++++++++ .../general_agency_staff_roles.js | 59 +++++++++++++++++++ .../broker_agency_staff_roles/_form.html.erb | 9 +-- .../_search_broker_agency.html.erb | 14 +---- .../broker_agency_staff_roles/new.html.slim | 29 +-------- .../broker_agency_staff_roles/new.js.erb | 8 +++ .../my_account/_benefits.html.erb | 6 +- .../general_agency_staff_roles/_form.html.erb | 6 -- .../_search_general_agency.html.erb | 2 +- .../general_agency_staff_roles/new.html.slim | 32 +--------- .../general_agency_staff_roles/new.js.erb | 9 ++- .../benefit_sponsors/application.html.slim | 1 + .../financial_assistance/income.js | 4 +- .../incomes/_job_income_form.html.erb | 5 +- .../_employers.html.erb | 18 ------ .../broker_agency_profiles/employers.js.erb | 17 +++++- .../carriers/_carriers_list.html.erb | 15 ++--- .../carriers/index.js.erb | 10 ++++ .../_relationship_benefit_fields.html.erb | 5 +- .../_plan_selection_form.html.erb | 17 ------ .../plan_selections/new.js.erb | 23 ++++++++ .../plans/_plans.html.erb | 22 +------ .../plan_design_proposals/plans/index.js.erb | 23 ++++++++ .../step_definitions/admin_paper_phone.rb | 2 +- .../household_info_continue_button_steps.rb | 2 +- features/step_definitions/renewal_steps.rb | 2 +- 40 files changed, 283 insertions(+), 237 deletions(-) create mode 100644 components/benefit_sponsors/app/assets/javascripts/benefit_sponsors/broker_agency_staff_roles.js create mode 100644 components/benefit_sponsors/app/assets/javascripts/benefit_sponsors/general_agency_staff_roles.js diff --git a/app/assets/javascripts/group_selection.js b/app/assets/javascripts/group_selection.js index 39dbb7896b0..e87ad36fe28 100644 --- a/app/assets/javascripts/group_selection.js +++ b/app/assets/javascripts/group_selection.js @@ -8,13 +8,12 @@ $(document).on('change', '#market_kind_coverall', function() { }); function setGroupSelectionHandlers(){ - var employers = $("[id^=census_employee_]"); hideAllErrors(); if ($("#employer-selection .n-radio-group .n-radio-row").length) { - var checked_er = $("#employer-selection .n-radio-group .n-radio-row input[checked^= 'checked']:enabled"); + var checked_er = $("#employer-selection .n-radio-group .n-radio-row input:checked:enabled"); if (checked_er.length) { var employer_id = checked_er.val(); @@ -158,9 +157,9 @@ function errorsForChangeInEmployer(element) { } function errorsForChangeInCoverageKind(employer_id){ - $('#coverage_kind_health').on('change', function() { + $(document).on('change', '#coverage_kind_health', function() { hideAllErrors(); - if ($("#employer-selection .n-radio-group .n-radio-row input[checked^= 'checked']:enabled").length) { + if ($("#employer-selection .n-radio-group .n-radio-row input:checked:enabled").length) { $(".health_errors_" + employer_id ).show(); disableShopHealthIneligible(employer_id); @@ -173,9 +172,9 @@ function errorsForChangeInCoverageKind(employer_id){ } }); - $('#coverage_kind_dental').on('change', function() { + $(document).on('change', '#coverage_kind_dental', function() { hideAllErrors(); - if ($("#employer-selection .n-radio-group .n-radio-row input[checked^= 'checked']:enabled").length) { + if ($("#employer-selection .n-radio-group .n-radio-row input:checked:enabled").length) { $(".dental_errors_" + employer_id ).show(); disableShopDentalIneligible(employer_id); diff --git a/app/assets/javascripts/plan_shopping.js.erb b/app/assets/javascripts/plan_shopping.js.erb index 032290e1562..88dbd6225a6 100644 --- a/app/assets/javascripts/plan_shopping.js.erb +++ b/app/assets/javascripts/plan_shopping.js.erb @@ -443,6 +443,10 @@ $(document).on("click", ".reference_plan_info h4 span", function() { $(this).parents(".reference_plan_info").find('.content').toggle(); }); +$(document).on('click', '.waive-disable-selectric-btn', function() { + disableSelectricInModal() +}) + function disableSelectricInModal() { $('#waive_confirm').on('shown.bs.modal', function (e) { $('select#waiver_reason_selection_dropdown').selectric('destroy'); diff --git a/app/assets/javascripts/ui-components/sidebars/plan_filters.js b/app/assets/javascripts/ui-components/sidebars/plan_filters.js index 0dd19735bc7..a5c3866d0c2 100644 --- a/app/assets/javascripts/ui-components/sidebars/plan_filters.js +++ b/app/assets/javascripts/ui-components/sidebars/plan_filters.js @@ -29,6 +29,8 @@ function filterPlanNetwork(element) { processValues(element); } +$(document).on('change', '.plan-carrier-selection-filter.v1-filter', function() { filterPlanCarriers(this) }) + function filterPlanCarriers(element) { filterParams.selectedCarrier = element.value; } @@ -115,6 +117,11 @@ function clearAll() { filterParams.deductibleToAmountValue = ''; } +$(document).on('click', '.apply-filters-btn', function(e) { + e.preventDefault() + filterResults() +}) + // Gets the filtered Results function filterResults() { filterResultsSelections(filterParams); diff --git a/app/views/exchanges/hbx_profiles/_edit_open_enrollment.html.erb b/app/views/exchanges/hbx_profiles/_edit_open_enrollment.html.erb index 682fded968b..e4de9d40435 100644 --- a/app/views/exchanges/hbx_profiles/_edit_open_enrollment.html.erb +++ b/app/views/exchanges/hbx_profiles/_edit_open_enrollment.html.erb @@ -40,22 +40,15 @@
- <%= submit_tag l10n("hbx_profiles.extend_oe"), class: "btn btn-primary #{pundit_class HbxProfile, :can_extend_open_enrollment? }" %> + <%= submit_tag l10n("hbx_profiles.extend_oe"), class: "btn btn-primary #{pundit_class HbxProfile, :can_extend_open_enrollment? }" %>
<% end %> - + - - - \ No newline at end of file diff --git a/app/views/exchanges/hbx_profiles/_new_benefit_application.html.slim b/app/views/exchanges/hbx_profiles/_new_benefit_application.html.slim index bdd20e7e2af..4df3b4e7139 100644 --- a/app/views/exchanges/hbx_profiles/_new_benefit_application.html.slim +++ b/app/views/exchanges/hbx_profiles/_new_benefit_application.html.slim @@ -5,7 +5,7 @@ br .row .pull-right[style="margin-right:20px"] - i.fas.fa-times.fa-2x.admin-fa-times#closeBAForm[onclick="closeRow(this)"] + i.fas.fa-times.fa-2x.admin-fa-times#closeBAForm .row .col-md-4 label[for="effectiveStartDate" style="font-weight:bold"] diff --git a/app/views/exchanges/hbx_profiles/_oe_extendable_applications.html.erb b/app/views/exchanges/hbx_profiles/_oe_extendable_applications.html.erb index 7c716178e54..d353885441d 100644 --- a/app/views/exchanges/hbx_profiles/_oe_extendable_applications.html.erb +++ b/app/views/exchanges/hbx_profiles/_oe_extendable_applications.html.erb @@ -16,7 +16,7 @@ <%= l10n("hbx_profiles.application_status")%> <%= l10n("hbx_profiles.submitted_at")%> <%= l10n("hbx_profiles.last_updated_at")%> - + @@ -39,15 +39,3 @@
- - \ No newline at end of file diff --git a/app/views/exchanges/hbx_profiles/edit_open_enrollment.js.erb b/app/views/exchanges/hbx_profiles/edit_open_enrollment.js.erb index 7f89b2965ce..b8f75ef1b69 100644 --- a/app/views/exchanges/hbx_profiles/edit_open_enrollment.js.erb +++ b/app/views/exchanges/hbx_profiles/edit_open_enrollment.js.erb @@ -1,8 +1,14 @@ -$('.edit_open_enrollment_form').html("<%= escape_javascript(render "edit_open_enrollment") %>"); +$('.edit_open_enrollment_form').html("<%= escape_javascript(render "edit_open_enrollment") %>").ready(initEditOE()); $('#reviewClose').click(function() { $('.edit_open_enrollment_form').hide(); event.preventDefault(); $('tr.child-row:visible').remove(); $('#extendable_applications_table').hide(); -}); \ No newline at end of file +}); + +function initEditOE() { + $(".uidatepicker").datepicker({minDate: "<%= @benefit_application.open_enrollment_date_bounds[:min] %>", maxDate: "<%= @benefit_application.open_enrollment_date_bounds[:max] %>", changeMonth: true, changeYear: true, yearRange: (new Date).getFullYear() + ":" + (new Date).getFullYear()+1 }); + + $(".uidatepicker").datepicker( "option", "dateFormat", "mm/dd/yy" ); +} diff --git a/app/views/exchanges/hbx_profiles/new_benefit_application.js.erb b/app/views/exchanges/hbx_profiles/new_benefit_application.js.erb index c27b6b5efd0..2392d5fdbe6 100644 --- a/app/views/exchanges/hbx_profiles/new_benefit_application.js.erb +++ b/app/views/exchanges/hbx_profiles/new_benefit_application.js.erb @@ -64,6 +64,10 @@ function initNewBAForm() { } } + $(document).on('click', '#closeBAForm', function() { + closeRow(this) + }) + function closeRow(element) { element.closest('tr').remove(); } diff --git a/app/views/exchanges/hbx_profiles/oe_extendable_applications.js.erb b/app/views/exchanges/hbx_profiles/oe_extendable_applications.js.erb index a9b8fbbd111..b8c77d2740c 100644 --- a/app/views/exchanges/hbx_profiles/oe_extendable_applications.js.erb +++ b/app/views/exchanges/hbx_profiles/oe_extendable_applications.js.erb @@ -8,9 +8,21 @@ if ( $('tr.child-row:visible').length > 0 ) { } if ( !($parent_row.next().hasClass('child-row'))) { - $parent_row.after('<%= j render "oe_extendable_applications"%>'); + $parent_row.after('<%= j render "oe_extendable_applications"%>').ready(initExtendOE()); $("li>a:contains('Collapse Form')").eq(containing_row.index()).removeClass('disabled'); $('.dropdown.pull-right').removeClass('open'); } -applyJQDatePickers(); \ No newline at end of file +applyJQDatePickers(); + +function initExtendOE() { + initializeDataTables(); + jQuery('.buttons-csv').hide() + jQuery('.buttons-excel').hide() + function printDoc(id){ + var window_obj=window.open(); + window_obj.document.write($('#print_'+id).html()); + window_obj.print(); + window_obj.close(); + } +} diff --git a/app/views/shared/_signup_progress.html.haml b/app/views/shared/_signup_progress.html.haml index 0b836e2d822..f77a06f88f1 100644 --- a/app/views/shared/_signup_progress.html.haml +++ b/app/views/shared/_signup_progress.html.haml @@ -44,7 +44,7 @@ CONTINUE - if step ==5 - = link_to 'Waive Coverage', '#', data: {toggle: "modal", target: "#waive_confirm"}, class: 'btn btn-waive btn-default', onclick:'disableSelectricInModal()' if @hbx_enrollment && @hbx_enrollment.employee_role.present? + = link_to 'Waive Coverage', '#', data: {toggle: "modal", target: "#waive_confirm"}, class: 'btn btn-waive btn-default waive-disable-selectric-btn' if @hbx_enrollment && @hbx_enrollment.employee_role.present? - elsif step == 6 = link_to purchase_or_confirm, main_app.checkout_insured_plan_shopping_path(@enrollment.id, :plan_id => @plan.id, market_kind: @market_kind, coverage_kind: @coverage_kind), :class => 'btn btn-lg btn-primary btn-block', id: 'btn-continue', :method => :post, :disabled => disable_purchase?(!@enrollable, @enrollment) = link_to 'Waive Coverage', '#', data: {toggle: "modal", target: "#waive_confirm"}, class: 'btn-waive btn btn-round btn-default' if @enrollment && @enrollment.employee_role.present? diff --git a/app/views/ui-components/v1/filters/_plan_filters.html.erb b/app/views/ui-components/v1/filters/_plan_filters.html.erb index 0eeca06f0fc..45e7a69d2b5 100644 --- a/app/views/ui-components/v1/filters/_plan_filters.html.erb +++ b/app/views/ui-components/v1/filters/_plan_filters.html.erb @@ -100,7 +100,7 @@ <%= render partial:"shared/glossary", locals: {key: "filter_by_carrier", term: l10n("carrier"), question_mark: true } %> <% issuer_names = (@market_kind == 'shop' || @market_kind == 'fehb') ? @carrier_names : @carriers %> - <%= select_tag :carrier, options_for_select(issuer_names), class: "plan-carrier-selection-filter w-100", include_blank: "All", onchange:"filterPlanCarriers(this)" %> + <%= select_tag :carrier, options_for_select(issuer_names), class: "plan-carrier-selection-filter w-100 v1-filter", include_blank: "All" %> @@ -322,7 +322,7 @@
<% if @market_kind == 'shop' || @market_kind == 'fehb' %>
- <%= l10n("apply") %> + <%= l10n("apply") %> <%= l10n("reset") %>
<% else %> @@ -509,7 +509,7 @@
  • <% issuer_names = (@market_kind == 'shop' || @market_kind == 'fehb') ? @carrier_names : @carriers %> - <%= select_tag :carrier, options_for_select(issuer_names), class: "plan-carrier-selection-filter form-control", include_blank: "All", onchange:"filterPlanCarriers(this)" %> + <%= select_tag :carrier, options_for_select(issuer_names), class: "plan-carrier-selection-filter form-control v1-filter", include_blank: "All" %>
  • diff --git a/app/views/ui-components/v1/forms/broker_registration/_broker_agency_staff_information.html.slim b/app/views/ui-components/v1/forms/broker_registration/_broker_agency_staff_information.html.slim index d2a12234005..79780672556 100644 --- a/app/views/ui-components/v1/forms/broker_registration/_broker_agency_staff_information.html.slim +++ b/app/views/ui-components/v1/forms/broker_registration/_broker_agency_staff_information.html.slim @@ -18,7 +18,7 @@ fieldset .col-md-4.mb-2 label for="inputDOB" #{l10n('date_of_birth')} * - = f.text_field :dob, placeholder: 'MM/DD/YYYY', required: 'true', id: 'inputStaffDOB', class:'form-control', onblur:'validDob(this)' + = f.text_field :dob, placeholder: 'MM/DD/YYYY', required: 'true', id: 'inputStaffDOB', class:'form-control' .invalid-feedback = l10n("invalid_dob") @@ -29,21 +29,3 @@ fieldset .invalid-feedback = l10n("invalid_email") - - -javascript: - var cleave = new Cleave('#inputDOB', { - date: true, - datePattern: ['m', 'd', 'Y'] - }); - - function validDob(element) { - if (element.value && element.value.length < 10) { - swal({ - title: "Invalid DOB Format", - text: "DOB must be entered as MM/DD/YYYY", - icon: "warning" - }), - element.value = '' - } - } diff --git a/app/views/ui-components/v1/forms/general_agency_registration/_general_agency_staff_information.html.slim b/app/views/ui-components/v1/forms/general_agency_registration/_general_agency_staff_information.html.slim index d2a12234005..79780672556 100644 --- a/app/views/ui-components/v1/forms/general_agency_registration/_general_agency_staff_information.html.slim +++ b/app/views/ui-components/v1/forms/general_agency_registration/_general_agency_staff_information.html.slim @@ -18,7 +18,7 @@ fieldset .col-md-4.mb-2 label for="inputDOB" #{l10n('date_of_birth')} * - = f.text_field :dob, placeholder: 'MM/DD/YYYY', required: 'true', id: 'inputStaffDOB', class:'form-control', onblur:'validDob(this)' + = f.text_field :dob, placeholder: 'MM/DD/YYYY', required: 'true', id: 'inputStaffDOB', class:'form-control' .invalid-feedback = l10n("invalid_dob") @@ -29,21 +29,3 @@ fieldset .invalid-feedback = l10n("invalid_email") - - -javascript: - var cleave = new Cleave('#inputDOB', { - date: true, - datePattern: ['m', 'd', 'Y'] - }); - - function validDob(element) { - if (element.value && element.value.length < 10) { - swal({ - title: "Invalid DOB Format", - text: "DOB must be entered as MM/DD/YYYY", - icon: "warning" - }), - element.value = '' - } - } diff --git a/components/benefit_sponsors/app/assets/javascripts/benefit_sponsors/application.js.erb b/components/benefit_sponsors/app/assets/javascripts/benefit_sponsors/application.js.erb index a211697a48d..a14b527bdb1 100644 --- a/components/benefit_sponsors/app/assets/javascripts/benefit_sponsors/application.js.erb +++ b/components/benefit_sponsors/app/assets/javascripts/benefit_sponsors/application.js.erb @@ -54,4 +54,13 @@ $(document).on('change', "#benefit_application_start_on", function() { jQuery.inputMasks = () => { $(".phone_number").mask("(999) 999-9999"); }; -$.inputMasks(); \ No newline at end of file +$.inputMasks(); + +jQuery.ajaxSetup( { + converters: { + "text script": function( text ) { + jQuery.globalEval( text, {nonce: $("meta[name='csp-nonce']").prop('content')} ); + return text; + } + } +} ); diff --git a/components/benefit_sponsors/app/assets/javascripts/benefit_sponsors/broker_agency_staff_roles.js b/components/benefit_sponsors/app/assets/javascripts/benefit_sponsors/broker_agency_staff_roles.js new file mode 100644 index 00000000000..09a2d30f579 --- /dev/null +++ b/components/benefit_sponsors/app/assets/javascripts/benefit_sponsors/broker_agency_staff_roles.js @@ -0,0 +1,42 @@ +$(document).on('click', '.select-broker-agency', function(e) { + e.preventDefault() + selectBrokereAgency(this); +}) + +$(document).on('click', '.ba-search-btn', function(e) { + e.preventDefault() + brokerSearch(); + return false +}) + +function brokerSearch() { + var broker_agency_search = document.getElementById('staff_agency_search').value + var broker_registration_page = document.getElementById('staff_is_broker_registration_page').value + document.getElementById('broker-staff-btn').disabled = true; + if (broker_agency_search != undefined) { + $.ajax({ + url: '/benefit_sponsors/profiles/broker_agencies/broker_agency_staff_roles/search_broker_agency.js', + type: "GET", + data: {'q': broker_agency_search, "broker_registration_page": broker_registration_page}, + success: function() { + if ($('.table-responsive').length) { + $('.broker-agency-submit').removeClass('hidden'); + } + } + }); + }; + +} + +function selectBrokereAgency(element) { + var result = document.querySelectorAll('.result'); + result.forEach(function (result) { + var element = result.querySelectorAll('.staff-select-broker') + element.forEach(function (ele) { + ele.classList.remove("agency-selected"); + }) + }); + document.getElementById('staff_profile_id').value = element.dataset.broker_agency_profile_id; + element.closest(".staff-select-broker").classList.add('agency-selected') + document.getElementById('broker-staff-btn').disabled = false; +} diff --git a/components/benefit_sponsors/app/assets/javascripts/benefit_sponsors/general_agency_staff_roles.js b/components/benefit_sponsors/app/assets/javascripts/benefit_sponsors/general_agency_staff_roles.js new file mode 100644 index 00000000000..3c3fb0f440d --- /dev/null +++ b/components/benefit_sponsors/app/assets/javascripts/benefit_sponsors/general_agency_staff_roles.js @@ -0,0 +1,59 @@ +// components/benefit_sponsors/app/views/benefit_sponsors/profiles/general_agencies/general_agency_staff_roles/new.html.slim +$(document).on('click', '.ga-search-btn', function(e) { + console.log('search clicked') + e.preventDefault() + generalAgencySearch(); + return false +}) + +function generalAgencySearch() { + console.log('gaSearch') + var general_agency_search = document.getElementById('staff_agency_search').value + var general_agency_registration_page = document.getElementById('staff_is_general_agency_registration_page').value + document.getElementById('general-agency-staff-btn').disabled = true; + if (generalAgencySearch != undefined) { + $.ajax({ + url: '/benefit_sponsors/profiles/general_agencies/general_agency_staff_roles/search_general_agency.js', + type: "GET", + data: {'q': general_agency_search, "general_agency_registration_page": general_agency_registration_page}, + success: function() { console.log('gasearch success') }, + error: function() { console.log('gasearch error') } + }); + }; + +} + +function selectGeneralAgency(element) { + var result = document.querySelectorAll('.result'); + result.forEach(function (result) { + var element = result.querySelectorAll('.select-ga') + element.forEach(function (ele) { + ele.classList.remove("agency-selected"); + }) + }); + document.getElementById('staff_profile_id').value = element.dataset.general_agency_profile_id; + element.closest(".select-ga").classList.add('agency-selected') + document.getElementById('general-agency-staff-btn').disabled = false; +} + +// app/views/ui-components/v1/forms/general_agency_registration/_general_agency_staff_information.html.slim +$(document).on('blur', '#inputStaffDOB', function() { + validDob(this) +}) + +function validDob(element) { + if (element.value && element.value.length < 10) { + swal({ + title: "Invalid DOB Format", + text: "DOB must be entered as MM/DD/YYYY", + icon: "warning" + }), + element.value = '' + } +} + +// components/benefit_sponsors/app/views/benefit_sponsors/profiles/general_agencies/general_agency_staff_roles/_search_general_agency.html.erb +$(document).on('click', '.select-general-agency', function(e) { + e.preventDefault() + selectGeneralAgency(this) +}) diff --git a/components/benefit_sponsors/app/views/benefit_sponsors/profiles/broker_agencies/broker_agency_staff_roles/_form.html.erb b/components/benefit_sponsors/app/views/benefit_sponsors/profiles/broker_agencies/broker_agency_staff_roles/_form.html.erb index 4a175f5e328..beb4e44e772 100644 --- a/components/benefit_sponsors/app/views/benefit_sponsors/profiles/broker_agencies/broker_agency_staff_roles/_form.html.erb +++ b/components/benefit_sponsors/app/views/benefit_sponsors/profiles/broker_agencies/broker_agency_staff_roles/_form.html.erb @@ -17,7 +17,7 @@
    <%= hidden_field_tag :profile_id, params[:profile_id] %> - +
    <%= link_to l10n("broker_agencies.cancel_new_staff"), profiles_broker_agencies_broker_agency_profile_path(id:params[:profile_id]), class:'btn-error outline' %> @@ -36,7 +36,7 @@ <%= f.text_field :last_name, class: "floatlabel form-control", required: true, placeholder: l10n("broker_agencies.last_name") %>
    - <%= f.text_field :dob, :class => "floatlabel form-control interaction-field-control-person-dob", :placeholder => l10n("broker_agencies.dob") , required: true, readonly: defined?(readonly), onmouseover:"showDatepicker(this)" %> + <%= f.text_field :dob, :class => "floatlabel form-control interaction-field-control-person-dob ba-staff-dob", :placeholder => l10n("broker_agencies.dob") , required: true, readonly: defined?(readonly) %>
    <%= hidden_field_tag :profile_id, params[:profile_id] %> @@ -46,9 +46,4 @@ <%= link_to l10n("cancel"), profiles_broker_agencies_broker_agency_profile_path(id:params[:profile_id]), class:'btn btn-default pull-left' %> <% end %> - <% end %> diff --git a/components/benefit_sponsors/app/views/benefit_sponsors/profiles/broker_agencies/broker_agency_staff_roles/_search_broker_agency.html.erb b/components/benefit_sponsors/app/views/benefit_sponsors/profiles/broker_agencies/broker_agency_staff_roles/_search_broker_agency.html.erb index 282774f5c1e..ee745ea0089 100644 --- a/components/benefit_sponsors/app/views/benefit_sponsors/profiles/broker_agencies/broker_agency_staff_roles/_search_broker_agency.html.erb +++ b/components/benefit_sponsors/app/views/benefit_sponsors/profiles/broker_agencies/broker_agency_staff_roles/_search_broker_agency.html.erb @@ -28,10 +28,10 @@ <% else %>

    - <%= l10n("no_agencies_found") %> + <%= l10n("no_agencies_found") %>

    <% end %> -<% else %> +<% else %> <% if @broker_agency_profiles.present? %>
    @@ -48,7 +48,7 @@ <%= agency.legal_name %> <%= agency.primary_broker_role&.npn %> <%= agency.primary_broker_role&.person&.full_name %> - <%= l10n("select_this_broker_button").upcase %> + <%= l10n("select_this_broker_button").upcase %> @@ -58,12 +58,4 @@ <% else %>

    <%= l10n("no_agencies_found") %>

    <% end %> - - <% end %> diff --git a/components/benefit_sponsors/app/views/benefit_sponsors/profiles/broker_agencies/broker_agency_staff_roles/new.html.slim b/components/benefit_sponsors/app/views/benefit_sponsors/profiles/broker_agencies/broker_agency_staff_roles/new.html.slim index a588f627bb2..e783ce72de4 100644 --- a/components/benefit_sponsors/app/views/benefit_sponsors/profiles/broker_agencies/broker_agency_staff_roles/new.html.slim +++ b/components/benefit_sponsors/app/views/benefit_sponsors/profiles/broker_agencies/broker_agency_staff_roles/new.html.slim @@ -21,7 +21,7 @@ = f.hidden_field :is_broker_registration_page, value: true = f.text_field :agency_search, placeholder: "#{l10n('broker_agencies.broker_roles.agency_name_placeholder')}", class: 'form-control' .input-group-btn - button.btn.btn-select.search[href="#" onclick="brokerSearch(); return false" data-loading-text="Loading..."] + button.btn.btn-select.search.ba-search-btn[href="#" data-loading-text="Loading..."] i.fa.fa-search = l10n("search").to_s.downcase .result @@ -38,30 +38,3 @@ javascript: validateAjaxForm(); - - function brokerSearch() { - var broker_agency_search = document.getElementById('staff_agency_search').value - var broker_registration_page = document.getElementById('staff_is_broker_registration_page').value - document.getElementById('broker-staff-btn').disabled = true; - if (broker_agency_search != undefined) { - $.ajax({ - url: '/benefit_sponsors/profiles/broker_agencies/broker_agency_staff_roles/search_broker_agency.js', - type: "GET", - data: {'q': broker_agency_search, "broker_registration_page": broker_registration_page} - }); - }; - - } - - function selectBrokereAgency(element) { - var result = document.querySelectorAll('.result'); - result.forEach(function (result) { - var element = result.querySelectorAll('.staff-select-broker') - element.forEach(function (ele) { - ele.classList.remove("agency-selected"); - }) - }); - document.getElementById('staff_profile_id').value = element.dataset.broker_agency_profile_id; - element.closest(".staff-select-broker").classList.add('agency-selected') - document.getElementById('broker-staff-btn').disabled = false; - } \ No newline at end of file diff --git a/components/benefit_sponsors/app/views/benefit_sponsors/profiles/broker_agencies/broker_agency_staff_roles/new.js.erb b/components/benefit_sponsors/app/views/benefit_sponsors/profiles/broker_agencies/broker_agency_staff_roles/new.js.erb index 49a35be071c..cdcaea8251c 100644 --- a/components/benefit_sponsors/app/views/benefit_sponsors/profiles/broker_agencies/broker_agency_staff_roles/new.js.erb +++ b/components/benefit_sponsors/app/views/benefit_sponsors/profiles/broker_agencies/broker_agency_staff_roles/new.js.erb @@ -4,3 +4,11 @@ if (bs4 == "true") { } $('#add_staff').hide().after('<%= j render("form") %>'); if (bs4 == "true") indicateRequiredFields(); + +$(document).on('mouseover', '.ba-staff-dob', function() { + showDatepicker(this) +}) + +function showDatepicker(element) { + initDatepicker(element.id,new Date('<%= Date.today.beginning_of_month-100.years %>'),new Date('<%= Date.today.beginning_of_month-16.years %>')) +} diff --git a/components/benefit_sponsors/app/views/benefit_sponsors/profiles/employers/employer_profiles/my_account/_benefits.html.erb b/components/benefit_sponsors/app/views/benefit_sponsors/profiles/employers/employer_profiles/my_account/_benefits.html.erb index 3b72458ebc8..3c3e5694bf9 100644 --- a/components/benefit_sponsors/app/views/benefit_sponsors/profiles/employers/employer_profiles/my_account/_benefits.html.erb +++ b/components/benefit_sponsors/app/views/benefit_sponsors/profiles/employers/employer_profiles/my_account/_benefits.html.erb @@ -28,7 +28,7 @@ <% end %> <%#= pundit_span EmployerProfile,:updateable? %> <% if @benefit_applications.present? && add_plan_year_button_business_rule(@benefit_sponsorship, @benefit_applications) %> - <%= link_to "Add Plan Year", new_benefit_sponsorship_benefit_application_path(@benefit_sponsorship), class: "btn btn-default btn-block mt-1", data: {loading_text: "Loading..."}, onclick:"checkForDraftPlans(this)" %> + <%= link_to "Add Plan Year", new_benefit_sponsorship_benefit_application_path(@benefit_sponsorship), class: "btn btn-default btn-block mt-1", data: {loading_text: "Loading..."}, id: "add-plans-check-draft-btn" %> <% end %>
    @@ -299,6 +299,10 @@ <%= render "benefit_sponsors/profiles/employers/benefit_applications/claim_quote_modal" %> diff --git a/components/benefit_sponsors/app/views/benefit_sponsors/profiles/general_agencies/general_agency_staff_roles/_search_general_agency.html.erb b/components/benefit_sponsors/app/views/benefit_sponsors/profiles/general_agencies/general_agency_staff_roles/_search_general_agency.html.erb index 7ab2e506c5b..e69c7906f73 100644 --- a/components/benefit_sponsors/app/views/benefit_sponsors/profiles/general_agencies/general_agency_staff_roles/_search_general_agency.html.erb +++ b/components/benefit_sponsors/app/views/benefit_sponsors/profiles/general_agencies/general_agency_staff_roles/_search_general_agency.html.erb @@ -14,7 +14,7 @@ <%= agency.legal_name %> <%= agency.general_agency_primary_staff.npn %> <%= agency.general_agency_primary_staff.person.full_name %> - <%= l10n("select_this_general_agency").upcase %> + <%= l10n("select_this_general_agency").upcase %> diff --git a/components/benefit_sponsors/app/views/benefit_sponsors/profiles/general_agencies/general_agency_staff_roles/new.html.slim b/components/benefit_sponsors/app/views/benefit_sponsors/profiles/general_agencies/general_agency_staff_roles/new.html.slim index d7b7e5338c5..c60b6d66b76 100644 --- a/components/benefit_sponsors/app/views/benefit_sponsors/profiles/general_agencies/general_agency_staff_roles/new.html.slim +++ b/components/benefit_sponsors/app/views/benefit_sponsors/profiles/general_agencies/general_agency_staff_roles/new.html.slim @@ -21,7 +21,7 @@ = f.hidden_field :is_general_agency_registration_page, value: true = f.text_field :agency_search, placeholder: 'General Agency Name/NPN', class: 'form-control' .input-group-btn - a.btn.btn-select.search[href="#" onclick="generalAgencySearch(); return false" data-loading-text="Loading..."] + a.btn.btn-select.search.ga-search-btn[href="#" data-loading-text="Loading..."] i.fa.fa-search = l10n("search").to_s.downcase .result @@ -35,33 +35,3 @@ br button.btn.btn-primary[type="submit" disabled='disabled' id= 'general-agency-staff-btn'] = l10n("submit_application") - -javascript: - validateAjaxForm(); - - function generalAgencySearch() { - var general_agency_search = document.getElementById('staff_agency_search').value - var general_agency_registration_page = document.getElementById('staff_is_general_agency_registration_page').value - document.getElementById('general-agency-staff-btn').disabled = true; - if (generalAgencySearch != undefined) { - $.ajax({ - url: '/benefit_sponsors/profiles/general_agencies/general_agency_staff_roles/search_general_agency.js', - type: "GET", - data: {'q': general_agency_search, "general_agency_registration_page": general_agency_registration_page} - }); - }; - - } - - function selectGeneralAgency(element) { - var result = document.querySelectorAll('.result'); - result.forEach(function (result) { - var element = result.querySelectorAll('.select-ga') - element.forEach(function (ele) { - ele.classList.remove("agency-selected"); - }) - }); - document.getElementById('staff_profile_id').value = element.dataset.general_agency_profile_id; - element.closest(".select-ga").classList.add('agency-selected') - document.getElementById('general-agency-staff-btn').disabled = false; - } diff --git a/components/benefit_sponsors/app/views/benefit_sponsors/profiles/general_agencies/general_agency_staff_roles/new.js.erb b/components/benefit_sponsors/app/views/benefit_sponsors/profiles/general_agencies/general_agency_staff_roles/new.js.erb index ad4f70b431d..dedb3948fe5 100644 --- a/components/benefit_sponsors/app/views/benefit_sponsors/profiles/general_agencies/general_agency_staff_roles/new.js.erb +++ b/components/benefit_sponsors/app/views/benefit_sponsors/profiles/general_agencies/general_agency_staff_roles/new.js.erb @@ -1 +1,8 @@ -$('#add_staff').hide().after('<%= j render("form") %>'); \ No newline at end of file +$('#add_staff').hide().after('<%= j render("form") %>'); + +validateAjaxForm(); + +// components/benefit_sponsors/app/views/benefit_sponsors/profiles/general_agencies/general_agency_staff_roles/_form.html.erb +function showDatepicker(element) { + initDatepicker(element.id,new Date('<%= Date.today.beginning_of_month-100.years %>'),new Date('<%= Date.today.beginning_of_month-16.years %>')) +} diff --git a/components/benefit_sponsors/app/views/layouts/benefit_sponsors/application.html.slim b/components/benefit_sponsors/app/views/layouts/benefit_sponsors/application.html.slim index ba2456f9da4..e512c966b5b 100644 --- a/components/benefit_sponsors/app/views/layouts/benefit_sponsors/application.html.slim +++ b/components/benefit_sponsors/app/views/layouts/benefit_sponsors/application.html.slim @@ -8,6 +8,7 @@ html script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js" link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous" = csrf_meta_tags + meta name="csp-nonce" content=content_security_policy_nonce body = render partial: './ui-components/v1/navs/header' .container diff --git a/components/financial_assistance/app/assets/javascripts/financial_assistance/income.js b/components/financial_assistance/app/assets/javascripts/financial_assistance/income.js index bf1041b96d9..a0027e7da60 100644 --- a/components/financial_assistance/app/assets/javascripts/financial_assistance/income.js +++ b/components/financial_assistance/app/assets/javascripts/financial_assistance/income.js @@ -59,8 +59,8 @@ function startEditingIncome(income_kind) { } function checkDate(income_id) { - var startDate = $('#start_on_' + income_id).val(); - var endDate = $('#end_on_' + income_id).val(); + var startDate = $('#start_on_' + income_id); + var endDate = $('#end_on_' + income_id); if (endDate && new Date(endDate.val()) <= new Date(startDate.val())) { alert('The end date must be after the start date.'); diff --git a/components/financial_assistance/app/views/financial_assistance/incomes/_job_income_form.html.erb b/components/financial_assistance/app/views/financial_assistance/incomes/_job_income_form.html.erb index 6a66de02bad..05aebb8ca2b 100644 --- a/components/financial_assistance/app/views/financial_assistance/incomes/_job_income_form.html.erb +++ b/components/financial_assistance/app/views/financial_assistance/incomes/_job_income_form.html.erb @@ -129,7 +129,7 @@
    Cancel - <%= f.submit 'Save', class: 'btn btn-save', :data => { :cuke => "job-income-save-button" }, onclick: "checkDate('#{income_id}')" %> + <%= f.submit 'Save', class: 'btn btn-save job-income-save-btn', :data => { :cuke => "job-income-save-button", :income_id => "#{income_id}"} %>
    @@ -140,6 +140,9 @@ <% end %> diff --git a/components/sponsored_benefits/app/views/sponsored_benefits/organizations/broker_agency_profiles/employers.js.erb b/components/sponsored_benefits/app/views/sponsored_benefits/organizations/broker_agency_profiles/employers.js.erb index 0f24249130c..0826684983d 100644 --- a/components/sponsored_benefits/app/views/sponsored_benefits/organizations/broker_agency_profiles/employers.js.erb +++ b/components/sponsored_benefits/app/views/sponsored_benefits/organizations/broker_agency_profiles/employers.js.erb @@ -1,2 +1,17 @@ setTabContent("<%= escape_javascript render "employers" %>"); -set_active_ontab("#employers-tab"); \ No newline at end of file +set_active_ontab("#employers-tab"); +initializeDataTables(); + +$("#bulk_action_assign").on('click', function(event) { + event.preventDefault(); + event.stopPropagation(); + var ids = [] + $(".individual_checkbox:checked").each(function(){ + ids.push($(this).val()); + }) + + $('form#assign_modal_form').prepend(""); + $("#ids").val(JSON.stringify(ids)); + + $("#assign_ga").modal("show"); +}); diff --git a/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/carriers/_carriers_list.html.erb b/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/carriers/_carriers_list.html.erb index 440e088c274..b9bee9f88af 100644 --- a/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/carriers/_carriers_list.html.erb +++ b/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/carriers/_carriers_list.html.erb @@ -2,7 +2,7 @@ <% carrier_names.each_pair do |ck, cv| %>
    - <%= radio_button_tag "sole_source", "#{ck}", false, :onclick => "$('#sole_source_#{ck}_link').click()" %> + <%= radio_button_tag "sole_source", "#{ck}", false ,class: "sole_source_link", data: {link_id: "#sole_source_#{ck}_link"} %>
    <%= link_to organizations_plan_design_organization_plans_path(plan_design_organization, carrier_id: "#{ck}", @@ -17,9 +17,8 @@ <% elsif selected_carrier_level == 'single_carrier' %> <% carrier_names.each_pair do |ck, cv| %>
    -
    - <%= radio_button_tag "single_carrier", "#{ck}", false, :onclick => "$('#single_carrier_#{ck}_link').click()" %> + <%= radio_button_tag "single_carrier", "#{ck}", false, class: "single_carrier_link", data: {link_id: "#single_carrier_#{ck}_link"} %>
    <%= link_to organizations_plan_design_organization_plans_path(plan_design_organization, @@ -29,15 +28,13 @@
    - -
    <% end %> <% elsif selected_carrier_level == 'single_plan' %> <% carrier_names.each_pair do |ck, cv| %>
    - <%= radio_button_tag "single_plan", "#{ck}", false, :onclick => "$('#single_plan_#{ck}_link').click()" %> + <%= radio_button_tag "single_plan", "#{ck}", false, class: "single_plan_link", data: {link_id: "#single_plan_#{ck}_link"} %>
    <%= link_to organizations_plan_design_organization_plans_path(plan_design_organization, @@ -53,7 +50,7 @@ <% carrier_names.each do |plan| %>
    - <%= check_box_tag "Dental Plan", plan.id, true, :onclick => "handleReferencePlanSelection(this)" %> + <%= check_box_tag "Dental Plan", plan.id, true, class: "dental-plan-select" %>
    @@ -77,7 +74,7 @@

    After selecting offered plans, click "Select Reference Plan"

    - Select Reference Plan + Select Reference Plan
    <% else %> @@ -93,7 +90,7 @@
    - <%= radio_button_tag :metal_level_for_elected_plan, kind, false, :onclick => "$('##{kind}_link').click()" %> + <%= radio_button_tag :metal_level_for_elected_plan, kind, false, class: "metal-level-radio", data: {link_id: "##{kind}_link"} %>
    <%= link_to organizations_plan_design_organization_plans_path(plan_design_organization, diff --git a/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/carriers/index.js.erb b/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/carriers/index.js.erb index 62473ec96de..ee577814f88 100644 --- a/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/carriers/index.js.erb +++ b/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/carriers/index.js.erb @@ -16,3 +16,13 @@ $('.tab-container').hide(); $('.carrier-custom-plan-tab').show(); $('#CustomCarrierList').html("<%= escape_javascript(render partial: 'carriers_list', locals: { carrier_names: @carrier_names, search_level: selected_carrier_level, active_year: active_year, kind: kind }) %>"); <% end %> + +$(document).on('click', '.sole_source_link, .single_carrier_link, .single_plan_link, .metal-level-radio', function() { + $($(this).data('link-id')).click() +}) +$(document).on('click', '.dental-plan-select', function() { + handleReferencePlanSelection(this) +}) +$(document).on('click', '.fetch-dental-custom', function() { + fetchDentalCustom() +}) diff --git a/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/contributions/_relationship_benefit_fields.html.erb b/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/contributions/_relationship_benefit_fields.html.erb index 9c584e87de2..6dc455b5d6e 100644 --- a/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/contributions/_relationship_benefit_fields.html.erb +++ b/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/contributions/_relationship_benefit_fields.html.erb @@ -23,11 +23,10 @@
    - <%= f.number_field :premium_pct, class: "hidden-param contribution_handler premium-storage-input", value: f.object.premium_pct.try(:to_i), onblur:"updateSliderValue(this)"%> - + <%= f.number_field :premium_pct, class: "hidden-param contribution_handler premium-storage-input premium-pct-input", value: f.object.premium_pct.try(:to_i)%>
    - +     0% diff --git a/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/plan_selections/_plan_selection_form.html.erb b/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/plan_selections/_plan_selection_form.html.erb index c3943289c7b..adcbec4facd 100644 --- a/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/plan_selections/_plan_selection_form.html.erb +++ b/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/plan_selections/_plan_selection_form.html.erb @@ -130,20 +130,3 @@
    - - diff --git a/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/plan_selections/new.js.erb b/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/plan_selections/new.js.erb index af390df38ef..589f22be456 100644 --- a/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/plan_selections/new.js.erb +++ b/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/plan_selections/new.js.erb @@ -2,3 +2,26 @@ setTabContent("<%= escape_javascript render 'new' %>"); set_active_ontab("#employers-tab"); pageInit(); window.history.pushState("", "Select a Plan", "<%= sponsored_benefits.new_organizations_plan_design_proposal_plan_selection_path(@plan_design_proposal.id) %>"); + +// components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/plan_selections/_plan_selection_form.html.erb +$(document).on('click', '.employee-details-text', function() { + if ($(this).text() == "Show Details") { + $(this).text("Hide Details"); + } else { + $(this).text("Show Details"); + }; +}); +$(function() { + a = document.querySelectorAll('.fa-dot-circle'); + a.forEach((icon)=> icon.classList.add('hidden')) + b = document.querySelectorAll('.fa-square'); + b.forEach((icon)=> icon.classList.add('hidden')) +}) + +// components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/contributions/_relationship_benefit_fields.html.erb +$(document).on('blur', '.premium-pct-input', function() { + updateSliderValue(this) +}) +$(document).on('input', '.premium-pct-slider', function() { + updateSlider(this) +}) diff --git a/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/plans/_plans.html.erb b/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/plans/_plans.html.erb index a436946d588..5c5fd2e9a2d 100644 --- a/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/plans/_plans.html.erb +++ b/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/plans/_plans.html.erb @@ -9,7 +9,7 @@ data-family-deductible="<%= plan.family_deductible %>" >
    - <%= radio_button_tag :reference_plan, "#{plan.id}", false, onclick:"setMyPlans(this)", data:{planId:plan.id} %> + <%= radio_button_tag :reference_plan, "#{plan.id}", false, class: "reference-plan-radio", data:{planId:plan.id} %>
    @@ -42,23 +42,3 @@
    <% end %> - - diff --git a/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/plans/index.js.erb b/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/plans/index.js.erb index 284760459b3..dcd777b30ed 100644 --- a/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/plans/index.js.erb +++ b/components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/plans/index.js.erb @@ -3,3 +3,26 @@ $('.plan-type-filters').html("<%= escape_javascript(render(partial: 'plan_search $('.reference-plans').show(); hideDetailComparisons(); clearComparisons(); + +// components/sponsored_benefits/app/views/sponsored_benefits/organizations/plan_design_proposals/plans/_plans.html.erb +$(document).on('click', '.reference-plan-radio', function() { + setMyPlans(this) +}) + +function setRadioButtons(element) { + var plans = document.querySelectorAll('.reference-plan'); + plans.forEach(function(plan) { + var icons = plan.querySelectorAll('.fa-circle'); + icons.forEach(function(icon) { + if (icon.dataset.tempid == element.dataset.tempid) { + icon.classList.add('fa-dot-circle') + } + }); + var dotIcons = plan.querySelectorAll('.fa-dot-circle'); + dotIcons.forEach(function(icon) { + if (icon.dataset.tempid != element.dataset.tempid) { + icon.classList.add('fa-circle') + } + }); + }); +} diff --git a/features/step_definitions/admin_paper_phone.rb b/features/step_definitions/admin_paper_phone.rb index de1078b18ab..b0fef3d05a2 100644 --- a/features/step_definitions/admin_paper_phone.rb +++ b/features/step_definitions/admin_paper_phone.rb @@ -3,5 +3,5 @@ end Then(/^the Paper action should not be actionable$/) do - find(:xpath, "//*[@id='myTab']/li[2]/ul/li[6]")['class'].split(' ')[1] == 'blocking' + find("#dc-resident-application")['class'].split[1] == 'blocking' end diff --git a/features/step_definitions/household_info_continue_button_steps.rb b/features/step_definitions/household_info_continue_button_steps.rb index 694f613d32d..b6dfe9043f5 100644 --- a/features/step_definitions/household_info_continue_button_steps.rb +++ b/features/step_definitions/household_info_continue_button_steps.rb @@ -79,7 +79,7 @@ end Then(/^the CONTINUE button will be disabled$/) do - expect(page).to have_css("#btn-continue.disabled") + expect(page).to have_css("#btn-continue[disabled], #btn-continue.disabled") end Given(/^the primary member exists$/) do diff --git a/features/step_definitions/renewal_steps.rb b/features/step_definitions/renewal_steps.rb index 62caf02a95e..d1881e6fe0b 100644 --- a/features/step_definitions/renewal_steps.rb +++ b/features/step_definitions/renewal_steps.rb @@ -73,7 +73,7 @@ When(/^.+ submits waiver reason$/) do waiver_modal = find('#waive_confirm', wait: 10) - waiver_modal.find('span', text: 'Please select waive reason').click + waiver_modal.find('#waiver_reason_selection_dropdown').click waiver_modal.find('#waiver_reason_selection_dropdown').select('I have coverage through Medicaid') waiver_modal.find('#waiver_reason_submit', wait: 5).click end