Skip to content

Commit

Permalink
e2e fix: Wait for iframe after opening node (#2802)
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz authored Feb 7, 2022
1 parent e8ee617 commit 90cd3d2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 1 addition & 3 deletions tests/e2e/portal/2D_Plot.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// node 2D_Plot.js [url_prefix] [template_uuid] [--demo]

const tutorialBase = require('../tutorials/tutorialBase');
const auto = require('../utils/auto');
const utils = require('../utils/utils');

const args = process.argv.slice(2);
Expand Down Expand Up @@ -30,8 +29,7 @@ async function runTutorial () {
await tutorial.waitFor(5000, 'Some time for starting the service');
await utils.takeScreenshot(page, screenshotPrefix + 'service_started');

// await tutorial.openNode(1);
auto.openNode(page, 1);
await tutorial.openNode(1);

await tutorial.waitFor(2000);
await utils.takeScreenshot(page, screenshotPrefix + 'iFrame0');
Expand Down
3 changes: 1 addition & 2 deletions tests/e2e/portal/Kember.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// node kember.js [url_prefix] [template_uuid] [--demo]

const tutorialBase = require('../tutorials/tutorialBase');
const auto = require('../utils/auto');
const utils = require('../utils/utils');

const args = process.argv.slice(2);
Expand Down Expand Up @@ -41,7 +40,7 @@ async function runTutorial () {


// open kember viewer
auto.openNode(page, 1);
await tutorial.openNode(1);

await tutorial.waitFor(2000);
await utils.takeScreenshot(page, screenshotPrefix + 'iFrame0');
Expand Down
3 changes: 3 additions & 0 deletions tests/e2e/tutorials/tutorialBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ class TutorialBase {

async openNode(nodePosInTree = 0) {
await auto.openNode(this.__page, nodePosInTree);
// Iframes get loaded on demand, wait 5"
await this.waitFor(5000);
await this.takeScreenshot('openNode_' + nodePosInTree);
}

Expand Down Expand Up @@ -404,6 +406,7 @@ class TutorialBase {
}

async removeStudy(studyId) {
await this.waitFor(5000, 'Wait to be unlocked');
await this.takeScreenshot("deleteFirstStudy_before");
try {
// await this.waitForStudyUnlocked(studyId);
Expand Down

0 comments on commit 90cd3d2

Please sign in to comment.