Skip to content

Commit

Permalink
Make WaterIngress condition optional (#1027)
Browse files Browse the repository at this point in the history
  • Loading branch information
tschumpr authored Feb 15, 2024
2 parents 624b4c0 + 52ba392 commit 8a69eb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/client/cypress/e2e/editor/waterIngress.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ describe("Tests for the wateringress editor.", () => {
cy.wait("@casing_GET");

setSelect("quantityId", 2);
setSelect("conditionsId", 2);
setSelect("reliabilityId", 1);
setSelect("casingId", 1);
setInput("startTime", "2012-11-14T12:06");
Expand All @@ -79,15 +78,16 @@ describe("Tests for the wateringress editor.", () => {
saveForm();

evaluateDisplayValue("quantity", "viel (> 120 l/min)");
evaluateDisplayValue("conditions", "frei/ungespannt");
evaluateDisplayValue("reliability", "fraglich");
evaluateDisplayValue("casingName", "casing-1");

// edit wateringress
startEditing();
setSelect("quantityId", 1);
setSelect("conditionsId", 3);
saveForm();
evaluateDisplayValue("quantity", "mittel (30 - 120 l/min)");
evaluateDisplayValue("conditions", "frei/ungespannt");
evaluateDisplayValue("casingName", "casing-1");

// delete wateringress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ const WaterIngressInput = props => {
if (data.casingId == null) {
data.casingId = item.casingId;
}
if (data.conditionsId === "") {
data.conditionsId = null;
}
return data;
};

Expand Down Expand Up @@ -53,7 +56,6 @@ const WaterIngressInput = props => {
fieldName="conditionsId"
label="conditions"
selected={item.conditionsId}
required={true}
values={domains?.data
?.filter(
d =>
Expand Down

0 comments on commit 8a69eb1

Please sign in to comment.