From fbdd2fcba00b71f9f55238245fab2d186b30784a 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 Signed-off-by: Katrin Fischer --- .../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 f8776f9b35..a1595b9e64 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 0fa77a47b1..e22dc5612e 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.39.5