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

pages (#75)

Job

No job planned.

Difficulty

Easy

Spec (updated on Thu Jun 19 14:39:13 2025)

describe("tools/additionalcontent/pages", 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.query("INSERT INTO additional_contents (id, category, code, location, branchcode, published_on, borrowernumber) VALUES (10, \"pages\", \"staff_and_opac_1\", \"staff_and_opac\", NULL, \"2025-06-02\", 51), (11, \"pages\", \"staff_only_1\", \"staff_only\", NULL, \"2025-06-05\", 51)")
                /* FIXME - Invalid step  */
                cy.query("INSERT INTO additional_contents_localizations (id, additional_content_id, title, content, lang) VALUES (10, 10, \"How to use the library\", \"\", \"default\"), (11, 11, \"Enquiry form\", \"\", \"default\"), (12, 11, \"Enquiry form\", \"\", \"en\")")
                cy.login();
                /* No specific padding defined */
                cy.set_cookie_lang(lang);
            });

            it("pages", function () {
                cy.visit("/cgi-bin/koha/tools/additional-contents.pl?category=pages");
                cy.waitForPageLoad();
                cy.get("main").should('be.visible').screenshot("pages");
            });
        });
    });
    afterEach(function () {
        cy.query("DELETE FROM additional_contents WHERE id=10 or id=11;")
        cy.query("DELETE FROM additional_contents_localizations WHERE id=10;")
        Cypress.env('PADDING_BEFORE_SCREENSHOT', undefined);
        if (this.currentTest.state === 'failed') {
            Cypress.env("TEST_FAILED", true);
        }
    });
});

Spec data

Page

tools/additional-contents.pl?category=pages

Interface

staff

Element selector

main

Missing selector

setup

sql INSERT INTO additional_contents (id, category, code, location, branchcode, published_on, borrowernumber) VALUES (10, "pages", "staff_and_opac_1", "staff_and_opac", NULL, "2025-06-02", 51), (11, "pages", "staff_only_1", "staff_only", NULL, "2025-06-05", 51)

sql INSERT INTO additional_contents_localizations (id, additional_content_id, title, content, lang) VALUES (10, 10, "How to use the library", "<!-- no_content -->", "default"), (11, 11, "Enquiry form", "<!-- no_content -->", "default"), (12, 11, "Enquiry form", "<!-- no_content -->", "en")

workflow


        

teardown

sql DELETE FROM additional_contents WHERE id=10 or id=11;
sql DELETE FROM additional_contents_localizations WHERE id=10;

Notes

Missing default data

Additional KTD data

Old

New (updated on Thu Jun 19 14:40:36 2025)

New (es)

New (fr)