-
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
Mobile: Create EVSSClaim even when using lighthouse #16337
Conversation
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. Looks like even if this got left in and EVSS got turned off, this would still work since it's just a locally stored vets-api table. right?
Ya it's low risk to leave in and the table gets cleared every day so we wouldn't grow a massive database or anything. Still worth removing eventually but not dangerous code |
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
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.
You could definitely improve the tests further by having creating an explicit "creates record when none exists" test (rather than including it in another test) and an "updates record when it does exist".
get('/mobile/v0/claims-and-appeals-overview', headers: sis_headers, params:) | ||
expect(EVSSClaim.count).not_to eq(original_evss_claims_count) |
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 would write this as:
expect {
get('/mobile/v0/claims-and-appeals-overview', headers: sis_headers, params:)
}.to change(EVSSClaim, :count).by(1)
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 originally was going to write it that way, but I thought the get being in a block would mess up the response variable. I guess not though, I'm changing it
@kpethtel Good point, also that'll make removing the tests that much easier when this becomes unnecessary. Updated 👍 |
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.
Nice work. Thanks for improving the tests.
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 should reduce/remove claim decision letter 404s when combining lighthouse with EVSS
Related issue(s)
https://app.zenhub.com/workspaces/va-mobile-60f1a34998bc75000f2a489f/issues/gh/department-of-veterans-affairs/va-mobile-app/8324
Testing done
Added test to ensure EVSSClaim are being created even when using lighthouse
Screenshots
Note: Optional
What areas of the site does it impact?
(Describe what parts of the site are impacted andifcode touched other areas)
Acceptance criteria
Requested Feedback
(OPTIONAL)What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?