From fc48e6117f5df641dae10ef9a5cce05ff20de004 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 Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- 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 22835c0bf3..54046258d7 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 073a81b838..91599b2d7c 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 fb8cf3fe60..20de7ee5e5 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 14f7a9bc06..dfdde44520 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.39.2