From b37ddf63f61c9038949c6d2a59ee53670c368f43 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr>
Date: Tue, 11 Apr 2023 17:32:28 +0200
Subject: [PATCH] fix(test): some tests fail due to new submergence error

ref #302
---
 spec/pab/cloisons.spec.ts          | 10 +++++-----
 src/structure/factory_structure.ts |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/spec/pab/cloisons.spec.ts b/spec/pab/cloisons.spec.ts
index 549b1d0a..2ac79773 100755
--- a/spec/pab/cloisons.spec.ts
+++ b/spec/pab/cloisons.spec.ts
@@ -27,7 +27,7 @@ function getCloisonsTest(): Cloisons {
     const cloisons: Cloisons = getEmptyCloisonsTest();
     cloisons.addChild(CreateStructure(LoiDebit.WeirSubmergedLarinier));
     cloisons.calculatedParam = cloisons.prms.Q;
-    cloisons.structures[0].prms.h1.singleValue = 1;
+    cloisons.structures[0].prms.h1.singleValue = 2;
     return cloisons;
 }
 
@@ -37,11 +37,11 @@ describe("Class Cloisons: ", () => {
         beforeEach(() => {
             c = getCloisonsTest();
         });
-        it("vCalc should return 0.47", () => {
-            expect(c.CalcSerie().vCalc).toBeCloseTo(0.47, 3);
+        it("vCalc should return 0.94", () => {
+            expect(c.CalcSerie().vCalc).toBeCloseTo(0.94, 3);
         });
-        it("extraResults.PV should return 230.444", () => {
-            expect(c.CalcSerie().values.PV).toBeCloseTo(230.444, 1);
+        it("extraResults.PV should return 460.887", () => {
+            expect(c.CalcSerie().values.PV).toBeCloseTo(460.887, 1);
         });
         it("ZRMB should be 100.5", () => {
             c.CalcSerie();
diff --git a/src/structure/factory_structure.ts b/src/structure/factory_structure.ts
index 31927f60..9c9d641d 100755
--- a/src/structure/factory_structure.ts
+++ b/src/structure/factory_structure.ts
@@ -109,8 +109,8 @@ export function CreateStructure(loiDebit: LoiDebit, parentNub?: ParallelStructur
             if (!nullParams) {
                 rectStructPrms.L.singleValue = 0.2;
                 rectStructPrms.CdWSL.singleValue = 0.75;
-                rectStructPrms.ZDV.singleValue = 101;
-                rectStructPrms.h1.singleValue = 1;
+                rectStructPrms.ZDV.singleValue = 100;
+                rectStructPrms.h1.singleValue = 2;
             }
             ret = new StructureWeirSubmergedLarinier(rectStructPrms, dbg);
             break;
-- 
GitLab