View | Details | Raw Unified | Return to bug 38899
Collapse All | Expand All

(-)a/t/cypress/integration/Acquisitions/Vendors_spec.ts (-6 / +5 lines)
Lines 96-105 describe("Vendor CRUD operations", () => { Link Here
96
        // Click the button in the toolbar
96
        // Click the button in the toolbar
97
        cy.visit("/cgi-bin/koha/acquisition/vendors");
97
        cy.visit("/cgi-bin/koha/acquisition/vendors");
98
        cy.contains("New vendor").click();
98
        cy.contains("New vendor").click();
99
        cy.get("#vendor_add h1").contains("Add vendor");
99
        cy.get("#add_vendor h1").contains("Add vendor");
100
100
101
        // Fill in the form for normal attributes
101
        // Fill in the form for normal attributes
102
        cy.get("#vendor_add").contains("Submit").click();
102
        cy.get("#toolbar").contains("Save").click();
103
        cy.get("input:invalid,textarea:invalid,select:invalid").should(
103
        cy.get("input:invalid,textarea:invalid,select:invalid").should(
104
            "have.length",
104
            "have.length",
105
            1
105
            1
Lines 175-181 describe("Vendor CRUD operations", () => { Link Here
175
            statusCode: 201,
175
            statusCode: 201,
176
            body: vendor,
176
            body: vendor,
177
        });
177
        });
178
        cy.get("#vendor_add").contains("Submit").click();
178
        cy.get("#toolbar").contains("Save").click();
179
        cy.get("main div[class='alert alert-info']").contains("Vendor created");
179
        cy.get("main div[class='alert alert-info']").contains("Vendor created");
180
    });
180
    });
181
181
Lines 201-207 describe("Vendor CRUD operations", () => { Link Here
201
        cy.get("#vendors_list table tbody tr:first").contains("Edit").click();
201
        cy.get("#vendors_list table tbody tr:first").contains("Edit").click();
202
        cy.wait("@get-vendor");
202
        cy.wait("@get-vendor");
203
        cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
203
        cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
204
        cy.get("#vendor_add h1").contains("Edit vendor");
204
        cy.get("#add_vendor h1").contains("Edit vendor");
205
205
206
        // Form has been correctly filled in
206
        // Form has been correctly filled in
207
        cy.get("#vendor_name").should("have.value", vendor.name);
207
        cy.get("#vendor_name").should("have.value", vendor.name);
Lines 214-220 describe("Vendor CRUD operations", () => { Link Here
214
            statusCode: 200,
214
            statusCode: 200,
215
            body: vendor,
215
            body: vendor,
216
        });
216
        });
217
        cy.get("#vendor_add").contains("Submit").click();
217
        cy.get("#toolbar").contains("Save").click();
218
        cy.get("main div[class='alert alert-info']").contains("Vendor updated");
218
        cy.get("main div[class='alert alert-info']").contains("Vendor updated");
219
    });
219
    });
220
220
221
- 

Return to bug 38899