Commit 68060547 authored by Grand Francois's avatar Grand Francois
Browse files

test(e2e): check log messages in predams example

refs #614
Showing with 37 additions and 2 deletions
+37 -2
......@@ -3,18 +3,22 @@ import { ListPage } from "./list.po";
import { Navbar } from "./navbar.po";
import { PreferencesPage } from "./preferences.po"
import { browser, $, $$, expect } from '@wdio/globals'
import { changeSelectValue, scrollToElement } from "./util.po";
import { AppPage } from "./app.po";
describe("check that low iteration count leads to log messages", () => {
describe("predams - ", () => {
let listPage: ListPage;
let prefPage: PreferencesPage;
let navBar: Navbar;
let calcPage: CalculatorPage;
let startPage: AppPage;
beforeAll(() => {
prefPage = new PreferencesPage();
listPage = new ListPage();
navBar = new Navbar();
calcPage = new CalculatorPage();
startPage = new AppPage();
});
beforeEach(async () => {
......@@ -25,7 +29,7 @@ describe("check that low iteration count leads to log messages", () => {
await browser.pause(100);
});
it("", async () => {
it("check that low iteration count leads to log messages", async () => {
// set low iteration count
await prefPage.setIterationCount(5);
......@@ -42,4 +46,35 @@ describe("check that low iteration count leads to log messages", () => {
// check log messages presence
expect(await calcPage.hasLog()).toBe(true);
});
it("check log messages in predams example", async () => {
await startPage.navigateTo();
await browser.pause(200);
// open predams example
const examples = await $$("#examples-list .load-example");
await examples[6].click();
await browser.pause(500);
// click "Amont-B2"
const nodes = await $$("g.nodes > g");
const node = nodes[9];
await scrollToElement(node);
await browser.pause(100);
await node.click();
await browser.pause(200);
// change discharge law to Larinier
const sel = await calcPage.getSelectById("select_loidebit");
await changeSelectValue(sel, 3);
await browser.pause(100);
// calculate module
const calcBtn = await calcPage.getCalculateButton();
await calcBtn.click();
await browser.pause(300);
// check log messages presence
expect(await calcPage.hasLog()).toBe(true);
});
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment