Login

Screenshots for the Koha manual

New screenshots | All screenshots | Full test results | Manuals (wip)
en ar cs de el es fr fr_CA hi it pt pt_BR sk sv tr zh_Hant

Image details

addcsv-sql (#1439)

Job

No job planned.

Difficulty

Medium

Spec (updated on Tue Jun 3 14:17:05 2025)

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);
        }
    });
});

Spec data

Page

csv-profiles.pl?op=add_form

Interface

staff

Element selector

main

Missing selector

N

setup

 

workflow

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

teardown


    

Notes

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.

Additional KTD data

Old

New (updated on Wed Jun 4 23:38:23 2025)

New (es)

New (fr)