mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-24 07:26:22 +00:00
Add first accessibility tests
This commit is contained in:
@@ -3,6 +3,7 @@ import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { MemoryRouter } from 'react-router';
|
||||
import { Home } from '../../src/common/Home';
|
||||
import type { ServersMap, ServerWithId } from '../../src/servers/data';
|
||||
import { checkAccessibility } from '../__helpers__/accessibility';
|
||||
|
||||
describe('<Home />', () => {
|
||||
const setUp = (servers: ServersMap = {}) => render(
|
||||
@@ -11,6 +12,10 @@ describe('<Home />', () => {
|
||||
</MemoryRouter>,
|
||||
);
|
||||
|
||||
it('passes a11y checks', () => checkAccessibility(
|
||||
setUp({ '1a': fromPartial<ServerWithId>({ name: 'foo', id: '1' }) }),
|
||||
));
|
||||
|
||||
it('renders title', () => {
|
||||
setUp();
|
||||
expect(screen.getByRole('heading', { name: 'Welcome!' })).toBeInTheDocument();
|
||||
|
||||
Reference in New Issue
Block a user