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

test(e2e): pressure loss: check fields are empty when calculator is created...

test(e2e): pressure loss: check fields are empty when calculator is created with "empty fields" flags

refs #585
parent d1cd2406
No related branches found
No related tags found
No related merge requests found
Pipeline #140131 passed
import { ListPage } from "./list.po";
import { Navbar } from "./navbar.po";
import { browser } from "protractor";
import { CalculatorPage } from "./calculator.po";
import { PreferencesPage } from "./preferences.po";
fdescribe("Check fields are empty in 'pressure loss' calculator when created with 'empty fields' option -", () => {
let listPage: ListPage;
let navBar: Navbar;
let calcPage: CalculatorPage;
let prefPage: PreferencesPage;
beforeAll(async () => {
listPage = new ListPage();
navBar = new Navbar();
calcPage = new CalculatorPage();
prefPage = new PreferencesPage();
});
beforeEach(async () => {
// enable evil option "empty fields on module creation"
await prefPage.navigateTo();
await prefPage.enableEvilEmptyFields();
await browser.sleep(200);
});
it("with Lechapt-Calmon pressure loss law", async () => {
// open "pressure loss" calculator
await navBar.clickNewCalculatorButton();
await listPage.clickMenuEntryForCalcType(35);
await browser.sleep(200);
// select Lechapt-Calmon pressure loss law
const materialSelect = calcPage.getSelectById("select_pressurelosstype");
await calcPage.changeSelectValue(materialSelect, 0);
await browser.sleep(200);
expect(calcPage.checkEmptyOrFilledFields(["Q", "D", "Lg", "Kloc"], [true, true, true, true]));
});
});
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