Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

381
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!