From ff41c87932d0ad2ed33b10508985099a8729bc75 Mon Sep 17 00:00:00 2001 From: MiraGeowerkstatt Date: Thu, 22 Aug 2024 21:15:55 +0200 Subject: [PATCH] Fix cy test --- src/client/cypress/e2e/editor/lithologicalDescription.cy.js | 4 ++-- .../descriptionLayers/descriptionDeleteDialog.jsx | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/client/cypress/e2e/editor/lithologicalDescription.cy.js b/src/client/cypress/e2e/editor/lithologicalDescription.cy.js index 16b8afafc..13255ae1e 100644 --- a/src/client/cypress/e2e/editor/lithologicalDescription.cy.js +++ b/src/client/cypress/e2e/editor/lithologicalDescription.cy.js @@ -88,7 +88,7 @@ describe("Tests for the lithological description column.", () => { // delete last layer cy.get('[data-cy="description-1"] [data-testid="DeleteIcon"] ').click(); - deleteItem(); + deleteItem("description-button-box"); cy.wait("@lithological_description"); // delete request cy.wait("@lithological_description"); // updated get request cy.wait(5000); @@ -119,7 +119,7 @@ describe("Tests for the lithological description column.", () => { // assert error message cy.get('[data-cy="description-1"]').contains("You are about to delete this layer, how do you want to proceed?"); - deleteItem(); + deleteItem("description-button-box"); cy.wait("@lithological_description"); // delete request cy.wait("@lithological_description"); // updated get request cy.get('[data-cy="description-1"]').contains("There is an undefined interval in the sequence"); diff --git a/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/descriptionDeleteDialog.jsx b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/descriptionDeleteDialog.jsx index 6d786fce1..446b417da 100644 --- a/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/descriptionDeleteDialog.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/descriptionDeleteDialog.jsx @@ -22,7 +22,10 @@ const DescriptionDeleteDialog = props => { {t("deletelayerconfirmation")} - + { e.stopPropagation();