* Minor changes * Basic implementation with some bugs * Removed files * Correct tab selection * Added tests * Disabled bottom bar buttons on preview loading * Applied other changes * Added tests for PageTitle * Added tests for LoadingPreview * Added test for Options.jsx * Removed comments * Fixed CSS * Removed unused code * Fixed test failure * Added aria-live * Nit fixe * Fixed tests * Applied suggested changes
25 lines
736 B
JavaScript
25 lines
736 B
JavaScript
import { h } from 'preact';
|
|
import { render } from '@testing-library/preact';
|
|
import { axe } from 'jest-axe';
|
|
import { LoadingPreview } from '..';
|
|
|
|
describe('<LoadingPreview />', () => {
|
|
it('should have no a11y violations', async () => {
|
|
const { container } = render(<LoadingPreview />);
|
|
const results = await axe(container);
|
|
|
|
expect(results).toHaveNoViolations();
|
|
});
|
|
|
|
it('should render', () => {
|
|
const { queryByTitle } = render(<LoadingPreview />);
|
|
|
|
expect(queryByTitle('Loading preview...')).toBeDefined();
|
|
});
|
|
|
|
it('should render with cover image', () => {
|
|
const { queryByTitle } = render(<LoadingPreview version="cover" />);
|
|
|
|
expect(queryByTitle('Loading preview...')).toBeDefined();
|
|
});
|
|
});
|