describe("cataloging/authoritysearch", 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.login();
/* No specific padding defined */
cy.set_cookie_lang(lang);
});
it("authoritysearch", function () {
cy.visit("/cgi-bin/koha/authorities/authorities-home.pl");
cy.waitForPageLoad();
cy.get("#header_search").should('be.visible').screenshot("authoritysearch");
});
});
});
afterEach(function () {
Cypress.env('PADDING_BEFORE_SCREENSHOT', undefined);
if (this.currentTest.state === 'failed') {
Cypress.env("TEST_FAILED", true);
}
});
});
Spec data
Page
authorities/authorities-home.pl
Interface
staff
Element selector
#header_search
Missing selector
N
setup
workflow
teardown
Notes
It would be better to get more than just the search bar, like in the original screenshot. Unless we use #autho_authorities_home, there isn't a selector for that.