describe("acquisitions/showactivebaskets", function () { const languages = ['en', 'es-ES', 'fr-FR']; languages.forEach((lang) => { describe(`in ${lang}`, () => { beforeEach(function(){ // If previous test failed, skip this one if (Cypress.env("TEST_FAILED")) { this.skip(); } cy.login(); cy.set_cookie_lang(lang); }); it("showactivebaskets", function () { cy.visit("/cgi-bin/koha/acqui/booksellers.pl?booksellerid=1"); cy.get("#acq_booksellers #acqui_order_supplierlist div.supplier.page-section").should('be.visible').screenshot("showactivebaskets"); }); }); }); afterEach(function () { if (this.currentTest.state === 'failed') { Cypress.env("TEST_FAILED", true); } }); });
Needs at least one basket for the vendor with the id 1 to be created first. On KTD in sample data there is already a basket in sample data so it's not necessary to add it in the spec.