diff --git a/src/client/cypress/e2e/editor/dataCards.cy.js b/src/client/cypress/e2e/editor/dataCards.cy.js index 14668c3c2..af1a7859a 100644 --- a/src/client/cypress/e2e/editor/dataCards.cy.js +++ b/src/client/cypress/e2e/editor/dataCards.cy.js @@ -1,6 +1,12 @@ -import { createBorehole, handlePrompt, loginAsAdmin, startBoreholeEditing } from "../helpers/testHelpers"; +import { + createBorehole, + handlePrompt, + loginAsAdmin, + startBoreholeEditing, + stopBoreholeEditing, +} from "../helpers/testHelpers"; import { evaluateDisplayValue, evaluateTextarea, setInput, setSelect } from "../helpers/formHelpers"; -import { addItem, saveForm, startEditing, stopEditing } from "../helpers/buttonHelpers"; +import { addItem, saveForm, startEditing } from "../helpers/buttonHelpers"; describe("Tests for the data cards in the editor.", () => { it("resets datacards when stop editing", () => { @@ -13,7 +19,7 @@ describe("Tests for the data cards in the editor.", () => { cy.wait(500); addItem("addwateringress"); cy.get('[data-cy="waterIngress-card.0.edit"]').should("exist"); - stopEditing(); + stopBoreholeEditing(); cy.get('[data-cy="waterIngress-card.0.edit"]').should("not.exist"); startBoreholeEditing(); @@ -27,7 +33,7 @@ describe("Tests for the data cards in the editor.", () => { cy.wait("@wateringress_GET"); startEditing(); setInput("comment", "Lorem."); - stopEditing(); + stopBoreholeEditing(); evaluateDisplayValue("comment", "-"); });