Commit 10e9d334 authored by Grand Francois's avatar Grand Francois
Browse files

test(e2e): predams: check results are displayed when dichotomy does not converge

refs #614
Showing with 38 additions and 0 deletions
+38 -0
......@@ -95,4 +95,37 @@ describe("predams - ", () => {
// check log messages absence
expect(await calcPage.hasLog()).toBe(false);
});
it("check submergence error and results if dichotomy did not converge", 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
await prefPage.navigateTo();
await browser.pause(200);
await prefPage.setIterationCount(10);
await prefPage.setComputePrecision(1e-15);
// back to module
await navBar.openNthCalculator(0);
await browser.pause(500);
// calculate module
const calcBtn = await calcPage.getCalculateButton();
await calcBtn.click();
await browser.pause(300);
// check log messages presence
expect(await calcPage.hasLog()).toBe(true);
expect(await calcPage.nbLogEntries()).toBe(12);
// check that results are not empty (dichotomy did not convergence but results should be displayed anyway)
const hasResults = await calcPage.hasResults();
expect(hasResults).toBe(true);
});
});
......@@ -84,4 +84,9 @@ export class PreferencesPage {
const input = await this.getInputFromName("nmi");
await input.setValue(n.toString());
}
async setComputePrecision(p: number) {
const input = await this.getInputFromName("cp");
await input.setValue(p.toString());
}
}
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