mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-11 10:03:51 +00:00
Add more accessibility tests
This commit is contained in:
@@ -3,6 +3,7 @@ import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { MemoryRouter, useNavigate } from 'react-router-dom';
|
||||
import type { ReachableServer, SelectedServer } from '../../src/servers/data';
|
||||
import { EditServerFactory } from '../../src/servers/EditServer';
|
||||
import { checkAccessibility } from '../__helpers__/accessibility';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
vi.mock('react-router-dom', async () => ({
|
||||
@@ -31,6 +32,8 @@ describe('<EditServer />', () => {
|
||||
(useNavigate as any).mockReturnValue(navigate);
|
||||
});
|
||||
|
||||
it('passes a11y checks', () => checkAccessibility(setUp()));
|
||||
|
||||
it('renders nothing if selected server is not reachable', () => {
|
||||
setUp(fromPartial<SelectedServer>({}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user