From 966156ed8417f823360780877412714db68d1716 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 16 Nov 2022 09:03:12 +0100 Subject: [PATCH] Bug 32131: (to-squash) Cypress tests are failing if ERMModule is off Please squash this with the first patch if 32147 is pushed before 32131. Signed-off-by: Martin Renvoize --- t/cypress/support/commands.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/cypress/support/commands.js b/t/cypress/support/commands.js index 968d3f09cf..a918c15159 100644 --- a/t/cypress/support/commands.js +++ b/t/cypress/support/commands.js @@ -35,7 +35,7 @@ Cypress.Commands.add('login', (username, password) => { Cypress.Commands.add('set_ERM_sys_pref_value', (enable) => { cy.visit('/cgi-bin/koha/admin/admin-home.pl') cy.get("h4").contains("Global system preferences").click(); - cy.get("a[title^=E-Resource]").contains("E-Resource management").click(); + cy.get("a[title^=E-resource]").contains("E-resource management").click(); cy.get('#pref_ERMModule').then(($select) => { // Only enable if currently disabled, or only disable if currently enabled let sys_pref_value = $select.find(":selected").text().trim(); @@ -52,7 +52,7 @@ Cypress.Commands.add('fetch_initial_ERM_sys_pref_value', () => { cy.login("koha", "koha"); cy.visit('/cgi-bin/koha/admin/admin-home.pl') cy.get("h4").contains("Global system preferences").click(); - cy.get("a[title^=E-Resource]").contains("E-Resource management").click(); + cy.get("a[title^=E-resource]").contains("E-resource management").click(); cy.get('#pref_ERMModule').then(($select) => { Cypress.env('initial_ERM_Module_sys_pref_value', $select.find(":selected").text().trim() == 'Enable'); }) -- 2.20.1