Skip to content
Snippets Groups Projects
Commit 0e5db8fd authored by François Grand's avatar François Grand Committed by AUBRY JEAN-PASCAL
Browse files

fix(e2e): MacroRugoRemous test failure

refs #609
parent 80cbbda1
No related branches found
No related tags found
2 merge requests!252release: version 4.18.0,!213Resolve "Ajout du module courbe de remous d'une passe à macro-rugosité"
...@@ -4,19 +4,23 @@ import { Navbar } from "./navbar.po"; ...@@ -4,19 +4,23 @@ import { Navbar } from "./navbar.po";
import { browser, $, $$, expect } from '@wdio/globals' import { browser, $, $$, expect } from '@wdio/globals'
import { isElementDisplayed, openCalculator } from "./util.po"; import { isElementDisplayed, openCalculator } from "./util.po";
import { CalculatorPage } from "./calculator.po"; import { CalculatorPage } from "./calculator.po";
import { newSession } from "./util.po";
import { SideNav } from "./sidenav.po";
//TODO à réactiver après fusion de nghyd#609 jalhyd#325 dans devel //TODO à réactiver après fusion de nghyd#609 jalhyd#325 dans devel
xdescribe("MacroRugoRemous - ", () => { xdescribe("MacroRugoRemous - ", () => {
let prefPage: PreferencesPage; let prefPage: PreferencesPage;
let listPage: ListPage; let listPage: ListPage;
let navBar: Navbar; let navBar: Navbar;
let calcPage: CalculatorPage; let calcPage: CalculatorPage;
let sideNav: SideNav;
beforeAll(() => { beforeAll(() => {
prefPage = new PreferencesPage(); prefPage = new PreferencesPage();
listPage = new ListPage(); listPage = new ListPage();
navBar = new Navbar(); navBar = new Navbar();
calcPage = new CalculatorPage(); calcPage = new CalculatorPage();
sideNav = new SideNav();
}); });
beforeEach(async () => { beforeEach(async () => {
...@@ -27,56 +31,53 @@ xdescribe("MacroRugoRemous - ", () => { ...@@ -27,56 +31,53 @@ xdescribe("MacroRugoRemous - ", () => {
await browser.pause(200); await browser.pause(200);
}); });
it("check select empty message is present when no PAM is in the session", async () => { it("check select empty message is present when no PAM is in the session", async () => {
// MacroRugoRemous calculator // MacroRugoRemous calculator
await openCalculator(37, navBar, listPage); await openCalculator(37, navBar, listPage);
// const emptyMsg = element(by.css("div .message-when-empty")); // const emptyMsg = element(by.css("div .message-when-empty"));
const emptyMsg = await $("div .message-when-empty"); const emptyMsg = await $("div .message-when-empty");
expect(await isElementDisplayed(emptyMsg)).toBe(true); expect(await isElementDisplayed(emptyMsg)).toBe(true);
}); });
it("check select empty message is not present when a PAM exists in the session", async () => { it("check select empty message is not present when a PAM exists in the session", async () => {
// PAM calculator // PAM calculator
await openCalculator(11, navBar, listPage); await openCalculator(11, navBar, listPage);
await navBar.clickNewCalculatorButton(); await navBar.clickNewCalculatorButton();
await browser.pause(200); await browser.pause(200);
// MacroRugoRemous calculator // MacroRugoRemous calculator
await openCalculator(37, navBar, listPage); await openCalculator(37, navBar, listPage);
const emptyMsg = $("div .message-when-empty"); const emptyMsg = $("div .message-when-empty");
expect(await isElementDisplayed(emptyMsg)).toBe(false); expect(await isElementDisplayed(emptyMsg)).toBe(false);
}); });
it("check select error message when target PAM has no variated parameter", async () => { it("check select error message when target PAM has no variated parameter", async () => {
// PAM calculator // PAM calculator
await openCalculator(11, navBar, listPage); await openCalculator(11, navBar, listPage);
// MacroRugoRemous calculator // MacroRugoRemous calculator
await openCalculator(37, navBar, listPage); await openCalculator(37, navBar, listPage);
const errorMsg = await $("div .select-error-message"); const errorMsg = await $("div .select-error-message");
expect(await isElementDisplayed(errorMsg)).toBe(false); expect(await isElementDisplayed(errorMsg)).toBe(false);
}); });
it("check select error message when target PAM has a variated parameter", async () => { it("check select error message when target PAM has a variated parameter", async () => {
// start page await newSession(navBar, sideNav);
await navBar.clickNewCalculatorButton();
await browser.pause(200);
// PAM calculator // open PAM calculator
await listPage.clickMenuEntryForCalcType(11); await openCalculator(11, navBar, listPage);
browser.pause(200);
// set ZF1 to variated mode // set ZF1 to variated mode
const zf1 = await calcPage.getInputById("ZF1"); const zf1 = await calcPage.getInputById("ZF1");
await calcPage.setParamMode(zf1, "var"); await calcPage.setParamMode(zf1, "var");
await browser.pause(200); await browser.pause(200);
// MacroRugoRemous calculator // MacroRugoRemous calculator
await openCalculator(37, navBar, listPage); await openCalculator(37, navBar, listPage);
const errorMsg = await $("div .select-error-message"); const errorMsg = await $("div .select-error-message");
expect(await isElementDisplayed(errorMsg)).toBe(true); expect(await isElementDisplayed(errorMsg)).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