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/legal-notice.cy.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/cypress/e2e/pages/legal-notice.cy.ts') diff --git a/tests/cypress/e2e/pages/legal-notice.cy.ts b/tests/cypress/e2e/pages/legal-notice.cy.ts index f338a7a..0f2fb8c 100644 --- a/tests/cypress/e2e/pages/legal-notice.cy.ts +++ b/tests/cypress/e2e/pages/legal-notice.cy.ts @@ -1,6 +1,8 @@ +import { ROUTES } from '../../../../src/utils/constants'; + describe('Legal Notice Page', () => { it('successfully loads', () => { - cy.visit('/mentions-legales'); + cy.visit(ROUTES.LEGAL_NOTICE); cy.findByRole('heading', { level: 1 }).contains('Mentions légales'); }); }); -- cgit v1.2.3