Fix cypress landing flaky test
parent
cae23d2b20
commit
0804e1d452
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue