POST Api is cancelling, it is intercepted and it got cancelled #28503
Unanswered
AkhilPatell
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Why POST Api is cancelling, it is intercepted but it got cancelled.
cy.fixture("temp_opportunity").then((team_competition) => {
cy.reload()
cy.wait(1000);
// Change Leader
//Intercept the API call
cy.intercept('POST',
/api/v1/competition/${team_competition.teamCode}/teamMembersDetails
).as('apiCall2');cy.get('[class="ki ki-bold-more-hor"]').should('exist')
.click({ force: true });
cy.get('[class="navi-text"]').should('exist')
.and('contain', "Change Leader")
.eq(1).click({ force: true });
cy.get('[class="m-2 text-gray-400 fw-bold fs-5"]').should('exist')
.and('contain', "I confirm")
cy.get('[class="mat-button-wrapper"]').should('exist')
.and('contain', "Submit")
.click({ multiple: true, force: true });
cy.wait(1000);
cy.wait("@apiCall2").then((interception) => {
expect(interception.response.statusCode).to.be.oneOf[200,301,304];
});
PS: please help me out in this situation
as backend code is correct.
Beta Was this translation helpful? Give feedback.
All reactions