diff --git a/__tests__/components/check-status-responses/CheckStatusPrinting.test.tsx b/__tests__/components/check-status-responses/CheckStatusPrinting.test.tsx new file mode 100644 index 000000000..9a3dd5fe5 --- /dev/null +++ b/__tests__/components/check-status-responses/CheckStatusPrinting.test.tsx @@ -0,0 +1,31 @@ +import '@testing-library/jest-dom' +import { render, screen } from '@testing-library/react' + +import { axe, toHaveNoViolations } from 'jest-axe' + +import CheckStatusPrinting from '../../../src/components/check-status-responses/CheckStatusPrinting' + +expect.extend(toHaveNoViolations) + +jest.mock('../../../src/lib/useAlerts', () => ({ + useAlerts: () => ({ + isPending: false, + error: undefined, + data: undefined, + }), +})) + +describe('CheckStatusPrinting', () => { + const sut = + + it('renders', () => { + render(sut) + expect(screen.getByTestId('printing')).toBeInTheDocument() + }) + + it('meets a11y', async () => { + const { container } = render(sut) + const results = await axe(container) + expect(results).toHaveNoViolations() + }) +}) diff --git a/public/locales/en/status.json b/public/locales/en/status.json index feb5452d8..0c0ad7d0d 100644 --- a/public/locales/en/status.json +++ b/public/locales/en/status.json @@ -67,6 +67,11 @@ }, "one-name": "Applicants with only one name (single or multiple names entered all in one field) must call us at 1‑800‑567‑6868 to get the status of their application.", "previous": "Check the status of another application", + "printing": { + "in-printing": "We are printing your passport", + "reviewed-printing": "Your application has been reviewed and your passport is ready for printing. Be aware that printing can take a few business days.", + "print-update": "Once your passport has been printed, your status will be updated." + }, "ready-for-pickup": { "check-receipt": "Check your receipt for pick-up instructions", "date-passed": "If your pick-up date has passed, you can go in anytime to pick up your passport.", diff --git a/public/locales/fr/status.json b/public/locales/fr/status.json index 59d65c3c1..cf5cce462 100644 --- a/public/locales/fr/status.json +++ b/public/locales/fr/status.json @@ -67,6 +67,11 @@ }, "one-name": "Les requérants n'ayant qu'un seul nom (un ou plusieurs noms inscrits dans un seul champ) doivent nous appeler au 1-800-567-6868 pour connaître l'état de leur demande.", "previous": "Vérifier l'état d'une autre demande", + "printing": { + "in-printing": "Nous imprimons votre passeport", + "reviewed-printing": "Votre demande a été examinée et votre passeport est prêt à être imprimé. Sachez que l'impression peut prendre quelques jours ouvrables.", + "print-update": "Une fois votre passeport imprimé, l'état de votre demande sera mis à jour." + }, "ready-for-pickup": { "check-receipt": "Vérifiez votre reçu pour les instructions de retrait en personne", "date-passed": "Si votre date de retrait en personne est passée, vous pouvez aller chercher votre passeport à tout moment.", diff --git a/src/components/CheckStatusInfo.tsx b/src/components/CheckStatusInfo.tsx index 9fbcc18ee..d607766e7 100644 --- a/src/components/CheckStatusInfo.tsx +++ b/src/components/CheckStatusInfo.tsx @@ -5,6 +5,7 @@ import ActionButton, { ActionButtonStyle } from './ActionButton' import CheckStatusFileBeingProcessed from './check-status-responses/CheckStatusFileBeingProcessed' import CheckStatusNoRecord from './check-status-responses/CheckStatusNoRecord' import CheckStatusNotAcceptable from './check-status-responses/CheckStatusNotAcceptable' +import CheckStatusPrinting from './check-status-responses/CheckStatusPrinting' import CheckStatusReadyForPickup from './check-status-responses/CheckStatusReadyForPickup' import CheckStatusShippingCanadaPost from './check-status-responses/CheckStatusShippingCanadaPost' import CheckStatusShippingFedex from './check-status-responses/CheckStatusShippingFedex' @@ -33,6 +34,9 @@ export const CheckStatusInfo = ({ case StatusCode.PASSPORT_ISSUED_READY_FOR_PICKUP: statusComponent = break + case StatusCode.PASSPORT_IS_PRINTING: + statusComponent = + break case StatusCode.PASSPORT_ISSUED_SHIPPING_CANADA_POST: statusComponent = ( { + const { t } = useTranslation('status') + return ( + <> +

+ {t('printing.in-printing')} +

+ +

{t('printing.reviewed-printing')}

+

{t('printing.print-update')}

+ + ) +} + +export default CheckStatusPrinting diff --git a/src/lib/types.ts b/src/lib/types.ts index 5691752da..192acc10d 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -99,4 +99,5 @@ export enum StatusCode { PASSPORT_ISSUED_SHIPPING_CANADA_POST = '3', PASSPORT_ISSUED_SHIPPING_FEDEX = '4', NOT_ACCEPTABLE_FOR_PROCESSING = '5', + PASSPORT_IS_PRINTING = '6', }