diff options
Diffstat (limited to 'plugins/Dashboard/tests/UI/Dashboard_spec.js')
-rw-r--r-- | plugins/Dashboard/tests/UI/Dashboard_spec.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/Dashboard/tests/UI/Dashboard_spec.js b/plugins/Dashboard/tests/UI/Dashboard_spec.js index 03c5b8bccc..7d7e36d0f4 100644 --- a/plugins/Dashboard/tests/UI/Dashboard_spec.js +++ b/plugins/Dashboard/tests/UI/Dashboard_spec.js @@ -74,7 +74,7 @@ describe("Dashboard", function () { await col2.hover(); await page.mouse.up(); await page.waitForNetworkIdle(); - await page.waitFor(100); + await page.waitForTimeout(100); await page.mouse.move(-10, -10); await page.waitForNetworkIdle(); @@ -173,7 +173,7 @@ describe("Dashboard", function () { await button.click(); await page.mouse.move(-10, -10); - await page.waitFor(250); + await page.waitForTimeout(250); expect(await page.screenshot({ fullPage: true })).to.matchImage('widget_move_removed'); }); @@ -185,7 +185,7 @@ describe("Dashboard", function () { var button = await page.jQuery('.modal.open .modal-footer a:contains(Save)'); await button.click(); await page.mouse.move(-10, -10); - await page.waitFor(500); // animation + await page.waitForTimeout(1500); // animation expect(await page.screenshot({ fullPage: true })).to.matchImage('change_layout'); }); @@ -194,7 +194,7 @@ describe("Dashboard", function () { await page.click('.dashboard-manager .title'); await page.click('li[data-action="renameDashboard"]'); await page.evaluate(() => $('#newDashboardName').val('newname')); - await page.waitFor(250); + await page.waitForTimeout(250); var button = await page.jQuery('.modal.open .modal-footer a:contains(Save)'); await button.click(); await page.mouse.move(-10, -10); @@ -206,7 +206,7 @@ describe("Dashboard", function () { it("should copy dashboard successfully when copy dashboard process completed", async function() { await page.click('.dashboard-manager .title'); await page.click('li[data-action="copyDashboardToUser"]'); - await page.waitFor(100); // wait for animation + await page.waitForTimeout(100); // wait for animation await page.evaluate(function () { $('#copyDashboardName').val(''); }); @@ -243,7 +243,7 @@ describe("Dashboard", function () { var button = await page.jQuery('.modal.open .modal-footer a:contains(Yes)'); await button.click(); await page.mouse.move(-10, -10); - await page.waitFor(200); + await page.waitForTimeout(200); await page.waitForNetworkIdle(); expect(await page.screenshot({ fullPage: true })).to.matchImage('removed'); @@ -255,7 +255,7 @@ describe("Dashboard", function () { await page.click('li[data-action="setAsDefaultWidgets"]'); var button = await page.jQuery('.modal.open .modal-footer a:contains(Yes)'); await button.click(); - await page.waitFor(200); + await page.waitForTimeout(200); await page.waitForNetworkIdle(); expect(await page.screenshot({ fullPage: true })).to.matchImage('default_widget_selection_changed'); @@ -264,7 +264,7 @@ describe("Dashboard", function () { it("should create new dashboard with new default widget selection when create dashboard process completed", async function() { await page.click('.dashboard-manager .title'); await page.click('li[data-action="createDashboard"]'); - await page.waitFor('#createDashboardName', { visible: true }); + await page.waitForSelector('#createDashboardName', { visible: true }); // try to type the text a few times, as it sometimes doesn't get the full value var name = 'newdash2'; @@ -273,7 +273,7 @@ describe("Dashboard", function () { $('#createDashboardName').val(''); }); await page.type('#createDashboardName', name); - await page.waitFor(500); // sometimes the text doesn't seem to type fast enough + await page.waitForTimeout(500); // sometimes the text doesn't seem to type fast enough var value = await page.evaluate(function() { return $('#createDashboardName').attr('value'); |