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

test(e2e): check that running a calculation in solver does not modify selected searched parameter

refs #486
parent 5dfd1310
No related branches found
No related tags found
1 merge request!148Resolve "Solveur multimodule: le choix du paramètre recherché n'est pas maintenu à l'écran"
......@@ -2,7 +2,7 @@ import { AppPage } from "./app.po";
import { ListPage } from "./list.po";
import { CalculatorPage } from "./calculator.po";
import { Navbar } from "./navbar.po";
import { browser } from "protractor";
import { browser, by, element } from "protractor";
import { SideNav } from "./sidenav.po";
import { PreferencesPage } from "./preferences.po";
......@@ -145,4 +145,29 @@ describe("Solveur - ", () => {
const hasResultsClone2 = await calcPage.hasResults();
expect(hasResultsClone2).toBe(true);
});
it("channel flow example > solver > change searched parameter > run calculation", async () => {
// 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);
// select solver tab
await navbar.clickCalculatorTab(3);
await browser.sleep(200);
// modify searched parameter
const sel = calcPage.getSelectById("select_searched_param");
await calcPage.changeSelectValue(sel, 11);
await browser.sleep(100);
const selText = await calcPage.getSelectValueText(sel);
// run calculation
const calcButton = calcPage.getCalculateButton();
await calcButton.click();
await browser.sleep(500);
// check "search parameter" value has not changed
expect(await calcPage.getSelectValueText(sel)).toEqual(selText);
});
});
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