Job
No job planned.
Difficulty
Easy
Medium
Hard
Impossible with Cypress Studio
Cancel
Spec (updated on Sun Jan 18 10:15:00 2026)
describe("patrons/addpatronmsg", 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.set_syspref("ILLModule", "1");
cy.set_syspref("UseRecalls", "1");
cy.set_syspref("SMSSendDriver", "Email");
cy.query("INSERT INTO sms_providers (name, domain) VALUES (\"Verizon\", \"vtext.com\")")
cy.query("INSERT INTO sms_providers (name, domain) VALUES (\"T-Mobile\", \"tmomail.net\")")
cy.login();
/* No specific padding defined */
cy.set_cookie_lang(lang);
});
it("addpatronmsg", function () {
cy.visit("/cgi-bin/koha/members/memberentry.pl?op=add_form&categorycode=PT");
cy.waitForPageLoad();
cy.get("#email4").check();
cy.get("#digest4").check();
cy.get("#email2").check();
cy.get("#digest2").check();
cy.get("#SMSnumber").type("+15555551212");
cy.get("#sms_provider_id").select("Verizon", {force: true});
cy.get("#memberentry_messaging_prefs").should('be.visible').screenshot("addpatronmsg");
});
});
});
afterEach(function () {
cy.set_syspref("ILLModule", "0");
cy.set_syspref("UseRecalls", "0");
cy.set_syspref("SMSSendDriver", "");
cy.query("DELETE FROM sms_providers WHERE name=\"Verizon\"")
cy.query("DELETE FROM sms_providers WHERE name=\"T-Mobile\"")
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
#memberentry_messaging_prefs
Missing selector
setup
set_syspref ILLModule=1
set_syspref UseRecalls=1
set_syspref SMSSendDriver=Email
sql INSERT INTO sms_providers (name, domain) VALUES ("Verizon", "vtext.com")
sql INSERT INTO sms_providers (name, domain) VALUES ("T-Mobile", "tmomail.net")
workflow
check #email4
check #digest4
check #email2
check #digest2
type #SMSnumber=+15555551212
select #sms_provider_id=Verizon
teardown
set_syspref ILLModule=0
set_syspref UseRecalls=0
set_syspref SMSSendDriver=
sql DELETE FROM sms_providers WHERE name="Verizon"
sql DELETE FROM sms_providers WHERE name="T-Mobile"
Notes
There is no ID for the days in advance dropdown list for "Advance notice". So can't get it to set a vaue, such as 2
Cancel
Additional KTD data
Cancel