Tengo dos bloques de pruebas que comienzan de forma similar pero el segundo siempre falla. En el código JS, estoy cambiando entre "completado" y "cancelado" con socket.io
[Cypress detectó que usted devolvió una promesa de un comando al mismo tiempo que invocaba uno o más comandos cy en esa promesa
El comando que devolvió la promesa fue:
cy.esperar()
El comando cy que invocaste dentro de la promesa fue:
cy.get()] IMAGEN
Mi código
describe('REMI: Logistic > History > Orders', () => { beforeEach(() => { cy.intercept('GET', '/v1/zones***').as('get-zones'); cy.visit('/logistic/history'); }); it('Get the first canceled order and open modal', () => { cy.wait('@get-zones'); cy.get('.css-6j8wv5-Input:first').click().type('san Jose{enter}'); cy.get('.css-6j8wv5-Input').eq(1).click().type('canceled{enter}'); cy.get('#date-init').type('2021-01-19'); cy.get('.order-card:first').should('exist'); cy.get('.order-card:first .view-order__text').click(); cy.contains('Order #').should('exist'); }); it('Get the first completed order and open modal', () => { cy.wait('@get-zones'); cy.get('.css-6j8wv5-Input:first').click().type('san Jose{enter}'); cy.get('.css-6j8wv5-Input').eq(1).click().type('completed{enter}'); cy.get('#date-init').type('2021-01-19'); cy.get('.order-card:first').should('exist'); cy.get( 'div.ordershistory-container > div.ordershistory-list > div.card_container:first > div:nth-child(3) > p' ).click(); cy.contains('Order #').should('exist'); }); });