Set timeout to 10sec for home page search

pull/2524/head
Jérémy Rialland 2023-02-28 15:18:32 +01:00 committed by Jérémy Rialland
parent 79670d74f0
commit 7cec2991e0
1 changed files with 11 additions and 5 deletions

View File

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