Skip to content

Commit

Permalink
CU/9844-rachael-detox-decisionLetters-replace-by-text (#9845)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbontrager authored Oct 11, 2024
1 parent eba430b commit 189a894
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion VAMobile/e2e/tests/Claims.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ describe('Claims Screen', () => {
})

it('should tap on the closed tab', async () => {
await element(by.id('claimsHistoryClosedID')).tap()
await element(by.id(CommonE2eIdConstants.CLAIMS_HISTORY_CLOSED_TAB_ID)).tap()
})

it('verify the status details page of closed claim with decision letter', async () => {
Expand Down
13 changes: 7 additions & 6 deletions VAMobile/e2e/tests/DecisionLetters.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export const DecisionLettersE2eIDConstants = {
DECISION_CLAIM_LETTER_1_ID: 'March 11, 2023 letter Notification Letter (e.g. VA 20-8993, VA 21-0290, PCGL)',
DECISION_CLAIM_LETTER_2_ID: 'September 21, 2022 letter Decision Rating Letter',
CLAIMS_HISTORY_TEXT: 'Claims history',
CLAIM_LETTERS_BACK_ID: 'claimLettersBackTestID',
TO_DECISION_LETTERS_ID: 'toClaimLettersID',
}

beforeAll(async () => {
Expand All @@ -29,7 +31,7 @@ beforeAll(async () => {

describe('Decision Letters Screen', () => {
it('should tap on the closed tab', async () => {
await element(by.text('Closed')).tap()
await element(by.id(CommonE2eIdConstants.CLAIMS_HISTORY_CLOSED_TAB_ID)).tap()
})

it('verify the status details page of closed claim with decision letter', async () => {
Expand All @@ -39,19 +41,18 @@ describe('Decision Letters Screen', () => {

it('verify that the claims letters sceen is displayed', async () => {
await element(by.id(DecisionLettersE2eIDConstants.GET_CLAIMS_LETTER_BUTTON_ID)).tap()
await expect(element(by.text('Claim letters'))).toExist()
await expect(element(by.id(DecisionLettersE2eIDConstants.DECISION_CLAIM_LETTER_1_ID))).toExist()
await expect(element(by.id(DecisionLettersE2eIDConstants.DECISION_CLAIM_LETTER_2_ID))).toExist()
})

it('should go back to the claims details page', async () => {
await element(by.text('Claim details')).tap()
await element(by.id(DecisionLettersE2eIDConstants.CLAIM_LETTERS_BACK_ID)).tap()
})

it('tap on claims letters', async () => {
await element(by.text(DecisionLettersE2eIDConstants.CLAIMS_HISTORY_TEXT)).tap()
await element(by.text('Claims')).tap()
await element(by.text('Claim letters')).tap()
await element(by.id(CommonE2eIdConstants.CLAIMS_DETAILS_BACK_ID)).tap()
await element(by.id(CommonE2eIdConstants.CLAIMS_HISTORY_BACK_ID)).tap()
await element(by.id(DecisionLettersE2eIDConstants.TO_DECISION_LETTERS_ID)).tap()
})

it('should tap on a claim letter and verify a pdf is displayed', async () => {
Expand Down
3 changes: 3 additions & 0 deletions VAMobile/e2e/tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ export const CommonE2eIdConstants = {
VETERANS_CRISIS_LINE_TEXT_ID: 'veteransCrisisLineTextNumberTestID',
VETERANS_CRISIS_LINE_CHAT_ID: 'veteransCrisisLineConfidentialChatTestID',
PREVIOUS_PAGE_ID: 'previous-page',
CLAIMS_DETAILS_BACK_ID: 'claimsDetailsBackTestID',
CLAIMS_HISTORY_BACK_ID: 'claimsHistoryBackTestID',
CLAIMS_HISTORY_CLOSED_TAB_ID: 'claimsHistoryClosedID',
}

/** Log the automation into demo mode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ const ClaimLettersScreen = ({ navigation }: ClaimLettersScreenProps) => {
})

return (
<FeatureLandingTemplate backLabel={backLabel} backLabelOnPress={navigation.goBack} title={t('claimLetters.title')}>
<FeatureLandingTemplate
backLabel={backLabel}
backLabelOnPress={navigation.goBack}
title={t('claimLetters.title')}
backLabelTestID="claimLettersBackTestID">
{loading || downloading ? (
<LoadingComponent text={t(loading ? 'claimLetters.loading' : 'claimLetters.downloading')} />
) : letterInfoError || claimsInDowntime ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const ClaimsScreen = ({ navigation }: ClaimsScreenProps) => {
title={t('claims.title')}>
<Box mb={theme.dimensions.standardMarginBetween}>
<LargeNavButton title={t('claimsHistory.title')} onPress={onClaimsHistory} />
<LargeNavButton title={t('claimLetters.title')} onPress={onClaimLettersPress} />
<LargeNavButton title={t('claimLetters.title')} onPress={onClaimLettersPress} testID="toClaimLettersID" />
</Box>
</FeatureLandingTemplate>
)
Expand Down

0 comments on commit 189a894

Please sign in to comment.