From 51eee4434bea2d572e9ad87b39e4a4d77e433265 Mon Sep 17 00:00:00 2001
From: David Dorchies <david.dorchies@inrae.fr>
Date: Tue, 12 Apr 2022 16:33:42 +0000
Subject: [PATCH] test: add test that currently fails on critical flow
 calculation

Refs #528
---
 e2e/remous.e2e-spec.ts | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/e2e/remous.e2e-spec.ts b/e2e/remous.e2e-spec.ts
index 5c4603946..f79ad021f 100644
--- a/e2e/remous.e2e-spec.ts
+++ b/e2e/remous.e2e-spec.ts
@@ -47,4 +47,27 @@ describe("ngHyd − remous", () => {
         // 5. there should still be 6 messages in the log
         expect(await calcPage.nbLogEntries()).toBe(6);
     });
+
+    it("Calculation with large bed width should run successfully", async () => {
+        await navBar.clickNewCalculatorButton();
+
+        // 1. create new Remous
+        await listPage.clickMenuEntryForCalcType(4);
+        await browser.sleep(300);
+
+        // 2. Set to trapezoidal section with bank slope of 2m/m and 20 meter width bed
+        await calcPage.changeSelectValue(calcPage.getSelectById("select_section"), 2);
+        await browser.sleep(300);
+        await calcPage.getInputById("LargeurFond").clear();
+        await browser.sleep(300);
+        await calcPage.getInputById("LargeurFond").sendKeys("20");
+        await calcPage.getInputById("Fruit").clear();
+        await browser.sleep(300);
+        await calcPage.getInputById("Fruit").sendKeys("2");
+
+        // 3. Calculate, the calculation should succeed
+        await calcPage.getCalculateButton().click();
+        const hasResults = await calcPage.hasResults();
+        expect(hasResults).toBe(true);
+    });
 });
-- 
GitLab