Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

286
Vistas
Cypress detected that you returned a promise from a command while also invoking one or more cy commands in that promise cy.wait and cy.get

I have two blocks of tests that start similar but the second one always fails. In the JS code, I'm changing between "completed" and "canceled" with socket.io

[Cypress detected that you returned a promise from a command while also invoking one or more cy commands in that promise

The command that returned the promise was:

cy.wait()

The cy command you invoked inside the promise was:

cy.get()] IMAGE

My code

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');
  });
});

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda