-
Notifications
You must be signed in to change notification settings - Fork 66
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
Conversation
…orms_example shared example
…s to just fill out the name field
@@ -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] |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 = { |
There was a problem hiding this comment.
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.
There was a problem hiding this 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", |
There was a problem hiding this comment.
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.
* 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
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
PdfFill::Filler
.Related issue(s)
Testing done
Screenshots
Note: Optional
What areas of the site does it impact?
10-10EZ
Acceptance criteria