From 7a800b04cfab73d279a55c068a4ad75f31c6a6ef Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 16 Nov 2022 08:57:40 +0100 Subject: [PATCH] Bug 32131: Move set_ERM_sys_pref_value to before We cannot (yet) move login to before, but we can set the pref before all the tests. We need to login in before anyway to retrieve the value of the pref. Signed-off-by: Jonathan Druart --- t/cypress/integration/Agreements_spec.ts | 2 +- t/cypress/integration/Licenses_spec.ts | 2 +- t/cypress/integration/Packages_spec.ts | 2 +- t/cypress/integration/Titles_spec.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/t/cypress/integration/Agreements_spec.ts b/t/cypress/integration/Agreements_spec.ts index 22835c0bf34..54046258d75 100644 --- a/t/cypress/integration/Agreements_spec.ts +++ b/t/cypress/integration/Agreements_spec.ts @@ -119,12 +119,12 @@ function get_licenses_to_relate() { describe("Agreement CRUD operations", () => { before(() => { cy.fetch_initial_ERM_sys_pref_value(); + cy.set_ERM_sys_pref_value(true); }); beforeEach(() => { cy.login("koha", "koha"); cy.title().should("eq", "Koha staff interface"); - cy.set_ERM_sys_pref_value(true); }); after(() => { diff --git a/t/cypress/integration/Licenses_spec.ts b/t/cypress/integration/Licenses_spec.ts index 073a81b8384..91599b2d7cd 100644 --- a/t/cypress/integration/Licenses_spec.ts +++ b/t/cypress/integration/Licenses_spec.ts @@ -35,12 +35,12 @@ function get_license() { describe("License CRUD operations", () => { before(() => { cy.fetch_initial_ERM_sys_pref_value(); + cy.set_ERM_sys_pref_value(true); }); beforeEach(() => { cy.login("koha", "koha"); cy.title().should("eq", "Koha staff interface"); - cy.set_ERM_sys_pref_value(true); }); after(() => { diff --git a/t/cypress/integration/Packages_spec.ts b/t/cypress/integration/Packages_spec.ts index fb8cf3fe603..20de7ee5e56 100644 --- a/t/cypress/integration/Packages_spec.ts +++ b/t/cypress/integration/Packages_spec.ts @@ -26,12 +26,12 @@ function get_package() { describe("Package CRUD operations", () => { before(() => { cy.fetch_initial_ERM_sys_pref_value(); + cy.set_ERM_sys_pref_value(true); }); beforeEach(() => { cy.login("koha", "koha"); cy.title().should("eq", "Koha staff interface"); - cy.set_ERM_sys_pref_value(true); }); after(() => { diff --git a/t/cypress/integration/Titles_spec.ts b/t/cypress/integration/Titles_spec.ts index 14f7a9bc061..dfdde44520f 100644 --- a/t/cypress/integration/Titles_spec.ts +++ b/t/cypress/integration/Titles_spec.ts @@ -69,12 +69,12 @@ function get_packages_to_relate() { describe("Title CRUD operations", () => { before(() => { cy.fetch_initial_ERM_sys_pref_value(); + cy.set_ERM_sys_pref_value(true); }); beforeEach(() => { cy.login("koha", "koha"); cy.title().should("eq", "Koha staff interface"); - cy.set_ERM_sys_pref_value(true); }); after(() => { -- 2.25.1