From 3b37e9e454d2e8cf961e8614f85512178f42764e Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Mon, 25 Mar 2024 08:29:24 +0000 Subject: [PATCH] Bug 35850: Adjust tests to changed IDs Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/js/vue/modules/erm.ts | 2 +- t/cypress/integration/ERM/Searchbar_spec.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/modules/erm.ts b/koha-tmpl/intranet-tmpl/prog/js/vue/modules/erm.ts index 0a39c70d56..f00746675b 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/modules/erm.ts +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/modules/erm.ts @@ -76,7 +76,7 @@ router.afterEach((to, from) => { } else if (to.path.match(/\/erm\/eholdings\/local\/titles/)) { tab_id = "title"; } - let node = document.getElementById(`${tab_id}_search_tab`); + let node = document.getElementById(`${tab_id}_search-tab`); if (node) { node.click(); diff --git a/t/cypress/integration/ERM/Searchbar_spec.ts b/t/cypress/integration/ERM/Searchbar_spec.ts index af55bf601c..0023c0292d 100644 --- a/t/cypress/integration/ERM/Searchbar_spec.ts +++ b/t/cypress/integration/ERM/Searchbar_spec.ts @@ -13,24 +13,24 @@ describe("Searchbar header changes", () => { it("Default option is agreements", () => { cy.visit("/cgi-bin/koha/erm/erm.pl"); - cy.get("#agreement_search_tab").parent().should("have.class", "active"); + cy.get("#agreement_search-tab").parent().should("have.class", "active"); cy.visit("/cgi-bin/koha/erm/agreements"); - cy.get("#agreement_search_tab").parent().should("have.class", "active"); + cy.get("#agreement_search-tab").parent().should("have.class", "active"); }); it("Should change to licenses when in licenses", () => { cy.visit("/cgi-bin/koha/erm/licenses"); - cy.get("#license_search_tab").parent().should("have.class", "active"); + cy.get("#license_search-tab").parent().should("have.class", "active"); }); it("Should change to packages when in local packages", () => { cy.visit("/cgi-bin/koha/erm/eholdings/local/packages"); - cy.get("#package_search_tab").parent().should("have.class", "active"); + cy.get("#package_search-tab").parent().should("have.class", "active"); }); it("Should change to titles when in local titles", () => { cy.visit("/cgi-bin/koha/erm/eholdings/local/titles"); - cy.get("#title_search_tab").parent().should("have.class", "active"); + cy.get("#title_search-tab").parent().should("have.class", "active"); }); }); -- 2.39.5