From 29173f71bef1f63f3e8d026595571c6ad4b58cbb Mon Sep 17 00:00:00 2001 From: evansmith Date: Mon, 15 Apr 2024 19:26:17 -0400 Subject: [PATCH] =?UTF-8?q?do=20not=20check=20no=20for=20burial=20responsi?= =?UTF-8?q?bility=20and=20plot=20expense=20responsibi=E2=80=A6=20(#16341)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * do not check no for burial responsibility and plot expense responsibility * update code owners --- .github/CODEOWNERS | 1 + lib/pdf_fill/forms/va21p530v2.rb | 2 -- spec/fixtures/pdf_fill/21P-530V2/merge_fields.json | 2 -- spec/lib/pdf_fill/forms/va21p530v2_spec.rb | 6 ++++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index fde32a93c71..76122d3c070 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1192,6 +1192,7 @@ spec/fixtures/pdf_fill/21-674 @department-of-veterans-affairs/Benefits-Team-1 @d spec/fixtures/pdf_fill/21-8940 @department-of-veterans-affairs/Benefits-Team-1 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/fixtures/pdf_fill/21P-527EZ @department-of-veterans-affairs/pensions @department-of-veterans-affairs/backend-review-group spec/fixtures/pdf_fill/21P-530 @department-of-veterans-affairs/Benefits-Team-1 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +spec/fixtures/pdf_fill/21P-530V2 @department-of-veterans-affairs/Benefits-Team-1 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/fixtures/pdf_fill/26-1880 @department-of-veterans-affairs/Benefits-Team-1 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/fixtures/pdf_fill/28-1900 @department-of-veterans-affairs/Benefits-Team-1 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/fixtures/pdf_fill/28-8832 @department-of-veterans-affairs/Benefits-Team-1 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group diff --git a/lib/pdf_fill/forms/va21p530v2.rb b/lib/pdf_fill/forms/va21p530v2.rb index 06b70f63a83..f3ab58cdec1 100644 --- a/lib/pdf_fill/forms/va21p530v2.rb +++ b/lib/pdf_fill/forms/va21p530v2.rb @@ -725,12 +725,10 @@ def merge_fields(_options = {}) # special case: these fields were built as checkboxes instead of radios, so usual radio logic can't be used. burial_expense_responsibility = @form_data['burialExpenseResponsibility'] @form_data['hasBurialExpenseResponsibility'] = burial_expense_responsibility ? 'On' : nil - @form_data['noBurialExpenseResponsibility'] = burial_expense_responsibility ? nil : 'On' # special case: these fields were built as checkboxes instead of radios, so usual radio logic can't be used. plot_expense_responsibility = @form_data['plotExpenseResponsibility'] @form_data['hasPlotExpenseResponsibility'] = plot_expense_responsibility ? 'On' : nil - @form_data['noPlotExpenseResponsibility'] = plot_expense_responsibility ? nil : 'On' # special case: these fields were built as checkboxes instead of radios, so usual radio logic can't be used. process_option = @form_data['processOption'] diff --git a/spec/fixtures/pdf_fill/21P-530V2/merge_fields.json b/spec/fixtures/pdf_fill/21P-530V2/merge_fields.json index 6a3d5430846..f552775eb10 100644 --- a/spec/fixtures/pdf_fill/21P-530V2/merge_fields.json +++ b/spec/fixtures/pdf_fill/21P-530V2/merge_fields.json @@ -76,9 +76,7 @@ "veteranSocialSecurityNumber3":{"first":"987", "second":"65", "third":"4322"}, "hasTransportation":"YES", "hasBurialExpenseResponsibility":"On", - "noBurialExpenseResponsibility":null, "hasPlotExpenseResponsibility":"On", - "noPlotExpenseResponsibility":null, "hasProcessOption":null, "noProcessOption":"On", "hasConfirmation":"YES", diff --git a/spec/lib/pdf_fill/forms/va21p530v2_spec.rb b/spec/lib/pdf_fill/forms/va21p530v2_spec.rb index 6810eb956d8..b5529119276 100644 --- a/spec/lib/pdf_fill/forms/va21p530v2_spec.rb +++ b/spec/lib/pdf_fill/forms/va21p530v2_spec.rb @@ -145,12 +145,14 @@ def class_form_data it 'leaves benefit selections blank on pdf if unselected', run_at: '2024-03-21 00:00:00 EDT' do unselected_benefits_data = get_fixture('pdf_fill/21P-530V2/kitchen_sink').except( - 'burialAllowance', 'plotAllowance', 'transportation' + 'burialExpenseResponsibility', 'plotExpenseResponsibility', 'transportation' ) expected_merge_data = get_fixture('pdf_fill/21P-530V2/merge_fields').except( - 'burialAllowance', 'plotAllowance', 'transportation' + 'burialExpenseResponsibility', 'plotExpenseResponsibility', 'transportation' ) expected_merge_data['hasTransportation'] = nil + expected_merge_data['hasBurialExpenseResponsibility'] = nil + expected_merge_data['hasPlotExpenseResponsibility'] = nil expect(described_class.new(unselected_benefits_data).merge_fields.to_json).to eq( expected_merge_data.to_json )