aboutsummaryrefslogtreecommitdiffstats
path: root/tests/cypress
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-11-29 18:42:58 +0100
committerArmand Philippot <git@armandphilippot.com>2023-11-29 18:42:58 +0100
commit86d70a6343b6d8ed2a1dbeadec10348de87fcf49 (patch)
tree76f0004d58adfc6057d7e749afd980d74314abcf /tests/cypress
parentd363306235f2a48f16e488f20f73e2233ddcf281 (diff)
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)
Diffstat (limited to 'tests/cypress')
-rw-r--r--tests/cypress/e2e/pages/cv.cy.ts31
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
+ );
});
});