Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", {
__centerLayout: null,
_resourceType: null,
_resourcesList: null,
_topBar: null,
_toolbar: null,
_searchBarFilter: null,
__viewModeLayout: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -991,10 +991,12 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
this.invalidateStudies();
this._resourcesContainer.setResourcesToList([]);

this._toolbar.show();
if (context === "search") {
this.__reloadFolders();
this.__reloadStudies();
} else if (context === "workspaces") {
this._toolbar.hide();
this._searchBarFilter.resetFilters();
this.__reloadWorkspaces();
} else if (context === "studiesAndFolders") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -752,13 +752,15 @@ qx.Class.define("osparc.desktop.WorkbenchView", {
__iFrameChanged: function(node) {
this.__iframePage.removeAll();

const loadingPage = node.getLoadingPage();
const iFrame = node.getIFrame();
const src = iFrame.getSource();
const iFrameView = (src === null || src === "about:blank") ? loadingPage : iFrame;
this.__iframePage.add(iFrameView, {
flex: 1
});
if (node) {
const loadingPage = node.getLoadingPage();
const iFrame = node.getIFrame();
const src = iFrame.getSource();
const iFrameView = (src === null || src === "about:blank") ? loadingPage : iFrame;
this.__iframePage.add(iFrameView, {
flex: 1
});
}
},

__populateSecondaryColumn: function(node) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,15 @@ qx.Class.define("osparc.node.slideshow.NodeView", {
this._iFrameLayout.removeAll();

const node = this.getNode();

const loadingPage = node.getLoadingPage();
const iFrame = node.getIFrame();
const src = iFrame.getSource();
const iFrameView = (src === null || src === "about:blank") ? loadingPage : iFrame;
this._iFrameLayout.add(iFrameView, {
flex: 1
});
if (node) {
const loadingPage = node.getLoadingPage();
const iFrame = node.getIFrame();
const src = iFrame.getSource();
const iFrameView = (src === null || src === "about:blank") ? loadingPage : iFrame;
this._iFrameLayout.add(iFrameView, {
flex: 1
});
}
}
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,16 @@ qx.Class.define("osparc.viewer.NodeViewer", {
__iFrameChanged: function() {
this._removeAll();

const iframeHandler = this.getNode().getIframeHandler();

const loadingPage = iframeHandler.getLoadingPage();
const iFrame = iframeHandler.getIFrame();
const src = iFrame.getSource();
const iFrameView = (src === null || src === "about:blank") ? loadingPage : iFrame;
this._add(iFrameView, {
flex: 1
});
if (this.getNode() && this.getNode().getIframeHandler()) {
const iframeHandler = this.getNode().getIframeHandler();
const loadingPage = iframeHandler.getLoadingPage();
const iFrame = iframeHandler.getIFrame();
const src = iFrame.getSource();
const iFrameView = (src === null || src === "about:blank") ? loadingPage : iFrame;
this._add(iFrameView, {
flex: 1
});
}
},

__attachSocketEventHandlers: function() {
Expand Down
14 changes: 13 additions & 1 deletion tests/e2e-playwright/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import os
import random
import re
import time
import urllib.parse
from collections.abc import Callable, Iterator
from contextlib import ExitStack
Expand Down Expand Up @@ -443,6 +444,7 @@ def _(
re.compile(r"/projects/[^:]+:open"), timeout=timeout + 5 * SECOND
) as response_info,
):
open_with_resources_clicked = False
# Project detail view pop-ups shows
if press_open:
open_button = page.get_by_test_id("openResource")
Expand All @@ -451,11 +453,13 @@ def _(
open_button.click()
# Open project with default resources
open_button = page.get_by_test_id("openWithResources")
time.sleep(2) # wait until the study options are filled up
# it returns a Long Running Task
with page.expect_response(
re.compile(rf"/projects\?from_study\={template_id}")
) as lrt:
open_button.click()
open_with_resources_clicked = True
lrt_data = lrt.value.json()
lrt_data = lrt_data["data"]
with log_context(
Expand Down Expand Up @@ -495,7 +499,15 @@ def wait_for_done(response):
open_button.click()
if is_product_billable:
# Open project with default resources
page.get_by_test_id("openWithResources").click()
open_button = page.get_by_test_id("openWithResources")
time.sleep(2) # wait until the study options are filled up
open_button.click()
open_with_resources_clicked = True
if is_product_billable and not open_with_resources_clicked:
# Open project with default resources
open_button = page.get_by_test_id("openWithResources")
time.sleep(2) # wait until the study options are filled up
open_button.click()
project_data = response_info.value.json()
assert project_data
project_uuid = project_data["data"]["uuid"]
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/portal-files/VTK_file.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ async function runTutorial () {
await utils.takeScreenshot(page, screenshotPrefix + 'teapot');
}
catch(err) {
await tutorial.setTutorialFailed(true);
await tutorial.setTutorialFailed();
console.log('Tutorial error: ' + err);
}
finally {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/portal/2D_Plot.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async function runTutorial () {
await utils.takeScreenshot(page, screenshotPrefix + 'iFrame2');
}
catch(err) {
await tutorial.setTutorialFailed(true);
await tutorial.setTutorialFailed();
console.log('Tutorial error: ' + err);
}
finally {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/portal/3D_Anatomical.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function runTutorial () {
await tutorial.checkNodeOutputs(1, outFiles);
}
catch(err) {
await tutorial.setTutorialFailed(true);
await tutorial.setTutorialFailed();
console.log('Tutorial error: ' + err);
}
finally {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/portal/3D_EM.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function runTutorial () {
await tutorial.checkNodeOutputs(2, outFiles);
}
catch(err) {
await tutorial.setTutorialFailed(true);
await tutorial.setTutorialFailed();
console.log('Tutorial error: ' + err);
}
finally {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/portal/BIOS_VNS_Calibrator.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async function runTutorial () {
await tutorial.restoreIFrame();
}
catch(err) {
await tutorial.setTutorialFailed(true);
await tutorial.setTutorialFailed();
console.log('Tutorial error: ' + err);
}
finally {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/portal/Bornstein.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async function runTutorial () {
await tutorial.checkNodeOutputs(0, outFiles);
}
catch(err) {
await tutorial.setTutorialFailed(true);
await tutorial.setTutorialFailed();
console.log('Tutorial error: ' + err);
}
finally {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/portal/CC_Human.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async function runTutorial () {
await tutorial.checkNodeOutputs(3, outFiles2);
}
catch(err) {
await tutorial.setTutorialFailed(true);
await tutorial.setTutorialFailed();
console.log('Tutorial error: ' + err);
}
finally {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/portal/CC_Rabbit.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async function runTutorial () {
await tutorial.checkNodeOutputs(3, outFiles2);
}
catch(err) {
await tutorial.setTutorialFailed(true);
await tutorial.setTutorialFailed();
console.log('Tutorial error: ' + err);
}
finally {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/portal/Kember.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async function runTutorial () {
await tutorial.takeScreenshot("viewer_after");
}
catch(err) {
await tutorial.setTutorialFailed(true);
await tutorial.setTutorialFailed();
console.log('Tutorial error: ' + err);
}
finally {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/portal/Mattward.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async function runTutorial () {
await tutorial.checkNodeOutputs(0, outFiles);
}
catch(err) {
await tutorial.setTutorialFailed(true);
await tutorial.setTutorialFailed();
console.log('Tutorial error: ' + err);
}
finally {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/portal/opencor.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function runTutorial () {
await tutorial.checkNodeOutputs(0, outFiles);
}
catch(err) {
await tutorial.setTutorialFailed(true);
await tutorial.setTutorialFailed();
console.log('Tutorial error: ' + err);
}
finally {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/publications/SarValidation.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async function runTutorial () {
await tutorial.testSARValidation(sarNodeId);
}
catch(err) {
await tutorial.setTutorialFailed(true, false);
await tutorial.setTutorialFailed();
console.log('Tutorial error: ' + err);
}
finally {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/publications/Voila.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async function runTutorial () {
await tutorial.waitForVoilaRendered(iframe);
}
catch(err) {
await tutorial.setTutorialFailed(true, false);
await tutorial.setTutorialFailed();
console.log('Tutorial error: ' + err);
}
finally {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/s4l/sim4life-dipole.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async function runTutorial() {
await tutorial.testS4LDipole(s4lNodeId);
}
catch (err) {
tutorial.setTutorialFailed(true, false);
tutorial.setTutorialFailed(err);
console.log('Tutorial error: ' + err);
throw "Tutorial Failed";
}
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/s4l/sim4life-lite.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async function runTutorial(user, pass, newUser, parallelUserIdx) {
await tutorial.testS4L(s4lNodeId);
}
catch (err) {
await tutorial.setTutorialFailed(true);
await tutorial.setTutorialFailed();
console.log('Tutorial error: ' + err);
throw "Tutorial Failed";
}
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/s4l/sim4life.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async function runTutorial() {
await tutorial.testS4L(s4lNodeId);
}
catch (err) {
await tutorial.setTutorialFailed(true);
await tutorial.setTutorialFailed();
console.log('Tutorial error: ' + err);
}
finally {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/tutorials/isolve-gpu.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function runTutorial() {
await tutorial.checkNodeLogsFunctional();
}
catch(err) {
await tutorial.setTutorialFailed(true);
await tutorial.setTutorialFailed();
console.log('Tutorial error: ' + err);
}
finally {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/tutorials/isolve-mpi.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async function runTutorial() {
await tutorial.checkNodeLogsFunctional();
}
catch (err) {
await tutorial.setTutorialFailed(true, err);
await tutorial.setTutorialFailed(err);
console.log('Tutorial error: ' + err);
}
finally {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/tutorials/jupyterlabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async function runTutorial() {
}
}
catch (err) {
await tutorial.setTutorialFailed(true);
await tutorial.setTutorialFailed();
console.log('Tutorial error: ' + err);
}
finally {
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/tutorials/rclone_large.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ async function runTutorial() {

await tutorial.takeScreenshot("after_run_all_menu");


await tutorial.waitFor(60000); // we are creating 12 x 1 GB files with 75 % probability
}
}
catch (err) {
await tutorial.setTutorialFailed(true);
await tutorial.setTutorialFailed();
console.log('Tutorial error: ' + err);
}
finally {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/tutorials/rclone_small.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async function runTutorial() {
}
}
catch (err) {
await tutorial.setTutorialFailed(true);
await tutorial.setTutorialFailed();
console.log('Tutorial error: ' + err);
}
finally {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/tutorials/sleepers.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function runTutorial() {
await tutorial.checkNodeLogsFunctional();
}
catch(err) {
await tutorial.setTutorialFailed(true);
await tutorial.setTutorialFailed();
console.log('Tutorial error: ' + err);
}
finally {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/tutorials/ti-plan.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ async function runTutorial() {
.then(() => page.click(id))
.catch(() => console.log("Preparing Inputs window not found"));

tutorial.setTutorialFailed(true, false);
tutorial.setTutorialFailed(err);
console.log('Tutorial error: ' + err);
throw "Tutorial Failed";
}
Expand Down
13 changes: 2 additions & 11 deletions tests/e2e/tutorials/tutorialBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,12 +414,6 @@ class TutorialBase {
await auto.showLogger(this.__page, show);
}

async takeLoggerScreenshot() {
await this.takeScreenshot("logger_before");
await this.showLogger(true);
await this.takeScreenshot("logger_after");
}

async runPipeline() {
await this.takeScreenshot("runStudy_before");
await auto.runStudy(this.__page);
Expand Down Expand Up @@ -835,11 +829,8 @@ class TutorialBase {
return this.__reasonFailed;
}

async setTutorialFailed(failed, loggerScreenshot = true, reason = "") {
if (failed && loggerScreenshot) {
await this.takeLoggerScreenshot();
}
this.__failed = failed;
async setTutorialFailed(reason = "") {
this.__failed = true;
this.__reasonFailed = reason
}
}
Expand Down
Loading