bored-baker-20372
06/18/2022, 3:49 PMjs
beforeEach(() => {
cy.intercept('POST', '/api/product/search')
.as('postProdSearch')
})
it('navigate to order', function() {
// ...
cy.wait('@postProdSearch')
})
it('check order', function() {
// ...
cy.wait('@postProdSearch')
})
But is it a good practice to have a cy.intercept() code in the beforeEach() hook?