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

Add allergies to mobile app Health section #10339

Open
wants to merge 44 commits into
base: develop
Choose a base branch
from

Conversation

stephenBarrs
Copy link
Contributor

@stephenBarrs stephenBarrs commented Dec 6, 2024

Description of Change

This PR does the following:

  • Adds a "Medical records" screen on the Health tab
  • Moves vaccines to the "Medical records" screen
  • Adds an "Allergies" screen on the "Medical records" screen
  • Adds an "Allergy detail" screen

Screenshots/Video

Before

Health
Simulator Screenshot - iPhone 15 Pro Max - 2025-02-06 at 16 14 36

After:

Health Medical records Allergies Allergy detail
Simulator Screenshot - iPhone 15 Pro Max - 2025-02-06 at 15 58 35 Simulator Screenshot - iPhone 15 Pro Max - 2025-02-06 at 15 58 41 Simulator Screenshot - iPhone 15 Pro Max - 2025-02-06 at 15 58 46 Simulator Screenshot - iPhone 15 Pro Max - 2025-02-06 at 15 58 49

Testing

  • Tested locally in demo mode and against staging.va.gov.

  • added unit tests

  • added e2e tests

  • Tested on iOS

  • Tested on Android

Reviewer Validations

Looking for any and all feedback since this is our first major mobile PR :-)

PR Checklist

Reviewer: Confirm the items below as you review

  • PR is connected to issue(s)
  • Tests are included to cover this change (when possible)
  • No magic strings (All string unions follow the Union -> Constant type pattern)
  • No secrets or API keys are checked in
  • All imports are absolute (no relative imports)
  • New functions and Redux work have proper TSDoc annotations

For QA

Run a build for this branch

@oddballdave
Copy link
Contributor

oddballdave commented Feb 21, 2025

Does anyone know of a staging user that has allergy data? I'd prefer to review/test this PR in this manner since there are backend changes.


export const AllergiesE2eIdConstants = {
ALLERGY_1_ID: 'Sulfonamides allergy March 12, 2019',
ALLERGY_2_ID: 'penicillins allergy January 10, 2023',
Copy link
Contributor

@oddballdave oddballdave Feb 21, 2025

Choose a reason for hiding this comment

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

Is the word penicillins not capitalized on purpose? Doesn't match the other allergy IDs.

['VaccineRecords.e2e', ['Medical records', 'V\ufeffA vaccine records'], 'VA vaccines'],
['VaccineRecords.e2e', ['Medical records', 'V\ufeffA vaccine records', 'January 14, 2021'], 'COVID-19 vaccine'],
['Allergies.e2e', ['Medical records', 'V\ufeffA allergy records'], 'Allergies'],
['Allergies.e2e', ['Medical records', 'V\ufeffA allergy records', 'January 10, 2023'], 'penicillins allergy'],
Copy link
Contributor

Choose a reason for hiding this comment

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

Capitalize penicillins?


it('verify no disclaimer is displayed when all fields are populated', async () => {
await element(by.id(AllergiesE2eIdConstants.ALLERGY_3_ID)).tap()
await expect(element(by.text('None noted '))).not.toExist()
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove trailing space from 'None noted '?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also is this something we can use the i18n translation?

Copy link
Contributor

Choose a reason for hiding this comment

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

Well I see in context with the other notes that aren't linked to text from common.json, I could go either way. But at least for the label on ln 59 and 75

Copy link
Contributor

Choose a reason for hiding this comment

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

For e2e testing we'll want to check the displayed value so it would fail in the event someone deleted the key from i18n or introduced a typo or anything like that. Using the translation function to check it could lead to a situation where the text becomes incorrect and the e2e test still passes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the clarification!

await element(by.id(AllergiesE2eIdConstants.ALLERGIES_DETAILS_BACK_ID)).tap()
})

it('multi-line note for dust allergy', async () => {
Copy link
Contributor

@oddballdave oddballdave Feb 21, 2025

Choose a reason for hiding this comment

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

This test fails on iOS. Haven't tried it on Android. The reason for failure is that allergy 7 is off the bottom of the screen and not visible. I suggest looking at some of the other tests to implement scrolling down to this allergy or to the bottom of the screen. You'll likely have to add a testID to the FeatureLandingTemplate component in AllergyListScreen.tsx.

@@ -7,7 +7,14 @@ This script should be updated whenever new things are added/changed in vaccines
import { combineReducers } from '@reduxjs/toolkit'
Copy link
Contributor

Choose a reason for hiding this comment

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

Unused import

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.

7 participants