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()