From 86d70a6343b6d8ed2a1dbeadec10348de87fcf49 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Wed, 29 Nov 2023 18:42:58 +0100 Subject: refactor(pages): refine CV page * reduce the number of statements by grouping the messages * remove LinkedIn from the widget (it is obviously not a repo and my CV is already here, no need to link to an external site) --- tests/cypress/e2e/pages/cv.cy.ts | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'tests/cypress') 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 + ); }); }); -- cgit v1.2.3