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

patroncity (#121) ❌ Not validated

Job

Difficulty

Impossible with Cypress Studio

Spec (updated on Wed Mar 25 13:02:28 2026)

describe("admin/patroncirc/patroncity", 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("INSERT INTO cities(`city_name`,`city_state`,`city_zipcode`) VALUES ('Atlantic City','NJ',08401)")
                cy.query("INSERT INTO cities(`city_name`,`city_state`,`city_zipcode`) VALUES ('Philadelphia','PA',19030)")
                cy.query("INSERT INTO cities(`city_name`,`city_state`,`city_zipcode`) VALUES ('Des Moines','IA',50301)")
                cy.login();
                /* No specific padding defined */
                cy.set_cookie_lang(lang);
            });

            it("patroncity", function () {
                cy.visit("/cgi-bin/koha/members/memberentry.pl?op=add_form&categorycode=PT");
                cy.waitForPageLoad();
                cy.get("#pat_memberentrygen #entryform #memberentry_mainaddress select.select_city").click();
                cy.get("#pat_memberentrygen #entryform #memberentry_mainaddress select.select_city").should('be.visible').screenshot("patroncity");
            });
        });
    });
    afterEach(function () {
        cy.query("DELETE FROM cities WHERE city_name IN('Atlantic City','Philadelphia','Des Moines')")
        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

members/memberentry.pl?op=add_form&categorycode=PT

Interface

staff

Element selector

#pat_memberentrygen #entryform #memberentry_mainaddress select.select_city

Missing selector

N

setup

sql INSERT INTO cities(`city_name`,`city_state`,`city_zipcode`) VALUES ('Atlantic City','NJ',08401)
sql INSERT INTO cities(`city_name`,`city_state`,`city_zipcode`) VALUES ('Philadelphia','PA',19030)
sql INSERT INTO cities(`city_name`,`city_state`,`city_zipcode`) VALUES ('Des Moines','IA',50301)

workflow

click #pat_memberentrygen #entryform #memberentry_mainaddress select.select_city

teardown

sql DELETE FROM cities WHERE city_name IN('Atlantic City','Philadelphia','Des Moines')

Notes

Dropdown 

Page: memberentry.pl

workflow

Admin> Cities & Towns> Create a City/Town > Patrons > Create a Patron> Under Address> Choose from the City & Town dropdown.

Additional KTD data

Test failure

CypressError: `cy.click()` cannot be called on a `<select>` element. Use `cy.select()` command instead to change the value.

https://on.cypress.io/select
    at perform (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:111591:70)
    at tryCatcher (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:1807:23)
    at Object.gotValue (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:6476:18)
    at Object.gotAccum (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:6465:25)
    at Object.tryCatcher (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:1807:23)
    at Promise._settlePromiseFromHandler (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:1519:31)
    at Promise._settlePromise (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:1576:18)
    at Promise._settlePromiseCtx (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:1613:10)
    at _drainQueueStep (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:2411:12)
    at _drainQueue (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:2400:9)
    at Async._drainQueues (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:2416:5)
    at Async.drainQueues (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:2286:14)
From Your Spec Code:
    at Context.eval (webpack://koha/./cypress/integration/admin/patroncirc/patroncity.ts:21:101)

Thumbnails


Current Thumbnail old

Current

Old screenshot