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

test(e2e): duplicate module, link parameter, close 1st module, duplicate

refs #571
parent e45bdf02
No related branches found
No related tags found
1 merge request!177Resolve "Un paramètre lié ne change pas d'état après la suppression du module cible"
import { browser, by, element } from "protractor";
import { CalculatorPage } from "./calculator.po";
import { ListPage } from "./list.po";
import { Navbar } from "./navbar.po";
import { PreferencesPage } from "./preferences.po";
......@@ -7,11 +8,13 @@ describe("linked parameter - ", () => {
let calcPage: CalculatorPage;
let prefPage: PreferencesPage;
let navBar: Navbar;
let listPage: ListPage;
beforeAll(() => {
calcPage = new CalculatorPage();
prefPage = new PreferencesPage();
navBar = new Navbar();
listPage = new ListPage();
});
beforeEach(async () => {
......@@ -52,4 +55,42 @@ describe("linked parameter - ", () => {
const inpZ2 = calcPage.getInputById("Z2");
expect(await calcPage.inputIsInFixedMode(inpZ2)).toBe(true);
});
it("delete linked module and duplicate remaining one", async () => {
// open "fish ladder: fall" calculator
await listPage.clickMenuEntryForCalcType(12);
await browser.sleep(200);
// clone calculator
await calcPage.clickCloneCalcButton();
await browser.sleep(200);
// set DH in link mode
let inpDH = calcPage.getInputById("DH");
await calcPage.setParamMode(inpDH, "link");
await browser.sleep(200);
// close 1st calculator
await navBar.middleClickCalculatorTab(0);
await browser.sleep(200);
// check DH input is in "fixed" state in remaining calculator (not the aim of this test)
inpDH = calcPage.getInputById("DH");
expect(await calcPage.inputIsInFixedMode(inpDH)).toBe(true);
// set DH to calculated mode
await calcPage.setParamMode(inpDH, "cal");
// clone calculator
await calcPage.clickCloneCalcButton();
await browser.sleep(200);
// select 1st tab
await navBar.clickCalculatorTab(0);
await browser.sleep(500);
// check DH input is in "calc" mode
inpDH = calcPage.getInputById("DH");
expect(await calcPage.inputIsInCalculatedMode(inpDH)).toBe(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