describe("acquisitions/basketempty", function () {
const languages = ['en', 'es-ES', 'fr-FR', 'de-DE', 'el-GR', 'zh-Hant-TW'];
languages.forEach((lang) => {
describe(`in ${lang}`, () => {
beforeEach(function(){
// If previous test failed, skip this one
if (Cypress.env("TEST_FAILED")) {
this.skip();
}
cy.login();
/* No specific padding defined */
cy.set_cookie_lang(lang);
});
it("basketempty", function () {
cy.visit("/cgi-bin/koha/acqui/basket.pl?basketno=1");
cy.waitForPageLoad();
/* FIXME - Invalid step Needs a basket with id 1 to be created first. On KTD in sample data there is already a basket with id=1 so it's not necessary to add it in the spec. */
cy.get("#acq_basket.acq div.col-md-10.order-sm-1.order-md-2 main").should('be.visible').screenshot("basketempty");
});
});
});
afterEach(function () {
Cypress.env('PADDING_BEFORE_SCREENSHOT', undefined);
if (this.currentTest.state === 'failed') {
Cypress.env("TEST_FAILED", true);
}
});
});
Spec data
Page
basket.pl?basketno=1
Interface
staff
Element selector
#acq_basket.acq div.col-md-10.order-sm-1.order-md-2 main
Missing selector
N
setup
workflow
Needs a basket with id 1 to be created first. On KTD in sample data there is already a basket with id=1 so it's not necessary to add it in the spec.