Fix cy tests

pull/2529/head
Jérémy Rialland 2023-03-02 18:51:56 +01:00 committed by Johan Girod
parent 96a7fcf3fe
commit 484e51532e
2 changed files with 8 additions and 4 deletions

View File

@ -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')
)
})

View File

@ -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)
})