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] Boilerplate to generate filled out 10-10EZ pdf #20784

Merged
merged 4 commits into from
Feb 18, 2025

Conversation

coope93
Copy link
Contributor

@coope93 coope93 commented Feb 13, 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
  • Added code to generate a filled out 10-10EZ pdf using PdfFill::Filler.
  • For now, it just fills out the name field, and there will be future PRs to fill out the rest of the fields as well as overflow fields.
  • Code is not exposed via the api yet so we don't need a flipper toggle or anything
  • 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

What areas of the site does it impact?

10-10EZ

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 102887-generate-1010ez-pdf/main/main February 13, 2025 15:43 Inactive
@coope93 coope93 changed the title 102887 generate 1010ez pdf [10-10EZ] Boilerplate to generate filled out 10-10EZ pdf Feb 13, 2025
@@ -14,6 +14,7 @@
# - :input_data_fixture_dir (String): Directory path for input data fixtures. Default to "pdf_fill/#{form_id}".
# - :output_pdf_fixture_dir (String): Directory path for output PDF fixtures. Default to "pdf_fill/#{form_id}".
# - :fill_options (Hash): Options to be passed to the `fill_form` method. Default empty.
# - :test_data_types (Array): Array of form data to validate. Defaults to %w[simple kitchen_sink overflow]
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 shared_example to allow for testing just some of the data types, while keeping it backwards compatible by setting the default if it is not supplied. Naming things is hard, so open to a different name here.

@@ -72,6 +72,10 @@ def send_failure_email?
async_submission_failed? && email.present?
end

def form_id
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is expected by PdfFill::Filler since it is generally expecting a saved_claim model, but our hca model has the same parsed_form object as the saved_claim model so it appears to work fine.

class Va1010ez < FormBase
FORM_ID = HealthCareApplication::FORM_ID

KEY = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will be updated to include all fields in future PRs, but for now we wanted to just get the basic generation/filling functionality out there. This work is not exposed externally anywhere either.

@coope93 coope93 marked this pull request as ready for review February 13, 2025 16:03
@coope93 coope93 requested review from a team as code owners February 13, 2025 16:03
Copy link
Contributor

@Mitch-A6 Mitch-A6 left a comment

Choose a reason for hiding this comment

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

👍

@@ -80,7 +80,9 @@
"stateOfBirth": "TX",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file was leftover from previous work to generate a 10-10EZ pdf. I updated it to test the full name functionality. In future PRs I will update the kitchent_sink and simple files to ensure they have the proper values for each, but for now I kept this since it had all of the required fields per the vets-json-schema for this form.

@va-vfs-bot va-vfs-bot temporarily deployed to 102887-generate-1010ez-pdf/main/main February 13, 2025 19:05 Inactive
@RachalCassity RachalCassity self-assigned this Feb 18, 2025
@coope93 coope93 merged commit 1616a16 into master Feb 18, 2025
38 of 40 checks passed
@coope93 coope93 deleted the 102887-generate-1010ez-pdf branch February 18, 2025 14:44
stevenjcumming pushed a commit that referenced this pull request Feb 18, 2025
* add new form_id instance method to health_care_application model

* add ability to test specific test data instead of all three in fill_forms_example shared example

* add new va1010ez class to fill out pdf form. Initial implementation is to just fill out the name field
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