Skip to content
Snippets Groups Projects
Commit 10e9d334 authored by François Grand's avatar François Grand
Browse files

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

refs #614
parent 1a5d78e3
No related branches found
No related tags found
2 merge requests!225Release v4.17.0,!216Resolve "Structure: Ajouter une erreur sur l'ennoiement"
......@@ -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());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment