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

(-)a/t/cypress/integration/VueFramework_spec.ts (-1 / +41 lines)
Lines 329-332 describe("Form features", () => { Link Here
329
            cy.get("#name").should("have.value", vendor.name);
329
            cy.get("#name").should("have.value", vendor.name);
330
        });
330
        });
331
    });
331
    });
332
    it("Should give three possible actions on saving", function () {
333
        cy.visit("/cgi-bin/koha/acquisition/vendors/add");
334
        cy.get("#toolbar button").contains("Save");
335
        cy.get("#toolbar a.dropdown-toggle").click();
336
        cy.get("#toolbar ul.dropdown-menu li:first").contains(
337
            "Save and continue editing"
338
        );
339
        cy.get("#toolbar ul.dropdown-menu li")
340
            .eq(1)
341
            .contains("Save and return to list");
342
343
        const vendor = cy.getVendor();
344
345
        cy.intercept(
346
            "GET",
347
            new RegExp("/api/v1/acquisitions/vendors/(?!config$).+"),
348
            vendor
349
        ).as("get-vendor");
350
        cy.get("#name").type(vendor.name);
351
        cy.get("#toolbar button").contains("Save").click();
352
        cy.wait("@get-vendor");
353
        cy.get("#vendors_show");
354
355
        cy.visit("/cgi-bin/koha/acquisition/vendors/add");
356
        cy.get("#name").type(vendor.name);
357
        cy.get("#toolbar a.dropdown-toggle").click();
358
        cy.get("#toolbar ul.dropdown-menu li:first")
359
            .contains("Save and continue editing")
360
            .click();
361
        cy.wait("@get-vendor");
362
        cy.get("#vendors_add");
363
364
        cy.visit("/cgi-bin/koha/acquisition/vendors/add");
365
        cy.get("#name").type(vendor.name);
366
        cy.get("#toolbar a.dropdown-toggle").click();
367
        cy.get("#toolbar ul.dropdown-menu li")
368
            .eq(1)
369
            .contains("Save and return to list")
370
            .click();
371
        cy.get("#vendors_list");
372
    });
332
});
373
});
333
- 

Return to bug 40191