From a9199133e0aa3d78ee3933ff6e5fb98c185f0f80 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 19 Mar 2024 12:24:21 +0100 Subject: [PATCH] Bug 35919: Fix cypress tests And remove "remove", "delete" inconsistency Signed-off-by: Jonathan Druart --- .../prog/js/vue/components/Admin/RecordSources/List.vue | 8 ++++---- t/cypress/integration/Admin/RecordSources_spec.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/RecordSources/List.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/RecordSources/List.vue index f8776f9b35d..a1595b9e64f 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/RecordSources/List.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/RecordSources/List.vue @@ -105,7 +105,7 @@ export default { this.setConfirmationDialog( { title: this.$__( - "Are you sure you want to remove this record source?" + "Are you sure you want to delete this record source?" ), message: record_source.name, accept_label: this.$__("Yes, delete"), @@ -118,9 +118,9 @@ export default { .then( success => { this.setMessage( - this.$__("Record source %s deleted").format( - record_source.name - ), + this.$__( + "Record source '%s' deleted" + ).format(record_source.name), true ) dt.draw() diff --git a/t/cypress/integration/Admin/RecordSources_spec.ts b/t/cypress/integration/Admin/RecordSources_spec.ts index 0fa77a47b18..e22dc5612e6 100644 --- a/t/cypress/integration/Admin/RecordSources_spec.ts +++ b/t/cypress/integration/Admin/RecordSources_spec.ts @@ -162,18 +162,18 @@ describe("Record sources CRUD tests", () => { .contains("Delete") .click(); cy.get(".dialog.alert.confirmation h1").contains( - "Are you sure you want to remove this record source?" + "Are you sure you want to delete this record source?" ); cy.contains("Source 2"); - cy.contains("No, do not remove").click(); + cy.contains("No, do not delete").click(); cy.get("#record_sources_list table tbody tr:nth-child(2n+2)") .contains("Delete") .click(); cy.contains("Source 2"); - cy.contains("Yes, remove").click(); + cy.contains("Yes, delete").click(); cy.get("main div[class='dialog message']").contains( - "Record source 'Source 2' removed" + "Record source 'Source 2' deleted" ); }); }); -- 2.34.1