From 70efcfeaa0603415dd992cb662d8efb960e6e49a Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Tue, 26 Sep 2023 15:54:28 +0200 Subject: refactor(routes): replace hardcoded routes with constants It makes it easier to change a route if needed and it avoid typo mistakes. I also refactored a bit the concerned files to be complient with the new ESlint config. However, I should rewrite the pages to reduce the number of statements. --- tests/cypress/e2e/pages/cv.cy.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/cypress/e2e/pages/cv.cy.ts') diff --git a/tests/cypress/e2e/pages/cv.cy.ts b/tests/cypress/e2e/pages/cv.cy.ts index 419a098..13b937f 100644 --- a/tests/cypress/e2e/pages/cv.cy.ts +++ b/tests/cypress/e2e/pages/cv.cy.ts @@ -1,6 +1,8 @@ +import { ROUTES } from '../../../../src/utils/constants'; + describe('CV Page', () => { it('successfully loads', () => { - cy.visit('/cv'); + cy.visit(ROUTES.CV); cy.findByRole('heading', { level: 1 }).contains('CV'); }); }); -- cgit v1.2.3