Job
No job planned.
Difficulty
Hard
Easy
Medium
Hard
Impossible with Cypress Studio
Cancel
Spec (updated on Mon Aug 4 07:39:19 2025)
describe("admin/additional/smsopacoptions", 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.query("INSERT INTO sms_providers (name, domain) VALUES (\"Verizon\", \"vtext.com\"), (\"T-Mobile\", \"tmomail.net\")")
/* No specific padding defined */
cy.set_cookie_lang(lang);
});
it("smsopacoptions", function () {
cy.visit("/cgi-bin/koha/opac-main.pl");
cy.waitForPageLoad();
cy.get("#userid").type("koha");
cy.get("#password").type("koha");
cy.get("#auth input[type=\"submit\"]").click();
cy.waitForPageLoad();
cy.get("#menu li a[href=\"/cgi-bin/koha/opac-messaging.pl\"]").click();
cy.get("body").should('be.visible').screenshot("smsopacoptions");
});
});
});
afterEach(function () {
cy.query("DELETE FROM sms_providers WHERE name IN (\"Verizon\", \"T-Mobile\")")
Cypress.env('PADDING_BEFORE_SCREENSHOT', undefined);
if (this.currentTest.state === 'failed') {
Cypress.env("TEST_FAILED", true);
}
});
});
Spec data
Page
opac-main.pl
Interface
opac
Element selector
body
Missing selector
N
setup
sql INSERT INTO sms_providers (name, domain) VALUES ("Verizon", "vtext.com"), ("T-Mobile", "tmomail.net")
workflow
type #userid=koha
type #password=koha
click #auth input[type="submit"]
wait_for_page_load
click #menu li a[href="/cgi-bin/koha/opac-messaging.pl"]
teardown
sql DELETE FROM sms_providers WHERE name IN ("Verizon", "T-Mobile")
Notes
Prerequisites: preference EnhancedMessagingPreferencesOPAC=Allow, preference SMSSendDriver=Email, existing SMS providers, be logged in on the OPAC
04-08-2025: I don't think we can show the drop-down menu unfolded
Cancel
Additional KTD data
Cancel