diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-12-05 19:11:34 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-12-07 19:12:11 +0100 |
| commit | 802285872a2c57e7a5e130f32a2b45497d7687f1 (patch) | |
| tree | 9803af7e06f8b59353e5458f33e54d02b4b9613b /tests/cypress/e2e/pages/projects.cy.ts | |
| parent | e9d5a40432c451090e17859c764e52a96120b712 (diff) | |
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
Diffstat (limited to 'tests/cypress/e2e/pages/projects.cy.ts')
| -rw-r--r-- | tests/cypress/e2e/pages/projects.cy.ts | 18 |
1 files changed, 17 insertions, 1 deletions
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 + ); + }); }); |
