Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10-10EZ] Fill out fields on 10-10EZ pdf and ensure correct data display #20848

Merged
merged 17 commits into from
Feb 21, 2025

Conversation

coope93
Copy link
Contributor

@coope93 coope93 commented Feb 19, 2025

Note: Delete the description statements, complete each step. None are optional, but can be justified as to why they cannot be completed as written. Provide known gaps to testing that may raise the risk of merging to production.

Summary

  • This work is behind a feature toggle (flipper): NO
  • Map most of the form data to the correct format to populate the 10-10EZ pdf file.
  • This PR fills out the fields on the pdf currently, but does not handle the dynamic fields that can have more than one entry (dependents, income, and insurance information). That work will be in future PRs.
  • 1010 Health Apps

Related issue(s)

Testing done

  • New code is covered by unit tests
  • Describe what the old behavior was prior to the change
  • Describe the steps required to verify your changes are working as expected. Exclusively stating 'Specs run' is NOT acceptable as appropriate testing
  • If this work is behind a flipper:
    • Tests need to be written for both the flipper on and flipper off scenarios. Docs.
    • What is the testing plan for rolling out the feature?

Screenshots

Note: Optional

Example 10-10EZ that has been filled out

What areas of the site does it impact?

(Describe what parts of the site are impacted andifcode touched other areas)

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
  • I added a screenshot of the developed feature

@va-vfs-bot va-vfs-bot temporarily deployed to 102888-1010-ez-map-all-fields-pdf/main/main February 19, 2025 16:12 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to 102888-1010-ez-map-all-fields-pdf/main/main February 19, 2025 16:13 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to 102888-1010-ez-map-all-fields-pdf/main/main February 19, 2025 16:18 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to 102888-1010-ez-map-all-fields-pdf/main/main February 19, 2025 17:00 Inactive
Copy link

github-actions bot commented Feb 19, 2025

1 Warning
⚠️ This PR changes 250 LoC (not counting whitespace/newlines).

In order to ensure each PR receives the proper attention it deserves, we recommend not exceeding
200. Expect some delays getting reviews.

File Summary

Files

  • lib/pdf_fill/forms/va1010ez.rb (+169/-4)

  • spec/lib/pdf_fill/forms/va1010ez_spec.rb (+73/-4)

    Note: We exclude files matching the following when considering PR size:

    *.csv, *.json, *.tsv, *.txt, *.md, Gemfile.lock, app/swagger, modules/mobile/docs, spec/fixtures/, spec/support/vcr_cassettes/, modules/mobile/spec/support/vcr_cassettes/, db/seeds, modules/vaos/app/docs, modules/meb_api/app/docs, modules/appeals_api/app/swagger/, *.bru, *.pdf
    

Big PRs are difficult to review, often become stale, and cause delays.

Generated by 🚫 Danger

@coope93 coope93 changed the title 102888 1010 ez map all fields pdf [10-10EZ] Fill out fields on 10-10EZ pdf and ensure correct data display Feb 19, 2025
@va-vfs-bot va-vfs-bot temporarily deployed to 102888-1010-ez-map-all-fields-pdf/main/main February 19, 2025 17:31 Inactive
@coope93 coope93 changed the base branch from master to 102888-add-pdf-keys-pt-1 February 19, 2025 17:34
@@ -20,14 +20,82 @@
factory: :health_care_application,
input_data_fixture_dir: 'spec/fixtures/pdf_fill/10-10EZ',
output_pdf_fixture_dir: 'spec/fixtures/pdf_fill/10-10EZ/unsigned',
test_data_types: %w[simple]
test_data_types: %w[simple kitchen_sink]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are now testing the simple and kitchen_sink examples

@va-vfs-bot va-vfs-bot temporarily deployed to 102888-1010-ez-map-all-fields-pdf/main/main February 19, 2025 17:35 Inactive
}

describe '#merge_fields' do
it 'merges the right fields' do
expect(form_class.merge_fields.to_json).to eq(
get_fixture('pdf_fill/10-10EZ/merge_fields').to_json
expect(JSON.parse(form_class.merge_fields.to_json)).to eq(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated this to compare json so the order doesn't matter but it will still confirm all key/values.

)
end

context 'marital status' do
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some specialized specs for fields with defined options

}
}.freeze

def merge_fields(_options = {})
merge_full_name
merge_full_name('veteranFullName')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I anticipate some refactoring around all of these merge_field methods. These are all used to ensure the data format we receive from the schema will render properly in the pdf, since often the values for displaying a radio box, check box, or other field is different based on the pdf field. I have been focusing on getting the spec updated to show the correct mapping of fields, so we should be able to refactor it a bit with lots of confidence that the specs will help us ensure everything is lined up correctly.

Base automatically changed from 102888-add-pdf-keys-pt-1 to master February 20, 2025 14:53
@va-vfs-bot va-vfs-bot temporarily deployed to 102888-1010-ez-map-all-fields-pdf/main/main February 20, 2025 14:54 Inactive
'F' => '2'
}.freeze

DISCLOSE_FINANCIAL_INFORMATION = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the values the pdf expects for true/false for this question 🤷

@va-vfs-bot va-vfs-bot temporarily deployed to 102888-1010-ez-map-all-fields-pdf/main/main February 20, 2025 15:58 Inactive
Copy link
Contributor

@dellerbie dellerbie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking comments. If you're cool with making no changes from my comments I can change to approved.

stevenjcumming
stevenjcumming previously approved these changes Feb 20, 2025
Copy link
Contributor

@stevenjcumming stevenjcumming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider looking into removing the rubocop in a future PR

@va-vfs-bot va-vfs-bot temporarily deployed to 102888-1010-ez-map-all-fields-pdf/main/main February 20, 2025 19:36 Inactive
Copy link
Contributor

@dellerbie dellerbie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@va-vfs-bot va-vfs-bot temporarily deployed to 102888-1010-ez-map-all-fields-pdf/main/main February 21, 2025 12:48 Inactive
@coope93 coope93 requested review from stevenjcumming and removed request for stevenjcumming February 21, 2025 13:35
@coope93 coope93 self-assigned this Feb 21, 2025
@coope93 coope93 merged commit 93ba16f into master Feb 21, 2025
34 checks passed
@coope93 coope93 deleted the 102888-1010-ez-map-all-fields-pdf branch February 21, 2025 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants