From 478fa2b57b2c88a1cb8b9b492de120e2c23c25ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rialland?= Date: Wed, 2 Aug 2023 10:06:07 +0200 Subject: [PATCH] Fix test --- .../{localisation-field.js => localisation-field.ts} | 7 +++++++ 1 file changed, 7 insertions(+) rename site/cypress/integration/mon-entreprise/{localisation-field.js => localisation-field.ts} (82%) diff --git a/site/cypress/integration/mon-entreprise/localisation-field.js b/site/cypress/integration/mon-entreprise/localisation-field.ts similarity index 82% rename from site/cypress/integration/mon-entreprise/localisation-field.js rename to site/cypress/integration/mon-entreprise/localisation-field.ts index 1c5c93548..5839f0caa 100644 --- a/site/cypress/integration/mon-entreprise/localisation-field.js +++ b/site/cypress/integration/mon-entreprise/localisation-field.ts @@ -6,11 +6,18 @@ describe('Champs localisation (simulateur salarié)', function () { } it('should not crash when selecting localisation', function () { + cy.intercept({ + method: 'GET', + hostname: 'geo.api.gouv.fr', + url: '/communes*', + }).as('communes') + cy.visit(encodeURI('/simulateurs/salaire-brut-net')) cy.contains('SMIC').click() cy.contains('button', 'Commune').click() cy.contains('Commune ou code postal').click({ force: true }) cy.focused().type('Steenvoorde') + cy.wait('@communes') cy.contains('Steenvoorde (59114)').click({ force: true }) cy.contains('Suivant').click({ force: true }) cy.contains('Modifier mes réponses').click({ force: true })