1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
import { PERSONAL_LINKS, ROUTES } from '../../../../src/utils/constants';
describe('CV Page', () => {
beforeEach(() => {
cy.visit(ROUTES.CV);
});
it('renders the page contents', () => {
cy.findByRole('heading', { level: 1 }).contains('CV');
cy.findByRole('heading', { level: 2, name: 'Compétences' }).should('exist');
cy.findByRole('heading', {
level: 2,
name: 'Expériences professionnelles',
}).should('exist');
cy.findByRole('heading', { level: 2, name: 'Formations' }).should('exist');
});
it('renders an image with a link to download the CV', () => {
cy.findByRole('img', { name: /CV/ }).should('exist');
cy.findByRole('link', { name: /Télécharger/i }).should('exist');
});
it('renders some links to my repositories', () => {
cy.findByRole('link', { name: /Github/i }).should(
'have.attr',
'href',
PERSONAL_LINKS.GITHUB
);
cy.findByRole('link', { name: /Gitlab/i }).should(
'have.attr',
'href',
PERSONAL_LINKS.GITLAB
);
});
});
|