describe("admin/accounting/alldebittypes", 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("alldebittypes", function () { cy.visit("/cgi-bin/koha/admin/debit_types.pl"); cy.get("#filter_system").click(); cy.get("main").should('be.visible').screenshot("alldebittypes"); }); }); }); afterEach(function () { if (this.currentTest.state === 'failed') { Cypress.env("TEST_FAILED", true); } }); });
click #filter_system
With sample data Joubu: This is failing because of https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39810#c5
TypeError: The following error originated from your application code, not from Cypress. > Cannot read properties of undefined (reading 'style') When Cypress detects uncaught errors originating from your application it will automatically fail the current test. This behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event. https://on.cypress.io/uncaught-exception-from-application at HTMLDocument.<anonymous> (http://kohadev-intra.mydnsname.org:8081/cgi-bin/koha/admin/debit_types.pl:2359:40) at e (http://kohadev-intra.mydnsname.org:8081/intranet-tmpl/lib/jquery/jquery-3.6.0.min_24.1200045.js:2:30038) at t (http://kohadev-intra.mydnsname.org:8081/intranet-tmpl/lib/jquery/jquery-3.6.0.min_24.1200045.js:2:30340) at o (http://kohadev-intra.mydnsname.org:8081/cgi-bin/koha/admin/debit_types.pl:41:452) at <unknown> (http://kohadev-intra.mydnsname.org:8081/cgi-bin/koha/admin/debit_types.pl:41:825)