From 7ffc337386e11a71392baf85ce6b81e75a8d6763 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Thu, 17 Oct 2024 15:46:52 +0000 Subject: [PATCH] Bug 37301: Update cypress Local packages were named 'package' on the delete confirmation dialog, but 'local package' on the deleted confirmation message. Both these places now use the same i18n.display_name from the respective Resource component so these label tests need to be updated. Same for local titles. Test plan: cypress run --spec t/cypress/integration/ERM/DataProviders_spec.ts cypress run --spec t/cypress/integration/ERM/Agreements_spec.ts cypress run --spec t/cypress/integration/ERM/Licenses_spec.ts cypress run --spec t/cypress/integration/ERM/Titles_spec.ts cypress run --spec t/cypress/integration/ERM/Packages_spec.ts --- t/cypress/integration/ERM/Packages_spec.ts | 6 +++--- t/cypress/integration/ERM/Titles_spec.ts | 12 +++++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/t/cypress/integration/ERM/Packages_spec.ts b/t/cypress/integration/ERM/Packages_spec.ts index fe8e9d1d23..132236dab5 100644 --- a/t/cypress/integration/ERM/Packages_spec.ts +++ b/t/cypress/integration/ERM/Packages_spec.ts @@ -279,7 +279,7 @@ describe("Package CRUD operations", () => { .contains("Delete") .click(); cy.get(".alert-warning.confirmation h1").contains( - "remove this package" + "remove this local package" ); cy.contains(erm_package.name); @@ -301,7 +301,7 @@ describe("Package CRUD operations", () => { .contains("Delete") .click(); cy.get(".alert-warning.confirmation h1").contains( - "remove this package" + "remove this local package" ); cy.contains("Yes, delete").click(); cy.get("main div[class='alert alert-info']") @@ -340,7 +340,7 @@ describe("Package CRUD operations", () => { cy.get("#packages_show #toolbar").contains("Delete").click(); cy.get(".alert-warning.confirmation h1").contains( - "remove this package" + "remove this local package" ); cy.contains("Yes, delete").click(); diff --git a/t/cypress/integration/ERM/Titles_spec.ts b/t/cypress/integration/ERM/Titles_spec.ts index 6d19e87a9d..4e19abce89 100644 --- a/t/cypress/integration/ERM/Titles_spec.ts +++ b/t/cypress/integration/ERM/Titles_spec.ts @@ -452,7 +452,9 @@ describe("Title CRUD operations", () => { cy.visit("/cgi-bin/koha/erm/eholdings/local/titles"); cy.get("#titles_list table tbody tr:first").contains("Delete").click(); - cy.get(".alert-warning.confirmation h1").contains("remove this title"); + cy.get(".alert-warning.confirmation h1").contains( + "remove this local title" + ); cy.contains(erm_title.publication_title); // Accept the confirmation dialog, get 500 @@ -470,7 +472,9 @@ describe("Title CRUD operations", () => { body: null, }); cy.get("#titles_list table tbody tr:first").contains("Delete").click(); - cy.get(".alert-warning.confirmation h1").contains("remove this title"); + cy.get(".alert-warning.confirmation h1").contains( + "remove this local title" + ); cy.contains("Yes, delete").click(); cy.get("main div[class='alert alert-info']") .contains("Local title") @@ -515,7 +519,9 @@ describe("Title CRUD operations", () => { ); cy.get("#eholdings_title_show #toolbar").contains("Delete").click(); - cy.get(".alert-warning.confirmation h1").contains("remove this title"); + cy.get(".alert-warning.confirmation h1").contains( + "remove this local title" + ); cy.contains("Yes, delete").click(); //Make sure we return to list after deleting from show -- 2.39.5