diff --git a/e2e/solveur.e2e-spec.ts b/e2e/solveur.e2e-spec.ts index 281aeec5a79ff550a721218e68b616ecfc59d184..9c7160e07db91380abaa253955ba975923ed46aa 100644 --- a/e2e/solveur.e2e-spec.ts +++ b/e2e/solveur.e2e-spec.ts @@ -375,4 +375,34 @@ describe("Solveur - nghyd#601 without empty fields option", () => { await calcPage.checkEmptyInput("Xinit", false); await browser.sleep(200); }); + + it(" with empty fields option, check selecting a target module does not fill inputs", async () => { + // disable evil option "empty fields on module creation" + await prefPage.setEmptyFields(false); + await browser.sleep(200); + + await navBar.clickNewCalculatorButton(); + await browser.sleep(200); + + // open "channel flow with hydraulic structures" example + const examples = await element.all(by.css("#examples-list .load-example")); + await examples[1].click(); + await browser.sleep(500); + + // close existing "solver" calculator + await navBar.middleClickCalculatorTab(3); + await browser.sleep(500); + + // open new solver calculator + await openSolver(); + await browser.sleep(500); + + // select other target module + const ntc = calcPage.getSelectById("select_target_nub"); + await calcPage.changeSelectValue(ntc, 1); + + // check target value input is empty + await calcPage.checkEmptyInput("Ytarget", true); + await browser.sleep(200); + }); });