|
Lines 66-72
describe("Vendor CRUD operations", () => {
Link Here
|
| 66 |
cy.visit("/cgi-bin/koha/acqui/acqui-home.pl"); |
66 |
cy.visit("/cgi-bin/koha/acqui/acqui-home.pl"); |
| 67 |
|
67 |
|
| 68 |
cy.intercept("GET", "/api/v1/acquisitions/vendors*", []); |
68 |
cy.intercept("GET", "/api/v1/acquisitions/vendors*", []); |
| 69 |
cy.visit("/cgi-bin/koha/vendors"); |
69 |
cy.visit("/cgi-bin/koha/acquisition/vendors"); |
| 70 |
cy.get("#vendors_list").contains("There are no vendors defined"); |
70 |
cy.get("#vendors_list").contains("There are no vendors defined"); |
| 71 |
|
71 |
|
| 72 |
const vendor = getVendor(); |
72 |
const vendor = getVendor(); |
|
Lines 79-85
describe("Vendor CRUD operations", () => {
Link Here
|
| 79 |
}, |
79 |
}, |
| 80 |
}); |
80 |
}); |
| 81 |
cy.intercept("GET", "/api/v1/acquisitions/vendors/*", vendor); |
81 |
cy.intercept("GET", "/api/v1/acquisitions/vendors/*", vendor); |
| 82 |
cy.visit("/cgi-bin/koha/vendors"); |
82 |
cy.visit("/cgi-bin/koha/acquisition/vendors"); |
| 83 |
cy.get("#vendors_list").contains("Showing 1 to 1 of 1 entries"); |
83 |
cy.get("#vendors_list").contains("Showing 1 to 1 of 1 entries"); |
| 84 |
}); |
84 |
}); |
| 85 |
|
85 |
|
|
Lines 92-98
describe("Vendor CRUD operations", () => {
Link Here
|
| 92 |
}); |
92 |
}); |
| 93 |
|
93 |
|
| 94 |
// Click the button in the toolbar |
94 |
// Click the button in the toolbar |
| 95 |
cy.visit("/cgi-bin/koha/vendors"); |
95 |
cy.visit("/cgi-bin/koha/acquisition/vendors"); |
| 96 |
cy.contains("New vendor").click(); |
96 |
cy.contains("New vendor").click(); |
| 97 |
cy.get("#vendor_add h1").contains("Add vendor"); |
97 |
cy.get("#vendor_add h1").contains("Add vendor"); |
| 98 |
|
98 |
|
|
Lines 180-186
describe("Vendor CRUD operations", () => {
Link Here
|
| 180 |
it("should edit a vendor", () => { |
180 |
it("should edit a vendor", () => { |
| 181 |
const vendor = getVendor(); |
181 |
const vendor = getVendor(); |
| 182 |
|
182 |
|
| 183 |
cy.visit("/cgi-bin/koha/vendors"); |
183 |
cy.visit("/cgi-bin/koha/acquisition/vendors"); |
| 184 |
cy.intercept("GET", "/api/v1/acquisitions/vendors/*", vendor).as( |
184 |
cy.intercept("GET", "/api/v1/acquisitions/vendors/*", vendor).as( |
| 185 |
"get-vendor" |
185 |
"get-vendor" |
| 186 |
); |
186 |
); |
|
Lines 218-224
describe("Vendor CRUD operations", () => {
Link Here
|
| 218 |
"X-Total-Count": "1", |
218 |
"X-Total-Count": "1", |
| 219 |
}, |
219 |
}, |
| 220 |
}); |
220 |
}); |
| 221 |
cy.visit("/cgi-bin/koha/vendors"); |
221 |
cy.visit("/cgi-bin/koha/acquisition/vendors"); |
| 222 |
const name_link = cy.get( |
222 |
const name_link = cy.get( |
| 223 |
"#vendors_list table tbody tr:first td:first a" |
223 |
"#vendors_list table tbody tr:first td:first a" |
| 224 |
); |
224 |
); |
|
Lines 244-250
describe("Vendor CRUD operations", () => {
Link Here
|
| 244 |
}, |
244 |
}, |
| 245 |
}); |
245 |
}); |
| 246 |
cy.intercept("GET", "/api/v1/acquisitions/vendors/*", vendor); |
246 |
cy.intercept("GET", "/api/v1/acquisitions/vendors/*", vendor); |
| 247 |
cy.visit("/cgi-bin/koha/vendors"); |
247 |
cy.visit("/cgi-bin/koha/acquisition/vendors"); |
| 248 |
|
248 |
|
| 249 |
cy.get("#vendors_list table tbody tr:first").contains("Delete").click(); |
249 |
cy.get("#vendors_list table tbody tr:first").contains("Delete").click(); |
| 250 |
cy.get(".alert-warning.confirmation h1").contains("remove this vendor"); |
250 |
cy.get(".alert-warning.confirmation h1").contains("remove this vendor"); |
| 251 |
- |
|
|