Job
No job planned.
Difficulty
Medium
Easy
Medium
Hard
Impossible with Cypress Studio
Cancel
Spec (updated on Fri Aug 1 12:58:18 2025)
describe("admin/additional/didyoumeanopacexplode", 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.set_syspref("OPACdidyoumean", "[{ \"name\": \"AuthorityFile\", \"enabled\": 1}, { \"name\": \"ExplodedTerms\", \"enabled\": 1}, { \"name\": \"LibrisSpellcheck\"}]");
/* No specific padding defined */
cy.set_cookie_lang(lang);
});
it("didyoumeanopacexplode", function () {
cy.visit("/cgi-bin/koha/opac-search.pl?Peter+Davison&weight_search=1");
cy.waitForPageLoad();
cy.get("#didyoumean").should('be.visible');
cy.get("body").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?Peter+Davison&weight_search=1
Interface
opac
Element selector
body
Missing selector
N
setup
set_syspref OPACdidyoumean=[{ "name": "AuthorityFile", "enabled": 1}, { "name": "ExplodedTerms", "enabled": 1}, { "name": "LibrisSpellcheck"}]
workflow
wait_for_visible #didyoumean
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'
Cancel
Additional KTD data
Cancel
Test failure AssertionError: Timed out retrying after 10000ms: Expected to find element: `#didyoumean`, but never found it.
at Context.eval (webpack://koha/./cypress/integration/admin/additional/didyoumeanopacexplode.ts:18:38)