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

387
Vistas
This error occurred during a before each hook we are skipping the remaining tests in the current suite: POST method

Can you please help me to find out the proper solution for this? This test case is about beforeEach - which is for setup the data and after setup the data I test the other endPoint.

I have faced problems like the below:

My codes in spec.js

enter image description here

 beforeEach(() => {
    cy.fixture("token.json").then((data) => {
      cy.request({
        method: "POST",
        url: data.url + "/setup",
        headers: {
          Authorization: data.token,
          "content-type": "application/json",
        },
        body: {
          "test-case": "base",
        },
        failOnStatusCode: false,
      }).then((res) => {
        expect(res.status).to.eq(200);
      });
    });

    it("get a list of auctions filtered by the options passed in the body", () => {
      cy.fixture("token.json").then((data) => {});
      cy.request({
        method: "POST",
        url: data.url,

        headers: {
          Authorization: data.token,
          "content-type": "application/json", 
        },

        body: {
          auctionType: ["basic_auction"],
          statuses: ["ongoing"],
        },

        failOnStatusCode: false,
      }).then((res) => {
        expect(res.status).to.eq(200);

        // assert
        assert.isNotNull(res.body, "is not null");
        assert.isNotNull(res.body.createdAt, "is not null");
        //})
      });
    });
  });


And I have fixtures->token.json where I stored Token and URL

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