diff --git a/src/apps/dashboard/dashboard.test.tsx b/src/apps/dashboard/dashboard.test.tsx index da37e93050..edf9a41bea 100644 --- a/src/apps/dashboard/dashboard.test.tsx +++ b/src/apps/dashboard/dashboard.test.tsx @@ -1300,6 +1300,50 @@ describe("Dashboard", () => { } }).as("work"); + cy.intercept( + "POST", + "**/external/agencyid/patrons/patronid/loans/renew/v2", + { + statusCode: 200, + body: [ + { + renewalStatus: ["deniedMaterialIsNotLoanable"], + loanDetails: { + loanId: 956250508, + materialItemNumber: "3846990827", + recordId: "28847238", + periodical: null, + loanDate: "2022-06-13T16:43:25.325", + dueDate: "2023-10-12", + loanType: "loan", + ilBibliographicRecord: null, + materialGroup: { + name: "fon2", + description: "Flere CD-plader" + } + } + }, + { + renewalStatus: ["deniedReserved"], + loanDetails: { + loanId: 956250508, + materialItemNumber: "3846990827", + recordId: "53667546", + periodical: null, + loanDate: "2022-06-13T16:43:25.325", + dueDate: "2023-10-12", + loanType: "loan", + ilBibliographicRecord: null, + materialGroup: { + name: "fon2", + description: "Flere CD-plader" + } + } + } + ] + } + ).as("renew"); + cy.visit("/iframe.html?id=apps-dashboard--dashboard-entry&viewMode=story"); cy.wait(["@fees", "@loans", "@reservations"]); }); diff --git a/src/apps/loan-list/list/loan-list.test.ts b/src/apps/loan-list/list/loan-list.test.ts index 44b87767ac..7bf757ce17 100644 --- a/src/apps/loan-list/list/loan-list.test.ts +++ b/src/apps/loan-list/list/loan-list.test.ts @@ -242,6 +242,50 @@ describe("Loan list", () => { message: "OK" }).as("product"); + cy.intercept( + "POST", + "**/external/agencyid/patrons/patronid/loans/renew/v2", + { + statusCode: 200, + body: [ + { + renewalStatus: ["deniedMaterialIsNotLoanable"], + loanDetails: { + loanId: 956250508, + materialItemNumber: "3846990827", + recordId: "28847238", + periodical: null, + loanDate: "2022-06-13T16:43:25.325", + dueDate: "2023-10-12", + loanType: "loan", + ilBibliographicRecord: null, + materialGroup: { + name: "fon2", + description: "Flere CD-plader" + } + } + }, + { + renewalStatus: ["deniedReserved"], + loanDetails: { + loanId: 956250508, + materialItemNumber: "3846990827", + recordId: "53667546", + periodical: null, + loanDate: "2022-06-13T16:43:25.325", + dueDate: "2023-10-12", + loanType: "loan", + ilBibliographicRecord: null, + materialGroup: { + name: "fon2", + description: "Flere CD-plader" + } + } + } + ] + } + ).as("renew"); + cy.visit("/iframe.html?path=/story/apps-loan-list--loan-list-entry"); cy.wait(["@physical_loans", "@digital_loans", "@work", "@cover"], { timeout: 10000