blob: fa60b8ffc6aa872bf5487c50c7937c366aeb9653 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import { describe, expect, it } from '@jest/globals';
import { render, screen as rtlScreen } from '../../../../../tests/utils';
import { CONFIG } from '../../../../utils/config';
import { ROUTES } from '../../../../utils/constants';
import { SiteFooter } from './site-footer';
describe('SiteFooter', () => {
it('renders the website colophon', () => {
render(<SiteFooter />);
expect(rtlScreen.getByRole('contentinfo')).toBeInTheDocument();
expect(rtlScreen.getByText(CONFIG.copyright.startYear)).toBeInTheDocument();
expect(rtlScreen.getByText(CONFIG.copyright.endYear)).toBeInTheDocument();
expect(rtlScreen.getByText(new RegExp(CONFIG.name))).toBeInTheDocument();
expect(rtlScreen.getByTitle('CC BY SA')).toBeInTheDocument();
expect(
rtlScreen.getByRole('link', { name: 'Legal notice' })
).toHaveAttribute('href', ROUTES.LEGAL_NOTICE);
});
});
|