Commit db23cc50 authored by Grand Francois's avatar Grand Francois
Browse files

test(e2e): check computed parameter initial value is not null with "empty...

test(e2e): check computed parameter initial value is not null with "empty fields on calculator creation" option

refs #516
Showing with 32 additions and 1 deletion
+32 -1
...@@ -58,4 +58,35 @@ describe("ngHyd - Check that examples fields are not empty with 'empty fields on ...@@ -58,4 +58,35 @@ describe("ngHyd - Check that examples fields are not empty with 'empty fields on
const emptys = [false, false, false, false, false]; const emptys = [false, false, false, false, false];
await checkFields(inputIds, emptys); await checkFields(inputIds, emptys);
}); });
it("calculated parameter initial value when discharge law is modified", async () => {
// start page
await navBar.clickNewCalculatorButton();
await browser.sleep(200);
// open 1st example
const examples = await element.all(by.css("#examples-list .load-example"));
await examples[0].click();
await browser.sleep(50);
// select wall module
await navBar.openNthCalculator(4);
await browser.sleep(50);
// modify 1st structure discharge law
const dischargeSelect = calcPage.getSelectById("select_loidebit");
await calcPage.changeSelectValue(dischargeSelect, 1);
await browser.sleep(200);
// open initial dialog
const initDlgButton = element(by.className("param-computed-more"));
await initDlgButton.click();
await browser.sleep(200);
// check input value is not null
const input = calcPage.getInputById("initval-input");
const underlyingInput = input.element(by.id("0_h1"));
const txt = await underlyingInput.getAttribute("value");
expect(txt === "").toEqual(false);
});
}); });
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<form> <form>
<div mat-dialog-content> <div mat-dialog-content>
<ngparam-input [title]="param.title"></ngparam-input> <ngparam-input id="initval-input" [title]="param.title"></ngparam-input>
</div> </div>
<div mat-dialog-actions [attr.align]="'end'"> <div mat-dialog-actions [attr.align]="'end'">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment