describe("circ/transitreceive", 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.query("INSERT INTO branchtransfers (itemnumber, frombranch, tobranch, reason, daterequested, datesent) VALUE (278, \"FFL\", \"CPL\", \"Manual\", NOW(), NOW())")
cy.login();
/* No specific padding defined */
cy.set_cookie_lang(lang);
});
it("transitreceive", function () {
cy.visit("/cgi-bin/koha/circ/transferstoreceive.pl");
cy.waitForPageLoad();
cy.get("main").should('be.visible').screenshot("transitreceive");
});
});
});
afterEach(function () {
cy.query("DELETE FROM branchtransfers WHERE itemnumber=278 and frombranch=\"FFL\"")
Cypress.env('PADDING_BEFORE_SCREENSHOT', undefined);
if (this.currentTest.state === 'failed') {
Cypress.env("TEST_FAILED", true);
}
});
});
Spec data
Page
transferstoreceive.pl
Interface
staff
Element selector
main
Missing selector
Y
setup
sql INSERT INTO branchtransfers (itemnumber, frombranch, tobranch, reason, daterequested, datesent) VALUE (278, "FFL", "CPL", "Manual", NOW(), NOW())
workflow
teardown
sql DELETE FROM branchtransfers WHERE itemnumber=278 and frombranch="FFL"
Notes
go_to branchtransfers.pl
Set value of #tobranchcd to FPL
Enter 39999000005417 in #barcode input
Submit
Change library to Fairview
go_to transferstoreceive.pl
No id selector. main seems to include the menu on the left