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

opacuserjs (#383) ❌ Not validated

Job

Difficulty

Medium

Spec (updated on Thu Jul 9 13:52:41 2026)

describe("admin/globalprefs/opacuserjs", 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.login();
                /* No specific padding defined */
                cy.set_cookie_lang(lang);
            });

            it("opacuserjs", function () {
                cy.visit("/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=opacuserjs");
                cy.waitForPageLoad();
                cy.get("a#expand_OPACUserJS.expand-textarea").click();
                cy.wait_for_ajax();
                cy.get("textarea.valid").type("\"$(document.ready(function(){$('label').html('Card Number:');});\"");
                cy.get("main").should('be.visible').screenshot("opacuserjs");
            });
        });
    });
    afterEach(function () {
        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?tab=&op=search&searchfield=opacuserjs

Interface

staff

Element selector

main

Missing selector

N

setup


        

workflow

click a#expand_OPACUserJS.expand-textarea
wait_for_ajax
type textarea.valid="$(document.ready(function(){$('label').html('Card Number:');});"

teardown


    

Notes

Additional KTD data

Test failure

AssertionError: Timed out retrying after 10000ms: Expected to find element: `textarea.valid`, but never found it.
    at Context.eval (webpack://koha/./cypress/integration/admin/globalprefs/opacuserjs.ts:20:19)

Thumbnails


Current Thumbnail old

Current

Old screenshot