Skip to content

Commit

Permalink
Merge branch 'main' into adam/remove-shipping-usa
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-blanchard authored Oct 2, 2024
2 parents 3e3460d + 7f1d2b7 commit e356d61
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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 = <CheckStatusPrinting />

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()
})
})
5 changes: 5 additions & 0 deletions public/locales/en/status.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@
},
"one-name": "Applicants with <strong>only one name</strong> (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.",
Expand Down
5 changes: 5 additions & 0 deletions public/locales/fr/status.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@
},
"one-name": "Les requérants n'ayant <strong>qu'un seul nom</strong> (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.",
Expand Down
4 changes: 4 additions & 0 deletions src/components/CheckStatusInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -33,6 +34,9 @@ export const CheckStatusInfo = ({
case StatusCode.PASSPORT_ISSUED_READY_FOR_PICKUP:
statusComponent = <CheckStatusReadyForPickup />
break
case StatusCode.PASSPORT_IS_PRINTING:
statusComponent = <CheckStatusPrinting />
break
case StatusCode.PASSPORT_ISSUED_SHIPPING_CANADA_POST:
statusComponent = (
<CheckStatusShippingCanadaPost
Expand Down
19 changes: 19 additions & 0 deletions src/components/check-status-responses/CheckStatusPrinting.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { useTranslation } from 'next-i18next'

import AlertBlock from '../AlertBlock'

export const CheckStatusPrinting = () => {
const { t } = useTranslation('status')
return (
<>
<h1 data-testid="printing" className="h1" tabIndex={-1}>
{t('printing.in-printing')}
</h1>
<AlertBlock page="status-ready-pickup" />
<p>{t('printing.reviewed-printing')}</p>
<p>{t('printing.print-update')}</p>
</>
)
}

export default CheckStatusPrinting
1 change: 1 addition & 0 deletions src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
}

0 comments on commit e356d61

Please sign in to comment.