mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-22 14:36:22 +00:00
Add first accessibility tests
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { MemoryRouter } from 'react-router';
|
||||
import { NotFound } from '../../src/common/NotFound';
|
||||
import { checkAccessibility } from '../__helpers__/accessibility';
|
||||
|
||||
describe('<NotFound />', () => {
|
||||
const setUp = (props = {}) => render(<MemoryRouter><NotFound {...props} /></MemoryRouter>);
|
||||
|
||||
it('passes a11y checks', () => checkAccessibility(setUp()));
|
||||
|
||||
it('shows expected error title', () => {
|
||||
setUp();
|
||||
expect(screen.getByText('Oops! We could not find requested route.')).toBeInTheDocument();
|
||||
|
||||
Reference in New Issue
Block a user