Skip to content

Commit 0112b1d

Browse files
authored
screenshots every 2 seconds for p2e (#1839)
1 parent 38a204b commit 0112b1d

File tree

12 files changed

+29
-9
lines changed

12 files changed

+29
-9
lines changed

tests/e2e/portal/2D_Plot.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ const screenshotPrefix = "2DPlot_";
1717
async function runTutorial () {
1818
const tutorial = new tutorialBase.TutorialBase(anonURL);
1919

20-
utils.createScreenshotsDir();
20+
tutorial.initScreenshoter();
21+
2122
const page = await tutorial.beforeScript();
2223
const studyData = await tutorial.openStudyLink();
2324

@@ -53,6 +54,7 @@ async function runTutorial () {
5354
await utils.takeScreenshot(page, screenshotPrefix + 'iFrame2');
5455

5556
await tutorial.logOut();
57+
tutorial.stopScreenshoter();
5658
await tutorial.close();
5759
}
5860

tests/e2e/portal/3D_Anatomical.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const screenshotPrefix = "3DAnatomical_";
1616
async function runTutorial () {
1717
const tutorial = new tutorialBase.TutorialBase(anonURL);
1818

19-
utils.createScreenshotsDir();
19+
tutorial.initScreenshoter();
2020
const page = await tutorial.beforeScript();
2121
const studyData = await tutorial.openStudyLink();
2222

@@ -32,7 +32,9 @@ async function runTutorial () {
3232
"data.zip"
3333
];
3434
await tutorial.checkResults(outFiles.length);
35+
3536
await tutorial.logOut();
37+
tutorial.stopScreenshoter();
3638
await tutorial.close();
3739
}
3840

tests/e2e/portal/3D_EM.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const screenshotPrefix = "3DEM_";
1616
async function runTutorial () {
1717
const tutorial = new tutorialBase.TutorialBase(anonURL);
1818

19-
utils.createScreenshotsDir();
19+
tutorial.initScreenshoter();
2020
const page = await tutorial.beforeScript();
2121
const studyData = await tutorial.openStudyLink();
2222

@@ -32,7 +32,9 @@ async function runTutorial () {
3232
"data.zip"
3333
];
3434
await tutorial.checkResults(outFiles.length);
35+
3536
await tutorial.logOut();
37+
tutorial.stopScreenshoter();
3638
await tutorial.close();
3739
}
3840

tests/e2e/portal/Bornstein.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const screenshotPrefix = "Bornstein_";
1616
async function runTutorial () {
1717
const tutorial = new tutorialBase.TutorialBase(anonURL);
1818

19-
utils.createScreenshotsDir();
19+
tutorial.initScreenshoter();
2020
const page = await tutorial.beforeScript();
2121
const studyData = await tutorial.openStudyLink();
2222

@@ -36,7 +36,9 @@ async function runTutorial () {
3636
"traces.pkl"
3737
];
3838
await tutorial.checkResults(outFiles.length);
39+
3940
await tutorial.logOut();
41+
tutorial.stopScreenshoter();
4042
await tutorial.close();
4143
}
4244

tests/e2e/portal/CC_Human.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const screenshotPrefix = "CCHuman_";
1616
async function runTutorial () {
1717
const tutorial = new tutorialBase.TutorialBase(anonURL);
1818

19-
utils.createScreenshotsDir();
19+
tutorial.initScreenshoter();
2020
const page = await tutorial.beforeScript();
2121
await tutorial.goTo();
2222

@@ -55,7 +55,9 @@ async function runTutorial () {
5555
await tutorial.checkResults(outFiles2.length);
5656

5757
// await tutorial.openNodeRetrieveAndRestart(4);
58+
5859
await tutorial.logOut();
60+
tutorial.stopScreenshoter();
5961
await tutorial.close();
6062
}
6163

tests/e2e/portal/CC_Rabbit.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const screenshotPrefix = "CCRabbit_";
1616
async function runTutorial () {
1717
const tutorial = new tutorialBase.TutorialBase(anonURL);
1818

19-
utils.createScreenshotsDir();
19+
tutorial.initScreenshoter();
2020
const page = await tutorial.beforeScript();
2121
await tutorial.goTo();
2222

@@ -53,7 +53,9 @@ async function runTutorial () {
5353
await tutorial.checkResults(outFiles2.length);
5454

5555
// await tutorial.openNodeRetrieveAndRestart(4);
56+
5657
await tutorial.logOut();
58+
tutorial.stopScreenshoter();
5759
await tutorial.close();
5860
}
5961

tests/e2e/portal/Mattward.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const screenshotPrefix = "Mattward_";
1616
async function runTutorial () {
1717
const tutorial = new tutorialBase.TutorialBase(anonURL);
1818

19-
utils.createScreenshotsDir();
19+
tutorial.initScreenshoter();
2020
const page = await tutorial.beforeScript();
2121
const studyData = await tutorial.openStudyLink();
2222

@@ -43,6 +43,7 @@ async function runTutorial () {
4343
await tutorial.checkResults(outFiles.length);
4444

4545
await tutorial.logOut();
46+
tutorial.stopScreenshoter();
4647
await tutorial.close();
4748
}
4849

tests/e2e/portal/opencor.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const screenshotPrefix = "Opencor_";
1616
async function runTutorial () {
1717
const tutorial = new tutorialBase.TutorialBase(anonURL);
1818

19-
utils.createScreenshotsDir();
19+
tutorial.initScreenshoter();
2020
const page = await tutorial.beforeScript();
2121
await tutorial.goTo();
2222

@@ -36,6 +36,7 @@ async function runTutorial () {
3636
await tutorial.checkResults(outFiles.length);
3737

3838
await tutorial.logOut();
39+
tutorial.stopScreenshoter();
3940
await tutorial.close();
4041
}
4142

tests/e2e/tutorials/jupyters.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ async function runTutorial() {
110110
}
111111
finally {
112112
await tutorial.logOut();
113+
tutorial.stopScreenshoter();
113114
await tutorial.close();
114115
}
115116
}

tests/e2e/tutorials/mattward.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ async function runTutorial() {
5050
}
5151
finally {
5252
await tutorial.logOut();
53+
tutorial.stopScreenshoter();
5354
await tutorial.close();
5455
}
5556
}

0 commit comments

Comments
 (0)