aboutsummaryrefslogtreecommitdiffstats
path: root/tests/cypress/e2e/pages/legal-notice.cy.ts
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-09-26 15:54:28 +0200
committerArmand Philippot <git@armandphilippot.com>2023-10-24 12:23:48 +0200
commit70efcfeaa0603415dd992cb662d8efb960e6e49a (patch)
tree5d37e98fae9aa7e5c3d8ef30a10db9fed9b63e36 /tests/cypress/e2e/pages/legal-notice.cy.ts
parent31695306bfed44409f03006ea717fd2cceff8f87 (diff)
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.
Diffstat (limited to 'tests/cypress/e2e/pages/legal-notice.cy.ts')
-rw-r--r--tests/cypress/e2e/pages/legal-notice.cy.ts4
1 files changed, 3 insertions, 1 deletions
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');
});
});