Job
Difficulty
Medium
Cancel
Spec (updated on Mon Jun 1 12:32:17 2026)
describe("patrons/manage2fa-qrcode", 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("TwoFactorAuthentication", "enabled");
cy.login();
/* No specific padding defined */
cy.set_cookie_lang(lang);
});
it("manage2fa-qrcode", function () {
cy.visit("/cgi-bin/koha/members/two_factor_auth.pl?borrowernumber=51");
cy.waitForPageLoad();
cy.get("#enable-2FA").click();
cy.get("#qr_code").should('be.visible');
cy.get("main").should('be.visible').screenshot("manage2fa-qrcode");
});
});
});
afterEach(function () {
cy.set_syspref("TwoFactorAuthentication", "disabled");
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/two_factor_auth.pl?borrowernumber=51
Interface
staff
Element selector
main
Missing selector
N
setup
set_syspref TwoFactorAuthentication=enabled
workflow
click #enable-2FA
wait_for_visible #qr_code
teardown
set_syspref TwoFactorAuthentication=disabled
Notes
Cancel
Additional KTD data
Cancel