From 7cec2991e0a0e1c3d2aeecf6b1f819f88e59fbf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rialland?= Date: Tue, 28 Feb 2023 15:18:32 +0100 Subject: [PATCH] Set timeout to 10sec for home page search --- .../integration/mon-entreprise/landing.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/site/cypress/integration/mon-entreprise/landing.ts b/site/cypress/integration/mon-entreprise/landing.ts index 0caddbac1..90b27372e 100644 --- a/site/cypress/integration/mon-entreprise/landing.ts +++ b/site/cypress/integration/mon-entreprise/landing.ts @@ -43,11 +43,17 @@ describe('Landing page', function () { cy.get(searchInputPath).invoke('attr', 'type').should('equal', 'search') cy.get(searchInputPath).focus().type('noima') - cy.intercept({ - method: 'GET', - hostname: 'api.recherche-entreprises.fabrique.social.gouv.fr', - url: '/api/v1/search?*', - }) + cy.intercept( + { + method: 'GET', + hostname: 'api.recherche-entreprises.fabrique.social.gouv.fr', + url: '/api/v1/search?*', + }, + (req) => { + req.responseTimeout = 10 * 1000 + req.continue() + } + ) cy.get(searchResultsPath).children().should('have.length', 6) cy.get(searchResultsPath).children().first().click()