Skip to content

Commit

Permalink
Reposition intercept to ensure it is prepared when invoked
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperbirch1 committed Oct 11, 2023
1 parent b6c7dfd commit e19c561
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,15 @@ describe("Reservation details modal test", () => {
message: "OK"
});

cy.intercept(
"PUT",
"**/external/v1/agencyid/patrons/patronid/reservations",
{
statusCode: 201,
body: { code: 101, message: "OK" }
}
).as("put-library-branch-and-expiry-date");

cy.visit(
"/iframe.html?path=/story/apps-reservation-list--reservation-list-physical-details-modal"
);
Expand Down Expand Up @@ -491,15 +500,6 @@ describe("Reservation details modal test", () => {
.find(".dropdown__option")
.should("have.text", "Choose one1 month2 months3 months6 months1 year");

cy.intercept(
"PUT",
"**/external/v1/agencyid/patrons/patronid/reservations**",
{
statusCode: 201,
body: { code: 101, message: "OK" }
}
).as("put-library-branch-and-expiry-date");

// ID 15 2.g user clicks save
// ID 16 4. user clicks save
cy.getBySel("reservation-form-button").should("exist").click();
Expand Down

0 comments on commit e19c561

Please sign in to comment.