Skip to content
Snippets Groups Projects
Commit 535e848d authored by Dorchies David's avatar Dorchies David
Browse files

Merge branch '538-prebarrage-puissance-dissipee-negative' into 'devel'

Resolve "Prébarrage : puissance dissipée négative"

Closes #538

See merge request !189
parents 88e15cfe 05c7070b
No related branches found
No related tags found
2 merge requests!225Release v4.17.0,!189Resolve "Prébarrage : puissance dissipée négative"
Pipeline #140054 passed
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"
describe("check that low iteration count leads to log messages", () => {
let listPage: ListPage;
let prefPage: PreferencesPage;
let navBar: Navbar;
let calcPage: CalculatorPage;
beforeEach(async () => {
prefPage = new PreferencesPage();
listPage = new ListPage();
navBar = new Navbar();
calcPage = new CalculatorPage();
// disable evil option "empty fields on module creation"
await prefPage.navigateTo();
await browser.sleep(200);
await prefPage.disableEvilEmptyFields();
await browser.sleep(100);
});
it("", async () => {
browser.manage().window().setPosition(2000, 30);
// set low iteration count
await prefPage.setIterationCount(5);
// open predam calculator
await navBar.clickNewCalculatorButton();
await listPage.clickMenuEntryForCalcType(30);
await browser.sleep(200);
// run calculation
const calcButton = calcPage.getCalculateButton();
await calcButton.click();
// check log messages presence
expect(calcPage.hasLog()).toBe(true);
});
});
......@@ -64,4 +64,10 @@ export class PreferencesPage {
await cb.click();
}
}
async setIterationCount(n: number) {
const input = this.getInputFromName("nmi");
input.clear();
await input.sendKeys(n.toString());
}
}
333-remous-renommer-la-ligne-d-eau-en-z-et-fournir-le-tirant-d-eau-d-apres-celle-ci
330-prebarrage-puissance-dissipee-negative
......@@ -38,8 +38,14 @@ jm = jm.replace(/\n/g, "");
// split on ","
const messages = jm.split(",");
// remove import on 1st line (wtf) @clodo
messages[0] = messages[0].substring(24);
// remove imports
const firstLine = messages[0].split(";");
while (firstLine.length > 1) {
if (firstLine[0].indexOf("import") !== -1) {
firstLine.splice(0, 1);
}
}
messages[0] = firstLine[firstLine.length - 1];
// read every language file
const localePath = "src/locale";
......
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