From 484e51532e02241fcfea8b5f97f7eb969c99a002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rialland?= Date: Thu, 2 Mar 2023 18:51:56 +0100 Subject: [PATCH] Fix cy tests --- .../integration/mon-entreprise/english/navigation.ts | 8 ++++++-- site/cypress/integration/mon-entreprise/landing.ts | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/site/cypress/integration/mon-entreprise/english/navigation.ts b/site/cypress/integration/mon-entreprise/english/navigation.ts index f1da632cc..acf0af3e8 100644 --- a/site/cypress/integration/mon-entreprise/english/navigation.ts +++ b/site/cypress/integration/mon-entreprise/english/navigation.ts @@ -5,14 +5,18 @@ const writeFixtures = Cypress.env('record_http') !== undefined describe('General navigation', function () { it('should enable switching site language', function () { cy.visit( - fr ? encodeURI('/créer/auto-entrepreneur') : '/create/auto-entrepreneur' + fr + ? encodeURI('/assistants/choix-du-statut/auto-entrepreneur') + : '/assistants/choice-of-status/auto-entrepreneur' ) cy.get( fr ? '[data-test-id=en-switch-button]' : '[data-test-id=fr-switch-button]' ).click() cy.url().should( 'include', - fr ? '/create/auto-entrepreneur' : encodeURI('/créer/auto-entrepreneur') + fr + ? '/assistants/choice-of-status/auto-entrepreneur' + : encodeURI('/assistants/choix-du-statut/auto-entrepreneur') ) }) diff --git a/site/cypress/integration/mon-entreprise/landing.ts b/site/cypress/integration/mon-entreprise/landing.ts index 819b57107..12b44cea8 100644 --- a/site/cypress/integration/mon-entreprise/landing.ts +++ b/site/cypress/integration/mon-entreprise/landing.ts @@ -60,14 +60,14 @@ describe('Landing page', function () { cy.get(searchResultsPath).children().should('have.length', 6) cy.get(searchResultsPath).children().first().click() - cy.url().should('include', '/g%C3%A9rer') + cy.url().should('include', '/pour-mon-entreprise') cy.go('back') cy.get(currentCompanyPath).should('exist') cy.get('[data-test-id="cta-see-custom-simulators"]').click() - cy.url().should('include', '/g%C3%A9rer') + cy.url().should('include', '/pour-mon-entreprise') cy.writeInterceptResponses(pendingRequests, responses, FIXTURES_FOLDER) })