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

addtobasketoptions (#168) ❌ Not validated

Job

No job planned.

Difficulty

Easy

Spec (updated on Thu May 22 13:08:47 2025)

describe("acquisitions/addtobasketoptions", 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.login();
                cy.set_cookie_lang(lang);
            });

            it("addtobasketoptions", function () {
                cy.visit("/cgi-bin/koha/acqui/basket.pl?basketno=1");
                cy.get("div.btn-group:nth-child(1) > a:nth-child(1)").click();
                cy.get("#acq_basket div.modal-content").should('be.visible').screenshot("addtobasketoptions");
            });
        });
    });
    afterEach(function () {
        
        if (this.currentTest.state === 'failed') {
            Cypress.env("TEST_FAILED", true);
        }
    });
});

Spec data

Page

basket.pl?basketno=1

Interface

staff

Element selector

#acq_basket div.modal-content

Missing selector

N

setup


        

workflow

click div.btn-group:nth-child(1) > a:nth-child(1)

teardown


    

Notes

Additional KTD data

Test failure

CypressError: `cy.screenshot()` only works for a single element. You attempted to screenshot 6 elements.

https://on.cypress.io/screenshot
    at screenshot (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:134836:70)
    at originalFn (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:111055:30)
    at overridden.fn (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:111060:21)
    at wrapped (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:138387:19)
From Your Spec Code:
    at Context.eval (webpack://koha/./cypress/integration/acquisitions/addtobasketoptions.ts:17:77)

Old