Bug 35919: Fix cypress tests

And remove "remove", "delete" inconsistency

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Jonathan Druart 2024-03-19 12:24:21 +01:00 committed by Katrin Fischer
parent 5f927d615f
commit fbdd2fcba0
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
2 changed files with 8 additions and 8 deletions

View File

@ -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()

View File

@ -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"
);
});
});