blob: db454e39f85e035e032b80b7dfe49cbb886cb9bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import { describe, expect, it } from '@jest/globals';
import { render, screen as rtlScreen } from '../../../../../tests/utils';
import { SiteBranding } from './site-branding';
import { CONFIG } from 'src/utils/config';
import { ROUTES } from 'src/utils/constants';
describe('SiteBranding', () => {
it('renders the website logo, name and baseline', () => {
render(<SiteBranding />);
expect(
rtlScreen.getByRole('img', { name: `${CONFIG.name} picture` })
).toBeInTheDocument();
expect(
rtlScreen.getByRole('img', { name: `${CONFIG.name} logo` })
).toBeInTheDocument();
expect(rtlScreen.getByRole('link', { name: CONFIG.name })).toHaveAttribute(
'href',
ROUTES.HOME
);
expect(rtlScreen.getByText(CONFIG.baseline)).toBeInTheDocument();
});
});
|