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

Mobile: Create EVSSClaim even when using lighthouse #16337

Merged
merged 3 commits into from
Apr 16, 2024

Conversation

Tonksthebear
Copy link
Contributor

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

  • 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 or Grafana (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

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?

@Tonksthebear Tonksthebear requested a review from a team as a code owner April 15, 2024 17:00
@va-vfs-bot va-vfs-bot temporarily deployed to mobile-claims-decision-letter-404/main/main April 15, 2024 17:13 Inactive
aherzberg
aherzberg previously approved these changes Apr 15, 2024
Copy link
Contributor

@aherzberg aherzberg left a 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?

@Tonksthebear
Copy link
Contributor Author

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

aherzberg
aherzberg previously approved these changes Apr 15, 2024
Copy link
Contributor

@aherzberg aherzberg left a comment

Choose a reason for hiding this comment

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

LGTM

@va-vfs-bot va-vfs-bot temporarily deployed to mobile-claims-decision-letter-404/main/main April 15, 2024 18:02 Inactive
kpethtel
kpethtel previously approved these changes Apr 15, 2024
Copy link
Contributor

@kpethtel kpethtel left a 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)
Copy link
Contributor

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)

Copy link
Contributor Author

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

@Tonksthebear Tonksthebear dismissed stale reviews from kpethtel and aherzberg via aa4e8bf April 15, 2024 22:14
@Tonksthebear
Copy link
Contributor Author

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".

@kpethtel Good point, also that'll make removing the tests that much easier when this becomes unnecessary. Updated 👍

Copy link
Contributor

@kpethtel kpethtel left a 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.

@Tonksthebear Tonksthebear merged commit 1567da6 into master Apr 16, 2024
20 checks passed
@Tonksthebear Tonksthebear deleted the mobile-claims-decision-letter-404 branch April 16, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants