From 7fc261becf462243f7239ef330c1edc9f77dbd4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rialland?= Date: Fri, 28 Apr 2023 19:42:58 +0200 Subject: [PATCH] Fix cypress --- .../integration/mon-entreprise/demande-mobilité.ts | 4 ++-- .../integration/mon-entreprise/english/navigation.ts | 4 ++-- .../integration/mon-entreprise/english/prerender.ts | 8 ++++---- .../integration/mon-entreprise/partage-simulation.js | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/site/cypress/integration/mon-entreprise/demande-mobilité.ts b/site/cypress/integration/mon-entreprise/demande-mobilité.ts index 0bc30a281..6322c0756 100644 --- a/site/cypress/integration/mon-entreprise/demande-mobilité.ts +++ b/site/cypress/integration/mon-entreprise/demande-mobilité.ts @@ -135,9 +135,9 @@ describe( cy.focused().tab().type('you@ajido.com').tab().type('+94655487015') cy.contains("Dans le pays d'accueil").click() - cy.focused().tab().type('{downarrow}{downarrow}') - cy.focused().tab().type('{downarrow}') + cy.focused().tab().type('{downarrow}{downarrow}') + cy.focused().tab().focused().tab().type('{downarrow}') cy.focused().tab().type('{downarrow}') cy.focused().tab().type('{downarrow}') cy.focused().tab().type('{downarrow}') diff --git a/site/cypress/integration/mon-entreprise/english/navigation.ts b/site/cypress/integration/mon-entreprise/english/navigation.ts index 7e5841263..b2cc78fdd 100644 --- a/site/cypress/integration/mon-entreprise/english/navigation.ts +++ b/site/cypress/integration/mon-entreprise/english/navigation.ts @@ -82,7 +82,7 @@ describe(`Navigation to income simulator using company name (${ .parentsUntil('li') .find('button') .click() - cy.contains('Lancer le simulateur').click() + cy.contains(fr ? 'Lancer le simulateur' : 'Launch the simulator').click() cy.location().should((loc) => { expect(loc.pathname).to.match(/sasu$/) }) @@ -111,7 +111,7 @@ describe(`Navigation to income simulator using company name (${ // ask if auto-entrepreneur cy.contains(fr ? 'auto-entrepreneur' : 'auto-entrepreneur') cy.contains(fr ? 'Oui' : 'Yes').click() - cy.contains('Lancer le simulateur').click() + cy.contains(fr ? 'Lancer le simulateur' : 'Launch the simulator').click() cy.location().should((loc) => { expect(loc.pathname).to.match(/auto-entrepreneur$/) }) diff --git a/site/cypress/integration/mon-entreprise/english/prerender.ts b/site/cypress/integration/mon-entreprise/english/prerender.ts index c82b06ead..d7b223ce7 100644 --- a/site/cypress/integration/mon-entreprise/english/prerender.ts +++ b/site/cypress/integration/mon-entreprise/english/prerender.ts @@ -93,10 +93,10 @@ describe('Test prerender', function () { cy.contains('I would like to start my own business') - cy.contains('a', 'Employee') - cy.contains('a', 'Auto-entrepreneur') - cy.contains('a', 'Status Comparison') - cy.contains('a', 'Discover all the simulators and assistants') + cy.contains('Employee') + cy.contains('Auto-entrepreneur') + cy.contains('Status Comparison') + cy.contains('Discover all the simulators and assistants') }, }, { diff --git a/site/cypress/integration/mon-entreprise/partage-simulation.js b/site/cypress/integration/mon-entreprise/partage-simulation.js index a507f24ca..362cd9848 100644 --- a/site/cypress/integration/mon-entreprise/partage-simulation.js +++ b/site/cypress/integration/mon-entreprise/partage-simulation.js @@ -30,7 +30,7 @@ describe('Partage (simulateur salarié)', function () { cy.visit(simulatorUrl) cy.get(brutInputSelector).first().type('{selectall}1539') cy.contains('De quel type de contrat').should('be.visible') - cy.get('label').contains('CDD').should('be.visible').click() + cy.get('label').contains('CDD').should('be.visible').click('left') cy.get('button').contains('Suivant').should('be.visible') cy.contains('Générer un lien').click() cy.get('input[aria-label="URL de votre simulation"]')