|
Lines 64-70
describe("Vendor CRUD operations", () => {
Link Here
|
| 64 |
|
64 |
|
| 65 |
it("should list vendors", () => { |
65 |
it("should list vendors", () => { |
| 66 |
cy.visit("/cgi-bin/koha/acqui/acqui-home.pl"); |
66 |
cy.visit("/cgi-bin/koha/acqui/acqui-home.pl"); |
| 67 |
cy.get("#acqui_acqui_home_order").contains("Vendor list").click(); |
|
|
| 68 |
|
67 |
|
| 69 |
cy.intercept("GET", "/api/v1/acquisitions/vendors*", []); |
68 |
cy.intercept("GET", "/api/v1/acquisitions/vendors*", []); |
| 70 |
cy.visit("/cgi-bin/koha/vendors"); |
69 |
cy.visit("/cgi-bin/koha/vendors"); |
|
Lines 282-290
describe("External URLs", () => {
Link Here
|
| 282 |
|
281 |
|
| 283 |
it("should navigate to the receive shipments page", () => { |
282 |
it("should navigate to the receive shipments page", () => { |
| 284 |
cy.visit("/cgi-bin/koha/acqui/acqui-home.pl"); |
283 |
cy.visit("/cgi-bin/koha/acqui/acqui-home.pl"); |
| 285 |
cy.get("#acqui_acqui_home_order").contains("Vendor list").click(); |
|
|
| 286 |
|
284 |
|
| 287 |
const vendor = getVendor(); |
285 |
const vendor = getVendor(); |
|
|
286 |
|
| 288 |
cy.intercept("GET", "/api/v1/acquisitions/vendors*", { |
287 |
cy.intercept("GET", "/api/v1/acquisitions/vendors*", { |
| 289 |
statusCode: 200, |
288 |
statusCode: 200, |
| 290 |
body: [vendor], |
289 |
body: [vendor], |
|
Lines 293-305
describe("External URLs", () => {
Link Here
|
| 293 |
"X-Total-Count": "1", |
292 |
"X-Total-Count": "1", |
| 294 |
}, |
293 |
}, |
| 295 |
}); |
294 |
}); |
| 296 |
cy.intercept("GET", "/api/v1/acquisitions/vendors/*", vendor); |
|
|
| 297 |
cy.visit("/cgi-bin/koha/vendors"); |
295 |
cy.visit("/cgi-bin/koha/vendors"); |
| 298 |
const name_link = cy.get( |
296 |
const name_link = cy.get( |
| 299 |
"#vendors_list table tbody tr:first td:first a" |
297 |
"#vendors_list table tbody tr:first td:first a" |
| 300 |
); |
298 |
); |
| 301 |
name_link.should("have.text", vendor.name + " (#" + vendor.id + ")"); |
299 |
name_link.should("have.text", vendor.name + " (#" + vendor.id + ")"); |
| 302 |
name_link.click(); |
300 |
name_link.click(); |
|
|
301 |
cy.wait(500); |
| 302 |
cy.get("#vendors_show h1").contains(vendor.name); |
| 303 |
|
303 |
|
| 304 |
cy.get("#vendors_show").contains("Receive shipments").click(); |
304 |
cy.get("#vendors_show").contains("Receive shipments").click(); |
| 305 |
cy.get("h1").contains("Receive shipment from vendor " + vendor.name); |
305 |
cy.get("h1").contains("Receive shipment from vendor " + vendor.name); |
| 306 |
- |
|
|