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

test(e2e): check hydraulic details availability in 'up/downstream elevations of a reach' calculator

see jalhyd#311 for resolution

refs #504
parent 86a48d27
No related branches found
No related tags found
Loading
Pipeline #139583 passed
import { browser, by, element } from "protractor";
import { PreferencesPage } from "./preferences.po"
import { Navbar } from "./navbar.po";
import { ListPage } from "./list.po";
describe("ngHyd − up/downstream elevations of a reach", () => {
let prefPage: PreferencesPage;
let navBar: Navbar;
let listPage: ListPage;
beforeEach(async () => {
prefPage = new PreferencesPage();
listPage = new ListPage();
navBar = new Navbar();
// disable evil option "empty fields on module creation"
await prefPage.navigateTo();
await browser.sleep(200);
await prefPage.disableEvilEmptyFields();
await browser.sleep(200);
});
it("check hydraulic details availability", async () => {
// open "up/downstream elevations of a reach" calculator
await navBar.clickNewCalculatorButton();
await listPage.clickMenuEntryForCalcType(21);
await browser.sleep(200);
// set upstream flow in calculate mode
const flowCalcBtn = element(by.xpath("//field-set[4]/mat-card-content/param-field-line[1]/div/div[2]/mat-button-toggle-group/mat-button-toggle[3]"));
await flowCalcBtn.click();
// click upstream hydraulic details button
const upDetailsBtn = element(by.id("generate-sp-aval"));
await upDetailsBtn.click();
// a second calculator should be created
let calcs = navBar.getAllCalculatorTabs();
expect((await calcs).length).toEqual(2);
});
});
devel
311-parametres-lies-ameliorer-les-informations-sur-la-cible
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