From 0804e1d4528868234eab3f90d33928e522cd9e4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rialland?= Date: Mon, 5 Dec 2022 15:10:00 +0100 Subject: [PATCH] Fix cypress landing flaky test --- site/cypress/integration/mon-entreprise/landing.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/site/cypress/integration/mon-entreprise/landing.ts b/site/cypress/integration/mon-entreprise/landing.ts index 307a52a2d..b9be4c37a 100644 --- a/site/cypress/integration/mon-entreprise/landing.ts +++ b/site/cypress/integration/mon-entreprise/landing.ts @@ -33,19 +33,19 @@ describe('Landing page', function () { FIXTURES_FOLDER ) - cy.intercept({ - method: 'GET', - hostname: 'api.recherche-entreprises.fabrique.social.gouv.fr', - url: '/api/v1/search*', - }).as('entreprises') - cy.visit('/') cy.get(currentCompanyPath).should('not.exist') cy.get(searchInputPath).should('have.attr', 'placeholder') cy.get(searchInputPath).invoke('attr', 'type').should('equal', 'search') - cy.get(searchInputPath).focus().type('noima').wait('@entreprises') + cy.get(searchInputPath).focus().type('noima') + + cy.intercept({ + method: 'GET', + hostname: 'api.recherche-entreprises.fabrique.social.gouv.fr', + url: '/api/v1/search?*', + }) cy.get(searchResultsPath).children().should('have.length', 6) cy.get(searchResultsPath).children().first().click()