Skip to content
Snippets Groups Projects
Commit 089f3de8 authored by Mathias Chouet's avatar Mathias Chouet
Browse files

Updated e2e for new Section results

parent 079d21da
No related branches found
No related tags found
No related merge requests found
......@@ -121,22 +121,27 @@ export class CalculatorPage {
async hasResults() {
return (
await element(by.css("fixedvar-results fixed-results > .fixed-results-container")).isPresent()
await this.presentAndVisible("fixedvar-results fixed-results > .fixed-results-container")
||
await element(by.css("fixedvar-results results-chart > chart-results-container")).isPresent()
await this.presentAndVisible("fixedvar-results results-chart > chart-results-container")
||
await element(by.css("section-results fixed-results > .fixed-results-container")).isPresent()
await this.presentAndVisible("section-results fixed-results > .fixed-results-container")
||
await element(by.css("remous-results #main-chart")).isPresent()
await this.presentAndVisible("remous-results #main-chart")
||
await element(by.css("pab-results pab-results-table")).isPresent()
await this.presentAndVisible("pab-results pab-results-table")
||
await element(by.css("macrorugo-compound-results macrorugo-compound-results-table")).isPresent()
await this.presentAndVisible("macrorugo-compound-results macrorugo-compound-results-table")
||
await element(by.css("jet-results .fixed-results-container")).isPresent()
await this.presentAndVisible("jet-results .fixed-results-container")
);
}
async presentAndVisible(selector: string): Promise<boolean> {
const elt = element(by.css(selector));
return await elt.isPresent() && await elt.isDisplayed();
}
/**
* For a given <table> element, check that values of all cells of all rows in <tbody> are
* different from "NaN", "ERR" and optionally ""
......
......@@ -45,6 +45,7 @@ describe("ngHyd − compute then reset chained results − ", () => {
// down-most module should have results
let hasResults = await calcPage.hasResults();
expect(hasResults).toBe(true);
// up-most should not
await navbar.clickCalculatorTabForUid("ZTFxeW");
hasResults = await calcPage.hasResults();
......
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