Add first accessibility tests

This commit is contained in:
Alejandro Celaya
2023-09-30 10:20:28 +02:00
parent ed83d4e842
commit 6d1d3c021a
17 changed files with 168 additions and 22 deletions

View File

@@ -1,5 +1,6 @@
import { screen } from '@testing-library/react';
import { AppUpdateBanner } from '../../src/common/AppUpdateBanner';
import { checkAccessibility } from '../__helpers__/accessibility';
import { renderWithEvents } from '../__helpers__/setUpTest';
describe('<AppUpdateBanner />', () => {
@@ -7,6 +8,8 @@ describe('<AppUpdateBanner />', () => {
const forceUpdate = vi.fn();
const setUp = () => renderWithEvents(<AppUpdateBanner isOpen toggle={toggle} forceUpdate={forceUpdate} />);
it('passes a11y checks', () => checkAccessibility(setUp()));
it('renders initial state', () => {
setUp();