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("#add_vendor").contains("Submit").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("#add_vendor").contains("Submit").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 193-199 describe("Vendor CRUD operations", () => { Link Here
193
        cy.get("#vendors_list table tbody tr:first").contains("Edit").click();
193
        cy.get("#vendors_list table tbody tr:first").contains("Edit").click();
194
        cy.wait("@get-vendor");
194
        cy.wait("@get-vendor");
195
        cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
195
        cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
196
        cy.get("#vendor_add h1").contains("Edit vendor");
196
        cy.get("#add_vendor h1").contains("Edit vendor");
197
197
198
        // Form has been correctly filled in
198
        // Form has been correctly filled in
199
        cy.get("#vendor_name").should("have.value", vendor.name);
199
        cy.get("#vendor_name").should("have.value", vendor.name);
Lines 206-212 describe("Vendor CRUD operations", () => { Link Here
206
            statusCode: 200,
206
            statusCode: 200,
207
            body: vendor,
207
            body: vendor,
208
        });
208
        });
209
        cy.get("#vendor_add").contains("Submit").click();
209
        cy.get("#add_vendor").contains("Submit").click();
210
        cy.get("main div[class='alert alert-info']").contains("Vendor updated");
210
        cy.get("main div[class='alert alert-info']").contains("Vendor updated");
211
    });
211
    });
212
212
213
- 

Return to bug 38899