From 802285872a2c57e7a5e130f32a2b45497d7687f1 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Tue, 5 Dec 2023 19:11:34 +0100 Subject: refactor(pages): refine Projects page * add a `contexts` meta key to projects * replace `technologies` with `contexts` key in projects list * make getProjectsFilenames async * add Cypress tests --- tests/cypress/e2e/pages/projects.cy.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'tests/cypress/e2e/pages/projects.cy.ts') diff --git a/tests/cypress/e2e/pages/projects.cy.ts b/tests/cypress/e2e/pages/projects.cy.ts index b477400..5931ffe 100644 --- a/tests/cypress/e2e/pages/projects.cy.ts +++ b/tests/cypress/e2e/pages/projects.cy.ts @@ -1,6 +1,22 @@ +import { ROUTES } from '../../../../src/utils/constants'; + describe('Projects Page', () => { + beforeEach(() => { + cy.visit(ROUTES.PROJECTS); + }); + it('successfully loads', () => { - cy.visit('/projets'); cy.findByRole('heading', { level: 1 }).contains('Projets'); }); + + it('contains a breadcrumbs', () => { + cy.findByRole('navigation', { name: 'Fil d’Ariane' }).should('exist'); + }); + + it('can list the projects', () => { + cy.findAllByRole('link', { name: /Consulter/ }).should( + 'have.length.at.least', + 1 + ); + }); }); -- cgit v1.2.3