generated from DTS-STN/next-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #735 from DTS-STN/adam/add-status-printing
Added status printing page
- Loading branch information
Showing
6 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
__tests__/components/check-status-responses/CheckStatusPrinting.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/components/check-status-responses/CheckStatusPrinting.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters