describe("circ/transferlate", 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("transferlate", function () {
cy.visit("/cgi-bin/koha/circ/transferstoreceive.pl");
cy.visit("/cgi-bin/koha/circ/branchtransfers.pl");
/* FIXME - Invalid step Set value of #tobranchcd to FPL */
/* FIXME - Invalid step Enter 39999000005417 in #barcode input */
/* FIXME - Invalid step Submit */
/* FIXME - Invalid step Change library to Fairview */
/* FIXME - Invalid step In the database, change the date for a date more than 3 days in the past */
/* FIXME - Invalid step update branchtransfers set daterequested = '2024-02-04 20:11:27', datesent = '2024-02-04 20:11:27' where datearrived is null; */
cy.visit("/cgi-bin/koha/circ/transferstoreceive.pl");
cy.get(".col-sm-10").should('be.visible').screenshot("transferlate");
});
});
});
afterEach(function () {
if (this.currentTest.state === 'failed') {
Cypress.env("TEST_FAILED", true);
}
});
});
Spec data
Page
transferstoreceive.pl
Interface
staff
Element selector
.col-sm-10
Missing selector
Y
setup
workflow
go_to branchtransfers.pl
Set value of #tobranchcd to FPL
Enter 39999000005417 in #barcode input
Submit
Change library to Fairview
In the database, change the date for a date more than 3 days in the past
update branchtransfers set daterequested = '2024-02-04 20:11:27', datesent = '2024-02-04 20:11:27' where datearrived is null;
go_to transferstoreceive.pl
teardown
Notes
No id selector. main seems to include the menu on the left
AssertionError: Timed out retrying after 10000ms: Expected to find element: `.col-sm-10`, but never found it.
at Context.eval (webpack://koha/./cypress/integration/circ/transferlate.ts:24:37)