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

test(e2e): predams: check that results are not displayed when dichotomy...

test(e2e): predams: check that results are not displayed when dichotomy convergence error occurred along with another error

refs #614
Showing with 50 additions and 0 deletions
+50 -0
...@@ -128,4 +128,54 @@ describe("predams - ", () => { ...@@ -128,4 +128,54 @@ describe("predams - ", () => {
const hasResults = await calcPage.hasResults(); const hasResults = await calcPage.hasResults();
expect(hasResults).toBe(true); expect(hasResults).toBe(true);
}); });
it("check results (dichotomy did not converge + submergence error)", async () => {
await startPage.navigateTo();
await browser.pause(200);
// open predams example
const examples = await $$("#examples-list .load-example");
await examples[6].click();
await browser.pause(500);
// modify iteration count,precision (should trigger submergence+dichotomy non convergence errors)
await prefPage.navigateTo();
await browser.pause(200);
await prefPage.setIterationCount(20);
await prefPage.setComputePrecision(1e-15);
// back to module
await navBar.openNthCalculator(0);
await browser.pause(500);
// click "Amont-B2"
const nodes = await $$("g.nodes > g");
const node = nodes[9];
await scrollToElement(node);
await browser.pause(100);
await node.click();
await browser.pause(200);
// change discharge law to Larinier
const sel = await calcPage.getSelectById("select_loidebit");
await changeSelectValue(sel, 3);
await browser.pause(100);
// calculate module
const calcBtn = await calcPage.getCalculateButton();
await calcBtn.click();
await browser.pause(300);
// check that results are empty
const hasResults = await calcPage.hasResults();
expect(hasResults).toBe(false);
// check log messages
expect(await calcPage.hasLog()).toBe(true);
expect(await calcPage.nbLogEntries()).toBe(4);
expect(await calcPage.nthLogEntryIsWarning(0)).toBe(true);
expect(await calcPage.nthLogEntryIsError(1)).toBe(true);
expect(await calcPage.nthLogEntryIsWarning(2)).toBe(true);
expect(await calcPage.nthLogEntryIsError(3)).toBe(true);
});
}); });
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