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";
import { browser, $, $$, expect } from '@wdio/globals'
import { isElementDisplayed, openCalculator } from "./util.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
xdescribe("MacroRugoRemous - ", () => {
let prefPage: PreferencesPage;
let listPage: ListPage;
let navBar: Navbar;
let calcPage: CalculatorPage;
let prefPage: PreferencesPage;
let listPage: ListPage;
let navBar: Navbar;
let calcPage: CalculatorPage;
let sideNav: SideNav;
beforeAll(() => {
prefPage = new PreferencesPage();
listPage = new ListPage();
navBar = new Navbar();
calcPage = new CalculatorPage();
sideNav = new SideNav();
});
beforeEach(async () => {
......@@ -27,56 +31,53 @@ xdescribe("MacroRugoRemous - ", () => {
await browser.pause(200);
});
it("check select empty message is present when no PAM is in the session", async () => {
// MacroRugoRemous calculator
await openCalculator(37, navBar, listPage);
it("check select empty message is present when no PAM is in the session", async () => {
// MacroRugoRemous calculator
await openCalculator(37, navBar, listPage);
// const emptyMsg = element(by.css("div .message-when-empty"));
const emptyMsg = await $("div .message-when-empty");
expect(await isElementDisplayed(emptyMsg)).toBe(true);
});
it("check select empty message is not present when a PAM exists in the session", async () => {
// PAM calculator
await openCalculator(11, navBar, listPage);
it("check select empty message is not present when a PAM exists in the session", async () => {
// PAM calculator
await openCalculator(11, navBar, listPage);
await navBar.clickNewCalculatorButton();
await browser.pause(200);
// MacroRugoRemous calculator
await openCalculator(37, navBar, listPage);
// MacroRugoRemous calculator
await openCalculator(37, navBar, listPage);
const emptyMsg = $("div .message-when-empty");
expect(await isElementDisplayed(emptyMsg)).toBe(false);
});
it("check select error message when target PAM has no variated parameter", async () => {
// PAM calculator
await openCalculator(11, navBar, listPage);
it("check select error message when target PAM has no variated parameter", async () => {
// PAM calculator
await openCalculator(11, navBar, listPage);
// MacroRugoRemous calculator
await openCalculator(37, navBar, listPage);
// MacroRugoRemous calculator
await openCalculator(37, navBar, listPage);
const errorMsg = await $("div .select-error-message");
expect(await isElementDisplayed(errorMsg)).toBe(false);
});
it("check select error message when target PAM has a variated parameter", async () => {
// start page
await navBar.clickNewCalculatorButton();
await browser.pause(200);
await newSession(navBar, sideNav);
// PAM calculator
await listPage.clickMenuEntryForCalcType(11);
browser.pause(200);
// open PAM calculator
await openCalculator(11, navBar, listPage);
// set ZF1 to variated mode
const zf1 = await calcPage.getInputById("ZF1");
await calcPage.setParamMode(zf1, "var");
await browser.pause(200);
// MacroRugoRemous calculator
await openCalculator(37, navBar, listPage);
// MacroRugoRemous calculator
await openCalculator(37, navBar, listPage);
const errorMsg = await $("div .select-error-message");
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