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

test(e2e): check that select default value from configuration is honored

refs #483
parent faa6e21c
No related branches found
No related tags found
2 merge requests!225Release v4.17.0,!176Resolve "Fusionner les "select" avec "source" et les "select_custom""
import { browser } from "protractor";
import { CalculatorPage } from "./calculator.po";
import { ListPage } from "./list.po";
import { Navbar } from "./navbar.po";
import { PreferencesPage } from "./preferences.po";
describe("check the select default value - ", () => {
let prefPage: PreferencesPage;
let listPage: ListPage;
let calcPage: CalculatorPage;
let navBar: Navbar;
beforeAll(() => {
prefPage = new PreferencesPage();
listPage = new ListPage();
calcPage = new CalculatorPage();
navBar = new Navbar();
});
beforeEach(async () => {
// disable evil option "empty fields on module creation"
await prefPage.navigateTo();
await prefPage.disableEvilEmptyFields();
await browser.sleep(200);
await prefPage.changeLanguage(1); // fr
await browser.sleep(200);
});
it("in the 'backwater curve' calculator", async () => {
// open backwater curve calculator
await navBar.clickNewCalculatorButton();
await listPage.clickMenuEntryForCalcType(4);
await browser.sleep(200);
// in the calculator configuration file, the default resolution method is 'Trapezes'.
// let's check this...
const sel_section = calcPage.getSelectById("select_resolution");
const val = await calcPage.getSelectValueText(sel_section);
expect(val).toBe("Intégration par trapèzes");
});
});
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