-
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] Fill out fields on 10-10EZ pdf and ensure correct data display #20848
Conversation
…orms_example shared example
…s to just fill out the name field
…ing for pdf to fill those fields
…est all possible values
Generated by 🚫 Danger |
@@ -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] |
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.
We are now testing the simple and kitchen_sink examples
} | ||
|
||
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( |
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 to compare json so the order doesn't matter but it will still confirm all key/values.
) | ||
end | ||
|
||
context 'marital status' do |
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.
Added some specialized specs for fields with defined options
} | ||
}.freeze | ||
|
||
def merge_fields(_options = {}) | ||
merge_full_name | ||
merge_full_name('veteranFullName') |
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.
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.
'F' => '2' | ||
}.freeze | ||
|
||
DISCLOSE_FINANCIAL_INFORMATION = { |
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.
These are the values the pdf expects for true/false for this question 🤷
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.
Non-blocking comments. If you're cool with making no changes from my comments I can change to approved.
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.
Consider looking into removing the rubocop in a future PR
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.
lgtm
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
Related issue(s)
Testing done
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