From 283ab4fe4da0bbc2f559458aadd235193e88791e Mon Sep 17 00:00:00 2001
From: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Date: Fri, 24 Feb 2023 16:06:31 +0000
Subject: [PATCH] Bug 32991: Fix agreements tests with new dialog instead of
confirm delete page. Squash this later with other tests updates
---
t/cypress/integration/Agreements_spec.ts | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/t/cypress/integration/Agreements_spec.ts b/t/cypress/integration/Agreements_spec.ts
index d6b7ffcb30..ec316a62d2 100644
--- a/t/cypress/integration/Agreements_spec.ts
+++ b/t/cypress/integration/Agreements_spec.ts
@@ -506,15 +506,14 @@ describe("Agreement CRUD operations", () => {
cy.get("#agreements_list table tbody tr:first")
.contains("Delete")
.click();
- cy.get("#agreements_confirm_delete h2").contains("Delete agreement");
- cy.contains("Agreement name: " + agreement.name);
+ cy.get(".dialog.alert.confirmation h1").contains("remove this agreement");
// Submit the form, get 500
cy.intercept("DELETE", "/api/v1/erm/agreements/*", {
statusCode: 500,
error: "Something went wrong",
});
- cy.contains("Yes, delete").click();
+ cy.contains("Accept").click();
cy.get("main div[class='dialog alert']").contains(
"Something went wrong: Error: Internal Server Error"
);
@@ -524,7 +523,11 @@ describe("Agreement CRUD operations", () => {
statusCode: 204,
body: null,
});
- cy.contains("Yes, delete").click();
+ cy.get("#agreements_list table tbody tr:first")
+ .contains("Delete")
+ .click();
+ cy.get(".dialog.alert.confirmation h1").contains("remove this agreement");
+ cy.contains("Accept").click();
cy.get("main div[class='dialog message']").contains(
"Agreement deleted"
);
--
2.30.2