diff --git a/VAMobile/e2e/tests/utils.ts b/VAMobile/e2e/tests/utils.ts index dc9ed7f3cd9..fdc41116f81 100644 --- a/VAMobile/e2e/tests/utils.ts +++ b/VAMobile/e2e/tests/utils.ts @@ -55,7 +55,6 @@ export const CommonE2eIdConstants = { START_NEW_MESSAGE_BUTTON_ID: 'startNewMessageButtonTestID', PRESCRIPTION_REFILL_BUTTON_TEXT: 'Start refill request', HOME_ACTIVITY_HEADER_TEXT: 'Activity', - CLAIM_PHASE_TOGGLE_TEXT: 'claimPhaseExpansion', IN_APP_REVIEW_TOGGLE_TEXT: 'inAppReview', CALL_VA_PHONE_NUMBER_ID: 'CallVATestID', CALL_VA_TTY_PHONE_NUMBER_ID: 'CallTTYTestID', diff --git a/VAMobile/src/screens/BenefitsScreen/ClaimsScreen/ClaimDetailsScreen/ClaimDetails/ClaimDetails.test.tsx b/VAMobile/src/screens/BenefitsScreen/ClaimsScreen/ClaimDetailsScreen/ClaimDetails/ClaimDetails.test.tsx deleted file mode 100644 index a8c009e7b77..00000000000 --- a/VAMobile/src/screens/BenefitsScreen/ClaimsScreen/ClaimDetailsScreen/ClaimDetails/ClaimDetails.test.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import React from 'react' - -import { screen } from '@testing-library/react-native' - -import { context, mockNavProps, render } from 'testUtils' - -import ClaimDetails from './ClaimDetails' - -context('ClaimDetails', () => { - beforeEach(() => { - const props = mockNavProps({ - claim: { - id: '600156928', - type: 'evss_claims', - attributes: { - dateFiled: '2019-06-06', - minEstDate: '2019-10-02', - maxEstDate: '2019-12-11', - phaseChangeDate: '2019-06-22', - open: true, - waiverSubmitted: false, - documentsNeeded: true, - developmentLetterSent: true, - decisionLetterSent: true, - phase: 3, - everPhaseBack: false, - currentPhaseBack: false, - requestedDecision: false, - claimType: 'Compensation', - updatedAt: '2020-12-07T20:37:12.041Z', - contentionList: ['Hearing Loss (Increase)'], - vaRepresentative: 'AMERICAN LEGION', - eventsTimeline: [ - { - type: 'never_received_from_you_list', - trackedItemId: 255455, - description: 'New & material evidence needed - denied SC previously (PTSD)', - displayName: 'Request 42', - overdue: false, - status: 'NO_LONGER_REQUIRED', - uploaded: false, - uploadsAllowed: false, - openedDate: undefined, - requestedDate: '2019-07-09', - receivedDate: undefined, - closedDate: '2019-08-08', - suspenseDate: undefined, - documents: [], - uploadDate: '2019-08-08', - date: '2019-08-08', - }, - ], - }, - }, - }) - - render() - }) - - it('renders claim details', () => { - expect(screen.getByText('Claim type')).toBeTruthy() - expect(screen.getByText('Compensation')).toBeTruthy() - expect(screen.getByText("What you've claimed")).toBeTruthy() - expect(screen.getByText('Hearing Loss (Increase)')).toBeTruthy() - expect(screen.getByText('Date received')).toBeTruthy() - expect(screen.getByText('June 06, 2019')).toBeTruthy() - expect(screen.getByText('Your representative for VA claims')).toBeTruthy() - expect(screen.getByText('AMERICAN LEGION')).toBeTruthy() - }) -}) diff --git a/VAMobile/src/screens/BenefitsScreen/ClaimsScreen/ClaimDetailsScreen/ClaimDetails/ClaimDetails.tsx b/VAMobile/src/screens/BenefitsScreen/ClaimsScreen/ClaimDetailsScreen/ClaimDetails/ClaimDetails.tsx deleted file mode 100644 index 4e6e1b862c6..00000000000 --- a/VAMobile/src/screens/BenefitsScreen/ClaimsScreen/ClaimDetailsScreen/ClaimDetails/ClaimDetails.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import React from 'react' -import { useTranslation } from 'react-i18next' - -import { ClaimData } from 'api/types' -import { Box, TextArea, TextView, VABulletList } from 'components' -import { NAMESPACE } from 'constants/namespaces' -import { a11yLabelVA } from 'utils/a11yLabel' -import { formatDateMMMMDDYYYY } from 'utils/formattingUtils' - -type ClaimDetailsProps = { - claim: ClaimData -} - -function ClaimDetails({ claim }: ClaimDetailsProps) { - const { t } = useTranslation(NAMESPACE.COMMON) - const { attributes } = claim - - const formattedDateFiled = formatDateMMMMDDYYYY(attributes?.dateFiled || '') - - return ( - - - - ) -} - -export default ClaimDetails diff --git a/VAMobile/src/screens/BenefitsScreen/ClaimsScreen/ClaimDetailsScreen/ClaimDetailsScreen.test.tsx b/VAMobile/src/screens/BenefitsScreen/ClaimsScreen/ClaimDetailsScreen/ClaimDetailsScreen.test.tsx index 106b7966f41..a55b634cb3d 100644 --- a/VAMobile/src/screens/BenefitsScreen/ClaimsScreen/ClaimDetailsScreen/ClaimDetailsScreen.test.tsx +++ b/VAMobile/src/screens/BenefitsScreen/ClaimsScreen/ClaimDetailsScreen/ClaimDetailsScreen.test.tsx @@ -30,7 +30,6 @@ context('ClaimDetailsScreen', () => { featureFlag: boolean = false, claim?: Partial, ): void => { - when(featureEnabled).calledWith('claimPhaseExpansion').mockReturnValue(featureFlag) when(featureEnabled).calledWith('submitEvidenceExpansion').mockReturnValue(featureFlag) let queriesData: QueriesData | undefined if (claim) { @@ -93,19 +92,7 @@ context('ClaimDetailsScreen', () => { renderWithData(ClaimTypeConstants.ACTIVE, false, { ...claimData, }) - await waitFor(() => - expect(screen.getByTestId('Step 1 of 5. completed. Claim received June 6, 2019')).toBeTruthy(), - ) - }) - - it('should display the ClaimDetails component', async () => { - renderWithData(ClaimTypeConstants.ACTIVE, false, { - ...claimData, - }) - await waitFor(() => fireEvent.press(screen.getByText('Details'))) - await waitFor(() => fireEvent.press(screen.getByText('Details'))) - - await waitFor(() => expect(screen.getByText('Claim type')).toBeTruthy()) + await waitFor(() => expect(screen.getByTestId('Step 1 of 8. Claim received. Complete.')).toBeTruthy()) }) it('should display the Files component', async () => { diff --git a/VAMobile/src/screens/BenefitsScreen/ClaimsScreen/ClaimDetailsScreen/ClaimDetailsScreen.tsx b/VAMobile/src/screens/BenefitsScreen/ClaimsScreen/ClaimDetailsScreen/ClaimDetailsScreen.tsx index 2addf59ad21..00c2a44e74c 100644 --- a/VAMobile/src/screens/BenefitsScreen/ClaimsScreen/ClaimDetailsScreen/ClaimDetailsScreen.tsx +++ b/VAMobile/src/screens/BenefitsScreen/ClaimsScreen/ClaimDetailsScreen/ClaimDetailsScreen.tsx @@ -42,7 +42,6 @@ import { featureEnabled } from 'utils/remoteConfig' import { screenContentAllowed } from 'utils/waygateConfig' import NeedHelpData from '../NeedHelpData/NeedHelpData' -import ClaimDetails from './ClaimDetails/ClaimDetails' import ClaimFiles from './ClaimFiles/ClaimFiles' import ClaimStatus from './ClaimStatus/ClaimStatus' @@ -57,10 +56,7 @@ function ClaimDetailsScreen({ navigation, route }: ClaimDetailsScreenProps) { const { t } = useTranslation(NAMESPACE.COMMON) const scrollViewRef = useRef(null) const navigateTo = useRouteNavigation() - const controlLabels = [ - t('claimDetails.status'), - featureEnabled('claimPhaseExpansion') ? t('files') : t('claimDetails.details'), - ] + const controlLabels = [t('claimDetails.status'), t('files')] const [selectedTab, setSelectedTab] = useState(0) const { claimID, claimType } = route.params @@ -90,7 +86,6 @@ function ClaimDetailsScreen({ navigation, route }: ClaimDetailsScreenProps) { }, [attributes]), ) //force a rerender due to react query updating data - const claimPhaseExpansionFlag = featureEnabled('claimPhaseExpansion') const submitEvidenceExpansionFlag = featureEnabled('submitEvidenceExpansion') useBeforeNavBackListener(navigation, () => { @@ -123,15 +118,13 @@ function ClaimDetailsScreen({ navigation, route }: ClaimDetailsScreenProps) { useEffect(() => { if (claimType === ClaimTypeConstants.ACTIVE && claim) { - if (claimPhaseExpansionFlag) { - if (count > 0 && !claim.attributes.waiverSubmitted) { - logAnalyticsEvent(Events.vama_claim_file_request(claimID)) - } else if (submitEvidenceExpansionFlag && claim.attributes.open && count >= 0) { - logAnalyticsEvent(Events.vama_claim_submit_ev(claimID)) - } + if (count > 0 && !claim.attributes.waiverSubmitted) { + logAnalyticsEvent(Events.vama_claim_file_request(claimID)) + } else if (submitEvidenceExpansionFlag && claim.attributes.open && count >= 0) { + logAnalyticsEvent(Events.vama_claim_submit_ev(claimID)) } } - }, [claimType, claimPhaseExpansionFlag, submitEvidenceExpansionFlag, count, claim, claimID]) + }, [claimType, submitEvidenceExpansionFlag, count, claim, claimID]) // Track how long user maintains focus on this screen useFocusEffect( @@ -229,37 +222,35 @@ function ClaimDetailsScreen({ navigation, route }: ClaimDetailsScreenProps) { ) } - if (claimPhaseExpansionFlag) { - if (count > 0 && !claim?.attributes?.waiverSubmitted) { - const buttonProps: ButtonProps = { - buttonType: ButtonVariants.Primary, - label: t('claimPhase.fileRequests.button.label'), - a11yHint: t('claimPhase.fileRequests.button.a11yHint'), - onPress: fileRequestsPress, - } - const alertProps: AlertProps = { - variant: 'warning', - header: t('claimPhase.youHaveFileRequest', { count }), - primaryButton: buttonProps, - expandable: false, - } - return ( - - - - ) - } else if (submitEvidenceExpansionFlag && attributes?.open) { - const buttonProps: ButtonProps = { - buttonType: ButtonVariants.Primary, - label: t('claimDetails.submitEvidence'), - onPress: submitEvidencePress, - } - return ( - -