describe("tools/csvprofiles/addcsv-sql", 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(); } /* FIXME - Invalid step */ cy.login(); cy.set_cookie_lang(lang); }); it("addcsv-sql", function () { cy.visit("/cgi-bin/koha/tools/csv-profiles.pl?op=add_form"); cy.get("#profile").type("Simple export"); cy.get("#type").select("SQL"); cy.get("#used_for_sql").select("export_basket"); cy.get("#sql_content").type("Title=biblio.title|Author=biblio.author|Year=biblio.copyrightdate"); cy.get("main").click(); cy.get("main").should('be.visible').screenshot("addcsv-sql"); }); }); }); afterEach(function () { if (this.currentTest.state === 'failed') { Cypress.env("TEST_FAILED", true); } }); });
type #profile=Simple export select #type=SQL select #used_for_sql=export_basket type #sql_content=Title=biblio.title|Author=biblio.author|Year=biblio.copyrightdate click main
We must type some information in the form Profile name: Simple export Profile type (select): SQL Usage (select): Basket export in acquisitions Profile SQL fields: Title=biblio.title|Author=biblio.author|Year=biblio.copyrightdate Look like click can't be used with <select> element, this will be a problem in many forms. The error says we should use cy.select() instead. I don't know if we can do that in the spec data section.