From 17a60699487a0b1054eeeee623db94f787a176de Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr>
Date: Fri, 21 Apr 2023 13:39:11 +0200
Subject: [PATCH 1/2] test(e2e): check that predams results are displayed for
 all modules

refs #619
---
 e2e/calculator.po.ts                |  2 ++
 e2e/prebarrages-results.e2e-spec.ts | 56 +++++++++++++++++++++++++++++
 2 files changed, 58 insertions(+)
 create mode 100644 e2e/prebarrages-results.e2e-spec.ts

diff --git a/e2e/calculator.po.ts b/e2e/calculator.po.ts
index d7552190a..6f8966a17 100644
--- a/e2e/calculator.po.ts
+++ b/e2e/calculator.po.ts
@@ -249,6 +249,8 @@ export class CalculatorPage {
             ||
             await this.presentAndVisible("pb-results pb-results-table")
             ||
+            await this.presentAndVisible("pb-results pb-cloison-results")
+            ||
             await this.presentAndVisible("macrorugo-compound-results macrorugo-compound-results-table")
             ||
             await this.presentAndVisible("jet-results .fixed-results-container")
diff --git a/e2e/prebarrages-results.e2e-spec.ts b/e2e/prebarrages-results.e2e-spec.ts
new file mode 100644
index 000000000..e7af14868
--- /dev/null
+++ b/e2e/prebarrages-results.e2e-spec.ts
@@ -0,0 +1,56 @@
+import { ListPage } from "./list.po";
+import { CalculatorPage } from "./calculator.po";
+import { Navbar } from "./navbar.po";
+import { browser, by, element } from "protractor";
+import { AppPage } from "./app.po";
+import { SideNav } from "./sidenav.po";
+import { PreferencesPage } from "./preferences.po";
+import { changeSelectValue, scrollPageToTop } from "./util.po";
+
+/**
+ * Clone calculators
+ */
+describe("Prébarrages results - ", () => {
+    let listPage: ListPage;
+    let calcPage: CalculatorPage;
+    let navBar: Navbar;
+    let prefPage: PreferencesPage;
+
+    beforeAll(() => {
+        listPage = new ListPage();
+        calcPage = new CalculatorPage();
+        navBar = new Navbar();
+        prefPage = new PreferencesPage();
+        jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 1000;
+    });
+
+    beforeEach(async () => {
+        // disable evil option "empty fields on module creation"
+        await prefPage.navigateTo();
+        await prefPage.disableEvilEmptyFields();
+        await browser.sleep(200);
+    });
+
+    it("every module shoud have results", async () => {
+        // create prébarrage calculator
+        await navBar.clickNewCalculatorButton();
+        await listPage.clickMenuEntryForCalcType(30);
+
+        // run calculation
+        const calcButton = calcPage.getCalculateButton();
+        await calcButton.click();
+        await browser.sleep(200);
+
+        const nodes = element.all(by.css("g.nodes > g"));
+        const nb = await nodes.count();
+        for (let n = 0; n < nb; n++) {
+            const node = nodes.get(n);
+            await node.click();
+            await browser.sleep(200);
+
+            // check that result is not empty
+            const hasResults = await calcPage.hasResults();
+            expect(hasResults).toBe(true);
+        }
+    });
+});
-- 
GitLab


From 6ccae3f912cc0bd9cd527d9a8f3e1546c48739b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr>
Date: Fri, 21 Apr 2023 13:40:14 +0200
Subject: [PATCH 2/2] fix: predams results not displayed for walls

refs #619
---
 src/app/formulaire/definition/form-definition.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/app/formulaire/definition/form-definition.ts b/src/app/formulaire/definition/form-definition.ts
index d70225029..23f9d2d98 100644
--- a/src/app/formulaire/definition/form-definition.ts
+++ b/src/app/formulaire/definition/form-definition.ts
@@ -344,7 +344,7 @@ export abstract class FormulaireDefinition extends FormulaireNode implements Obs
             }
         }
 
-        this.completeParse();
+        this.completeParse(false);
     }
 
     public hasParameter(symbol: string): boolean {
-- 
GitLab