From e0c65fae88fcc8cbf3ebf217f9f81118b2b2e6a7 Mon Sep 17 00:00:00 2001 From: Koen Verheyen Date: Mon, 9 Sep 2024 13:17:17 +0200 Subject: [PATCH] Improved test structure #1568 --- cypress/e2e/issues/issue-1568.cy.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/cypress/e2e/issues/issue-1568.cy.ts b/cypress/e2e/issues/issue-1568.cy.ts index dc12f728..db348ddc 100644 --- a/cypress/e2e/issues/issue-1568.cy.ts +++ b/cypress/e2e/issues/issue-1568.cy.ts @@ -677,13 +677,14 @@ describe("Issue #1568: Missing conflict handling when editing / adding / removin .map((tr: HTMLTableRowElement) => tr.querySelector("td").textContent) .should("eql", contributors); } + + function verifyConflictErrorDialog(scope: "Publication" | "Dataset") { + cy.ensureModal(null) + .within(() => { + cy.contains( + `${scope} has been modified by another user. Please reload the page.`, + ).should("be.visible"); + }) + .closeModal("Close"); + } }); -function verifyConflictErrorDialog(scope: "Publication" | "Dataset") { - cy.ensureModal(null) - .within(() => { - cy.contains( - `${scope} has been modified by another user. Please reload the page.`, - ).should("be.visible"); - }) - .closeModal("Close"); -}