Login

Screenshots for the Koha manual

New screenshots | All screenshots | Full test results | Manuals (wip)
en de el es fr hi zh_Hant

Image details

opacuserjsexample (#166) ✅ Validated

Job

No job planned.

Difficulty

Medium

Spec (updated on Thu Dec 4 15:47:56 2025)

describe("tools/additionalcontent/opacuserjsexample", function () {
    const languages = ['en', 'es-ES', 'fr-FR', 'de-DE', 'el-GR', 'hi', 'zh-Hant-TW'];
    languages.forEach((lang) => {
        describe(`in ${lang}`, () => {
            beforeEach(function(){
                // Skip if 'en' test failed
                if (Cypress.env("EN_TEST_FAILED")) {
                    this.skip();
                }
                cy.query("UPDATE systempreferences set value=\"$(document).ready(function(){$('#more-search').hide();});\" where variable=\"OPACUserJS\"")
                cy.login();
                /* No specific padding defined */
                cy.set_cookie_lang(lang);
            });

            it("opacuserjsexample", function () {
                cy.visit("/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=opacuserjs&ok=Search");
                cy.waitForPageLoad();
                cy.get("#expand_OPACUserJS").click();
                cy.get("main").should('be.visible').screenshot("opacuserjsexample");
            });
        });
    });
    afterEach(function () {
        cy.query("UPDATE systempreferences set value=\"\" where variable=\"OPACUserJS\"")
        Cypress.env('PADDING_BEFORE_SCREENSHOT', undefined);
        // Set EN_TEST_FAILED if the 'en' test failed
        if (this.currentTest.parent.title.includes('in en') && this.currentTest.state === 'failed') {
            Cypress.env("EN_TEST_FAILED", true);
        }
    });
});

Spec data

Page

admin/preferences.pl?op=search&searchfield=opacuserjs&ok=Search

Interface

staff

Element selector

main

Missing selector

Y

setup

sql UPDATE systempreferences set value="$(document).ready(function(){$('#more-search').hide();});" where variable="OPACUserJS"

workflow

click #expand_OPACUserJS

teardown

sql UPDATE systempreferences set value="" where variable="OPACUserJS"

Notes

We want to add content to the syspref before

Got to Administration
Search for OpacUserJS in system preferences search box
Click on Click to edit, to expand system preference content

Additional KTD data

Thumbnails


Current Thumbnail old
New Thumbnail new
New (de)
New (el)
New (es)
New (fr)
New (hi)
New (zh_Hant)

Current

New (updated on Thu Dec 4 19:32:11 2025)

New (de)

New (el)

New (es)

New (fr)

New (hi)

New (zh_Hant)

2025-12-01 12:15:14 +0000

2025-06-13 07:45:03 +0000

2025-12-01 12:15:14 +0000

Old screenshot