Skip to content

Commit caceeed

Browse files
committed
page.waitFor is deprecated
1 parent f1abbbd commit caceeed

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

tests/e2e/tutorials/tutorialBase.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class TutorialBase {
179179
console.error(`"${this.__templateName}" template could not be started:\n`, err);
180180
throw (err);
181181
}
182-
await this.__page.waitFor(waitFor);
182+
await this.__page.waitForTimeout(waitFor);
183183
await this.takeScreenshot("dashboardOpenFirstTemplate_after");
184184
return resp;
185185
}
@@ -197,7 +197,7 @@ class TutorialBase {
197197
console.error(`"${this.__templateName}" service could not be started:\n`, err);
198198
throw (err);
199199
}
200-
await this.__page.waitFor(waitFor);
200+
await this.__page.waitForTimeout(waitFor);
201201
await this.takeScreenshot("dashboardOpenFirstService_after");
202202
return resp;
203203
}
@@ -296,7 +296,7 @@ class TutorialBase {
296296

297297
async retrieve(waitAfterRetrieve = 5000) {
298298
await auto.clickRetrieve(this.__page);
299-
await this.__page.waitFor(waitAfterRetrieve);
299+
await this.__page.waitForTimeout(waitAfterRetrieve);
300300
}
301301

302302
async openNodeRetrieveAndRestart(nodePosInTree = 0) {
@@ -380,7 +380,7 @@ class TutorialBase {
380380
}
381381

382382
async waitFor(waitFor) {
383-
await this.__page.waitFor(waitFor);
383+
await this.__page.waitForTimeout(waitFor);
384384
}
385385

386386
async takeScreenshot(screenshotTitle) {

tests/e2e/utils/auto.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ async function checkDataProducedByNode(page, nFiles = 1) {
314314
let children = [];
315315
const minTime = 1000; // wait a bit longer for fetching the files
316316
for (let i = 0; i < tries && children.length === 0; i++) {
317-
await page.waitFor(minTime * (i + 1));
317+
await page.waitForTimeout(minTime * (i + 1));
318318
await page.waitForSelector('[osparc-test-id="fileTreeItem_NodeFiles"]');
319319
children = await utils.getFileTreeItemIDs(page, "NodeFiles");
320320
console.log(i + 1, 'try: ', children);

0 commit comments

Comments
 (0)