Skip to content

Commit

Permalink
CU/9807-rachael-detox-prescriptions-replace-by-text (#9808)
Browse files Browse the repository at this point in the history
Co-authored-by: Therese <[email protected]>
  • Loading branch information
rbontrager and TKDickson authored Oct 9, 2024
1 parent 75d39ee commit 709bf93
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 86 deletions.
156 changes: 77 additions & 79 deletions VAMobile/e2e/tests/Prescriptions.e2e.ts

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ function PrescriptionDetails({ route, navigation }: PrescriptionDetailsProps) {
<Button
label={t('prescriptions.refill.RequestRefillButtonTitle', { count: 1 })}
onPress={requestRefillButtonPress}
testID="requestRefillsButtonID"
/>
</Box>
)
Expand All @@ -143,7 +144,8 @@ function PrescriptionDetails({ route, navigation }: PrescriptionDetailsProps) {
<ChildTemplate
backLabel={t('prescription.title')}
backLabelOnPress={navigation.goBack}
title={t('prescriptionDetails')}>
title={t('prescriptionDetails')}
backLabelTestID="prescriptionsDetailsBackTestID">
{loadingHistory ? (
<LoadingComponent text={t('prescription.details.loading')} />
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ function PrescriptionHelp({}: PrescriptionHelpProps) {
]

return (
<LargePanel testID="PrescriptionsHelpTestID" title={t('prescriptionsHelp')} rightButtonText={t('close')}>
<LargePanel
testID="PrescriptionsHelpTestID"
title={t('prescriptionsHelp')}
rightButtonText={t('close')}
rightButtonTestID="prescriptionsBackTestID">
<Box mx={gutter} mb={contentMarginBottom}>
<TextView variant="MobileBodyBold">{t('prescription.help.header')}</TextView>
<TextView mt={condensedMarginBetween} variant="MobileBody" mb={theme.dimensions.standardMarginBetween}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ function PrescriptionHistory({ navigation, route }: PrescriptionHistoryProps) {
<Box mr={8}>
<VAIcon name={'Truck'} fill={'link'} height={16} width={16} />
</Box>
<TextView flex={1} variant={'HelperTextBold'} color={'link'}>
<TextView flex={1} variant={'HelperTextBold'} color={'link'} testID="getPrescriptionTrackingTestID">
{t('prescription.history.tracking')}
</TextView>
</Box>
Expand Down Expand Up @@ -402,6 +402,7 @@ function PrescriptionHistory({ navigation, route }: PrescriptionHistoryProps) {
text: t('goToMyVAHealth'),
a11yLabel: a11yLabelVA(t('goToMyVAHealth')),
variant: 'base',
testID: 'goToMyVAHealthPrescriptionHistoryID',
}

return (
Expand All @@ -415,7 +416,8 @@ function PrescriptionHistory({ navigation, route }: PrescriptionHistoryProps) {
descriptionA11yLabel={a11yLabelVA(t('prescription.history.transferred.instructions'))}
analytics={{
onExpand: () => logAnalyticsEvent(Events.vama_cerner_alert_exp()),
}}>
}}
testID="prescriptionRefillWarningTestID">
<TextView
mt={theme.dimensions.standardMarginBetween}
paragraphSpacing={true}
Expand Down Expand Up @@ -526,6 +528,7 @@ function PrescriptionHistory({ navigation, route }: PrescriptionHistoryProps) {
logAnalyticsEvent(Events.vama_rx_help())
navigateTo('PrescriptionHelp')
},
testID: 'prescriptionsHelpID',
}

// ErrorComponent normally handles both downtime and error but only for 1 screenID.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ function RefillRequestSummary({ navigation, route }: RefillRequestSummaryProps)
onLeftButtonPress={() => {
onNavToHistory()
}}
title={t('refillRequest')}>
title={t('refillRequest')}
leftButtonTestID="prescriptionsBackTestID">
{showLoadingScreenRequestRefillsRetry ? (
<LoadingComponent text={t('prescriptions.refill.send', { count: 1 })} />
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ export function RefillScreen({ navigation, route }: RefillScreenProps) {
onLeftButtonPress={navigation.goBack}
title={t('refillRequest')}
primaryContentButtonText={hidePrimaryButton ? '' : primaryButtonText}
primaryButtonTestID="requestRefillsButtonID"
scrollViewRef={scrollViewRef}
onPrimaryContentButtonPress={() => {
if (selectedPrescriptionsCount === 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ function RefillTrackingDetails({ route, navigation }: RefillTrackingDetailsProps
<FullScreenSubtask
title={t('prescriptionTracking')}
rightButtonText={t('close')}
testID="refillTrackingDetailsTestID">
testID="refillTrackingDetailsTestID"
rightButtonTestID="prescriptionsBackTestID">
{prescriptionInDowntime ? (
<ErrorComponent screenID={ScreenIDTypesConstants.PRESCRIPTION_SCREEN_ID} />
) : loadingTrackingInfo ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function StatusDefinition({ navigation, route }: StatusDefinitionProps) {
})

return (
<LargePanel title={t('statusDefinition')} rightButtonText={t('close')}>
<LargePanel title={t('statusDefinition')} rightButtonText={t('close')} rightButtonTestID="prescriptionsBackTestID">
<Box mx={theme.dimensions.gutter} mb={theme.dimensions.contentMarginBottom}>
<TextView variant="MobileBodyBold">{display}</TextView>
<TextView variant="MobileBody" mt={theme.dimensions.condensedMarginBetween} accessibilityLabel={a11yLabel}>
Expand Down

0 comments on commit 709bf93

Please sign in to comment.