diff options
Diffstat (limited to 'tests/cypress/e2e/pages')
| -rw-r--r-- | tests/cypress/e2e/pages/cv.cy.ts | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/tests/cypress/e2e/pages/cv.cy.ts b/tests/cypress/e2e/pages/cv.cy.ts index 13b937f..c509640 100644 --- a/tests/cypress/e2e/pages/cv.cy.ts +++ b/tests/cypress/e2e/pages/cv.cy.ts @@ -1,8 +1,35 @@ -import { ROUTES } from '../../../../src/utils/constants'; +import { PERSONAL_LINKS, ROUTES } from '../../../../src/utils/constants'; describe('CV Page', () => { - it('successfully loads', () => { + 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 + ); }); }); |
