|
Lines 18-31
describe("License CRUD operations", () => {
Link Here
|
| 18 |
"/api/v1/erm/config", |
18 |
"/api/v1/erm/config", |
| 19 |
'{"settings":{"ERMModule":"1","ERMProviders":["local"]}}' |
19 |
'{"settings":{"ERMModule":"1","ERMProviders":["local"]}}' |
| 20 |
); |
20 |
); |
|
|
21 |
cy.intercept("GET", "/api/v1/erm/licenses*", { |
| 22 |
statusCode: 200, |
| 23 |
body: [cy.get_license()], |
| 24 |
headers: { |
| 25 |
"X-Total-Count": "5", |
| 26 |
}, |
| 27 |
}).as("getDashboardLicenses"); |
| 21 |
}); |
28 |
}); |
| 22 |
|
29 |
|
| 23 |
it("List license", () => { |
30 |
it("List license", () => { |
|
|
31 |
cy.visit("/cgi-bin/koha/erm/erm.pl"); |
| 32 |
cy.wait("@getDashboardLicenses"); |
| 24 |
// GET license returns 500 |
33 |
// GET license returns 500 |
| 25 |
cy.intercept("GET", "/api/v1/erm/licenses*", { |
34 |
cy.intercept("GET", "/api/v1/erm/licenses*", { |
| 26 |
statusCode: 500, |
35 |
statusCode: 500, |
| 27 |
}); |
36 |
}); |
| 28 |
cy.visit("/cgi-bin/koha/erm/erm.pl"); |
|
|
| 29 |
cy.get(".sidebar_menu").contains("Licenses").click(); |
37 |
cy.get(".sidebar_menu").contains("Licenses").click(); |
| 30 |
cy.get("main div[class='alert alert-warning']").contains( |
38 |
cy.get("main div[class='alert alert-warning']").contains( |
| 31 |
"Something went wrong: Error: Internal Server Error" |
39 |
"Something went wrong: Error: Internal Server Error" |
| 32 |
- |
|
|