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

opacvirtualcard (#1721) ❌ Not validated

Job

No job planned.

Difficulty

Spec (updated on Thu Aug 7 16:16:13 2025)

describe("opac/opacvirtualcard", function () {
    const languages = ['en', 'es-ES', 'fr-FR', 'de-DE', 'el-GR', 'zh-Hant-TW'];
    languages.forEach((lang) => {
        describe(`in ${lang}`, () => {
            beforeEach(function(){
                // If previous test failed, skip this one
                if (Cypress.env("TEST_FAILED")) {
                    this.skip();
                }
                cy.set_syspref("OPACVirtualCard", "1");
                /* No specific padding defined */
                cy.set_cookie_lang(lang);
            });

            it("opacvirtualcard", function () {
                cy.visit("/cgi-bin/koha/opac-virtual-card.pl");
                cy.waitForPageLoad();
                cy.get("#userid").type("koha");
                cy.get("#password").type("koha");
                cy.get("#auth input[type=\"submit\"]").click();
                cy.waitForPageLoad();
                cy.get("main").should('be.visible').screenshot("opacvirtualcard");
            });
        });
    });
    afterEach(function () {
        cy.set_syspref("OPACVirtualCard", "0");
        Cypress.env('PADDING_BEFORE_SCREENSHOT', undefined);
        if (this.currentTest.state === 'failed') {
            Cypress.env("TEST_FAILED", true);
        }
    });
});

Spec data

Page

opac-virtual-card.pl

Interface

opac

Element selector

main

Missing selector

N

setup

set_syspref OPACVirtualCard=1

workflow

type #userid=koha
type #password=koha
click #auth input[type="submit"]
wait_for_page_load

teardown

set_syspref OPACVirtualCard=0

Notes

Additional KTD data

Test failure

CypressError: `cy.visit()` failed trying to load:

http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-virtual-card.pl

The response we received from your web server was:

  > 404: Not Found

This was considered a failure because the status code was not `2xx`.

This http request was redirected '1' time to:

  - 302: http://kohadev.mydnsname.org:8080/cgi-bin/koha/errors/404.pl

If you do not want status codes to cause failures pass the option: `failOnStatusCode: false`
    at <unknown> (http://kohadev.mydnsname.org:8080/__cypress/runner/cypress_runner.js:131049:76)
    at visitFailedByErr (http://kohadev.mydnsname.org:8080/__cypress/runner/cypress_runner.js:130463:12)
    at <unknown> (http://kohadev.mydnsname.org:8080/__cypress/runner/cypress_runner.js:131032:13)
    at tryCatcher (http://kohadev.mydnsname.org:8080/__cypress/runner/cypress_runner.js:1807:23)
    at Promise._settlePromiseFromHandler (http://kohadev.mydnsname.org:8080/__cypress/runner/cypress_runner.js:1519:31)
    at Promise._settlePromise (http://kohadev.mydnsname.org:8080/__cypress/runner/cypress_runner.js:1576:18)
    at Promise._settlePromise0 (http://kohadev.mydnsname.org:8080/__cypress/runner/cypress_runner.js:1621:10)
    at Promise._settlePromises (http://kohadev.mydnsname.org:8080/__cypress/runner/cypress_runner.js:1697:18)
    at _drainQueueStep (http://kohadev.mydnsname.org:8080/__cypress/runner/cypress_runner.js:2407:12)
    at _drainQueue (http://kohadev.mydnsname.org:8080/__cypress/runner/cypress_runner.js:2400:9)
    at Async._drainQueues (http://kohadev.mydnsname.org:8080/__cypress/runner/cypress_runner.js:2416:5)
    at Async.drainQueues (http://kohadev.mydnsname.org:8080/__cypress/runner/cypress_runner.js:2286:14)
From Your Spec Code:
    at Context.eval (webpack://koha/./cypress/integration/opac/opacvirtualcard.ts:16:19)

Thumbnails


Old Thumbnail old

Old

Old screenshot