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:
parent
5f927d615f
commit
fbdd2fcba0
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue