LG-12270: Audit ipp mock data and test helpers#11573
Conversation
…ata and helper functions for ipp
| identity_doc_address2:, | ||
| identity_doc_city:, | ||
| identity_doc_address_state:, | ||
| identity_doc_zipcode:, |
There was a problem hiding this comment.
This test looks like it checks the data before the PUT. What do you think about confirming that the residential address data is included in pii_from_user at this point? (in addition to the state ID address)
| expect(page).to have_field( | ||
| t('in_person_proofing.form.state_id.identity_doc_address_state'), | ||
| with: Idp::Constants::MOCK_IDV_APPLICANT[:state_id_jurisdiction], | ||
| with: Idp::Constants::MOCK_IDV_APPLICANT_STATE_ID_JURISDICTION, |
There was a problem hiding this comment.
I know you just changed how we were getting this data but rather than getting state_id_jurisdiction should it be MOCK_IDV_APPLICANT_STATE or Idp::Constants::MOCK_IDV_APPLICANT[:state]?
Also, do you think we should have one test (when state jurisdiction is different than state id (doc auth), when address is same as id, we confirm we are using state id (doc auth) and not the state jurisdiction? I didn't see this test and thought it might be a good one around DAV.
There was a problem hiding this comment.
Thanks for catching that. I changed L113 to use MOCK_IDV_APPLICANT_STATE for identity_doc_address_state and also changed the helper method fill_out_state_id_form_ok to use MOCK_IDV_APPLICANT_STATE for filling in this field. I locally ran all the specs that directly called this method and they didn't break after the refactor. I didn't locally run all the specs that call helper methods which use this method, like complete_idv_steps_before_address, but I'll keep an eye on them in the build.
After making this change, the current spec now tests for a scenario where same_address_as_id is true and state id jurisdiction differs from identity_doc_address_state. I think that satisfies your suggestion.
There was a problem hiding this comment.
It does! The two values are different now.
gina-yamada
left a comment
There was a problem hiding this comment.
Nice clean up! I added some comments. Nothing I suggested in blocking so don't feel pressure to make changes if you disagree.
shanechesnutt-ft
left a comment
There was a problem hiding this comment.
The clean up looks great! Great job! I love that you removed more than was added.
| end | ||
| it 'redirects to state id page if not complete' do |
There was a problem hiding this comment.
Nitpick: Add a newline after the end and it
| end | |
| it 'redirects to state id page if not complete' do | |
| end | |
| it 'redirects to state id page if not complete' do |
🎫 Ticket
LG-12270: Audit and update test(s) mock data and helper functions for the entire ipp flow
🛠 Summary of changes
:proofed_in_person_enrollmenttrait.idp/constants.rb.📜 Testing Plan