Job
No job planned.
Difficulty
Medium
Easy
Medium
Hard
Impossible with Cypress Studio
Cancel
Spec (updated on Thu Sep 18 15:53:33 2025)
describe("admin/additional/didyoumeanopacexplode", function () {
const languages = ['en', 'es-ES', 'fr-FR', 'de-DE', 'el-GR', 'hi', '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("OPACdidyoumean", "[{ \"name\": \"AuthorityFile\"}, { \"name\": \"ExplodedTerms\", \"enabled\": 1}, { \"name\": \"LibrisSpellcheck\"}] ");
/* No specific padding defined */
cy.set_cookie_lang(lang);
});
it("didyoumeanopacexplode", function () {
cy.visitOpac("/cgi-bin/koha/opac-search.pl?idx=&q=world&weight_search=1");
cy.waitForPageLoad();
cy.wait_for_ajax();
cy.get(".main").should('be.visible').screenshot("didyoumeanopacexplode");
});
});
});
afterEach(function () {
cy.set_syspref("OPACdidyoumean", "[{ \"name\": \"AuthorityFile\"}, { \"name\": \"ExplodedTerms\"}, { \"name\": \"LibrisSpellcheck\"}]");
Cypress.env('PADDING_BEFORE_SCREENSHOT', undefined);
if (this.currentTest.state === 'failed') {
Cypress.env("TEST_FAILED", true);
}
});
});
Spec data
Page
opac-search.pl?idx=&q=world&weight_search=1
Interface
opac
Log in
No
Element selector
.main
Missing selector
N
setup
set_syspref OPACdidyoumean=[{ "name": "AuthorityFile"}, { "name": "ExplodedTerms", "enabled": 1}, { "name": "LibrisSpellcheck"}]
workflow
wait_for_ajax
teardown
set_syspref OPACdidyoumean=[{ "name": "AuthorityFile"}, { "name": "ExplodedTerms"}, { "name": "LibrisSpellcheck"}]
Notes
Requires change in system preferences, then search in OPAC. Requires relevant authority and catalog entries.
Go to Administration > Additional parameters > Did you mean? > select AuthorityFile AND ExplodedTerms > save > go to OPAC > search for 'world'
Note: need a selector for "only the top part of the image".. or some way to crop the image..
Cancel
Additional KTD data
Cancel