Skip to content

Commit

Permalink
Fix cy test
Browse files Browse the repository at this point in the history
  • Loading branch information
MiraGeowerkstatt committed Sep 3, 2024
1 parent 1c50a90 commit e055d66
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/client/cypress/e2e/editor/dataCards.cy.js
Original file line number Diff line number Diff line change
@@ -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", () => {
Expand All @@ -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();
Expand All @@ -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", "-");
});

Expand Down

0 comments on commit e055d66

Please sign in to comment.