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 } }