diff --git a/services/static-webserver/client/source/class/osparc/dashboard/ResourceBrowserBase.js b/services/static-webserver/client/source/class/osparc/dashboard/ResourceBrowserBase.js index 344507aad9a..ca565c756f3 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/ResourceBrowserBase.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/ResourceBrowserBase.js @@ -195,7 +195,6 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", { __centerLayout: null, _resourceType: null, _resourcesList: null, - _topBar: null, _toolbar: null, _searchBarFilter: null, __viewModeLayout: null, diff --git a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js index a2de2032524..0c8e3701ec8 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js @@ -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") { diff --git a/services/static-webserver/client/source/class/osparc/desktop/WorkbenchView.js b/services/static-webserver/client/source/class/osparc/desktop/WorkbenchView.js index accb850ab5d..d6df7d06b28 100644 --- a/services/static-webserver/client/source/class/osparc/desktop/WorkbenchView.js +++ b/services/static-webserver/client/source/class/osparc/desktop/WorkbenchView.js @@ -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) { diff --git a/services/static-webserver/client/source/class/osparc/node/slideshow/NodeView.js b/services/static-webserver/client/source/class/osparc/node/slideshow/NodeView.js index af05dbb0e90..ce84b75556d 100644 --- a/services/static-webserver/client/source/class/osparc/node/slideshow/NodeView.js +++ b/services/static-webserver/client/source/class/osparc/node/slideshow/NodeView.js @@ -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 + }); + } } } }); diff --git a/services/static-webserver/client/source/class/osparc/viewer/NodeViewer.js b/services/static-webserver/client/source/class/osparc/viewer/NodeViewer.js index 96c96f57e6d..2596b4b1dbc 100644 --- a/services/static-webserver/client/source/class/osparc/viewer/NodeViewer.js +++ b/services/static-webserver/client/source/class/osparc/viewer/NodeViewer.js @@ -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() { diff --git a/tests/e2e-playwright/tests/conftest.py b/tests/e2e-playwright/tests/conftest.py index a8a1f8d979d..6fd15e8218c 100644 --- a/tests/e2e-playwright/tests/conftest.py +++ b/tests/e2e-playwright/tests/conftest.py @@ -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 @@ -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") @@ -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( @@ -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"] diff --git a/tests/e2e/portal-files/VTK_file.js b/tests/e2e/portal-files/VTK_file.js index 081c5fcdc56..77a293052d7 100644 --- a/tests/e2e/portal-files/VTK_file.js +++ b/tests/e2e/portal-files/VTK_file.js @@ -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 { diff --git a/tests/e2e/portal/2D_Plot.js b/tests/e2e/portal/2D_Plot.js index 5a41e3d4eb1..f7b311344e7 100644 --- a/tests/e2e/portal/2D_Plot.js +++ b/tests/e2e/portal/2D_Plot.js @@ -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 { diff --git a/tests/e2e/portal/3D_Anatomical.js b/tests/e2e/portal/3D_Anatomical.js index e13f76c36fb..d2f933bf912 100644 --- a/tests/e2e/portal/3D_Anatomical.js +++ b/tests/e2e/portal/3D_Anatomical.js @@ -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 { diff --git a/tests/e2e/portal/3D_EM.js b/tests/e2e/portal/3D_EM.js index 1b2449256c4..0934baf3001 100644 --- a/tests/e2e/portal/3D_EM.js +++ b/tests/e2e/portal/3D_EM.js @@ -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 { diff --git a/tests/e2e/portal/BIOS_VNS_Calibrator.js b/tests/e2e/portal/BIOS_VNS_Calibrator.js index 440444b17f9..e6959fedc85 100644 --- a/tests/e2e/portal/BIOS_VNS_Calibrator.js +++ b/tests/e2e/portal/BIOS_VNS_Calibrator.js @@ -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 { diff --git a/tests/e2e/portal/Bornstein.js b/tests/e2e/portal/Bornstein.js index 27358911baa..fa823b0382e 100644 --- a/tests/e2e/portal/Bornstein.js +++ b/tests/e2e/portal/Bornstein.js @@ -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 { diff --git a/tests/e2e/portal/CC_Human.js b/tests/e2e/portal/CC_Human.js index ce102e74596..b02ff7bfbe0 100644 --- a/tests/e2e/portal/CC_Human.js +++ b/tests/e2e/portal/CC_Human.js @@ -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 { diff --git a/tests/e2e/portal/CC_Rabbit.js b/tests/e2e/portal/CC_Rabbit.js index 44b6e137a63..94b122e44b8 100644 --- a/tests/e2e/portal/CC_Rabbit.js +++ b/tests/e2e/portal/CC_Rabbit.js @@ -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 { diff --git a/tests/e2e/portal/Kember.js b/tests/e2e/portal/Kember.js index dade7ecac5c..b77cc181073 100644 --- a/tests/e2e/portal/Kember.js +++ b/tests/e2e/portal/Kember.js @@ -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 { diff --git a/tests/e2e/portal/Mattward.js b/tests/e2e/portal/Mattward.js index b09c09db092..c6cde9101dc 100644 --- a/tests/e2e/portal/Mattward.js +++ b/tests/e2e/portal/Mattward.js @@ -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 { diff --git a/tests/e2e/portal/opencor.js b/tests/e2e/portal/opencor.js index 46ca143a48f..0d95104fe6e 100644 --- a/tests/e2e/portal/opencor.js +++ b/tests/e2e/portal/opencor.js @@ -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 { diff --git a/tests/e2e/publications/SarValidation.js b/tests/e2e/publications/SarValidation.js index 3c5c4eba4b0..2ea10b448fa 100644 --- a/tests/e2e/publications/SarValidation.js +++ b/tests/e2e/publications/SarValidation.js @@ -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 { diff --git a/tests/e2e/publications/Voila.js b/tests/e2e/publications/Voila.js index 85cb9bfea7a..c59fd305755 100644 --- a/tests/e2e/publications/Voila.js +++ b/tests/e2e/publications/Voila.js @@ -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 { diff --git a/tests/e2e/s4l/sim4life-dipole.js b/tests/e2e/s4l/sim4life-dipole.js index ff9d17bb66c..40f0e08a7da 100644 --- a/tests/e2e/s4l/sim4life-dipole.js +++ b/tests/e2e/s4l/sim4life-dipole.js @@ -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"; } diff --git a/tests/e2e/s4l/sim4life-lite.js b/tests/e2e/s4l/sim4life-lite.js index 1746ef2356c..4ac3ed41d80 100644 --- a/tests/e2e/s4l/sim4life-lite.js +++ b/tests/e2e/s4l/sim4life-lite.js @@ -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"; } diff --git a/tests/e2e/s4l/sim4life.js b/tests/e2e/s4l/sim4life.js index 1313453a78f..3580b6731d5 100644 --- a/tests/e2e/s4l/sim4life.js +++ b/tests/e2e/s4l/sim4life.js @@ -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 { diff --git a/tests/e2e/tutorials/isolve-gpu.js b/tests/e2e/tutorials/isolve-gpu.js index bd5e562552c..4e163046154 100644 --- a/tests/e2e/tutorials/isolve-gpu.js +++ b/tests/e2e/tutorials/isolve-gpu.js @@ -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 { diff --git a/tests/e2e/tutorials/isolve-mpi.js b/tests/e2e/tutorials/isolve-mpi.js index 24229990048..809cbfcda94 100644 --- a/tests/e2e/tutorials/isolve-mpi.js +++ b/tests/e2e/tutorials/isolve-mpi.js @@ -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 { diff --git a/tests/e2e/tutorials/jupyterlabs.js b/tests/e2e/tutorials/jupyterlabs.js index 6d8ee355b9c..90929bae7b2 100644 --- a/tests/e2e/tutorials/jupyterlabs.js +++ b/tests/e2e/tutorials/jupyterlabs.js @@ -78,7 +78,7 @@ async function runTutorial() { } } catch (err) { - await tutorial.setTutorialFailed(true); + await tutorial.setTutorialFailed(); console.log('Tutorial error: ' + err); } finally { diff --git a/tests/e2e/tutorials/rclone_large.js b/tests/e2e/tutorials/rclone_large.js index 0f53aa9a77d..12d7f859a50 100644 --- a/tests/e2e/tutorials/rclone_large.js +++ b/tests/e2e/tutorials/rclone_large.js @@ -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 { diff --git a/tests/e2e/tutorials/rclone_small.js b/tests/e2e/tutorials/rclone_small.js index 2253c24a925..f8a3cbe443a 100644 --- a/tests/e2e/tutorials/rclone_small.js +++ b/tests/e2e/tutorials/rclone_small.js @@ -68,7 +68,7 @@ async function runTutorial() { } } catch (err) { - await tutorial.setTutorialFailed(true); + await tutorial.setTutorialFailed(); console.log('Tutorial error: ' + err); } finally { diff --git a/tests/e2e/tutorials/sleepers.js b/tests/e2e/tutorials/sleepers.js index 5db94b03b5a..2034a6e6f9a 100644 --- a/tests/e2e/tutorials/sleepers.js +++ b/tests/e2e/tutorials/sleepers.js @@ -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 { diff --git a/tests/e2e/tutorials/ti-plan.js b/tests/e2e/tutorials/ti-plan.js index d4b18a48ee8..638d0d72a9b 100644 --- a/tests/e2e/tutorials/ti-plan.js +++ b/tests/e2e/tutorials/ti-plan.js @@ -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"; } diff --git a/tests/e2e/tutorials/tutorialBase.js b/tests/e2e/tutorials/tutorialBase.js index f258629a122..0d649cb384d 100644 --- a/tests/e2e/tutorials/tutorialBase.js +++ b/tests/e2e/tutorials/tutorialBase.js @@ -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); @@ -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 } }