From 9697bbb5a883bf50838023e7eb3970d32016c37c Mon Sep 17 00:00:00 2001 From: Peter Zhang Date: Thu, 9 Jun 2022 12:58:24 +1200 Subject: [CSS] add scroll to live visits table (#19273) * add scroll to live table add scroll to live table * add tests add tests * update tests update tests * update tests update tests * Update Dashboard_spec.js show full image * update tests update tests * add timeout and screenshots add timeout and screenshots * update scroll bar update scroll bar * update screenshot update screenshot * Rerun UI tests * Increase UI screenshot delay to fix random failure * update ui update ui Co-authored-by: sgiehl Co-authored-by: Ben --- plugins/Dashboard/tests/UI/DashboardManager_spec.js | 8 ++++++++ plugins/Dashboard/tests/UI/Dashboard_spec.js | 2 ++ .../UI/expected-screenshots/DashboardManager_small_screen.png | 3 +++ 3 files changed, 13 insertions(+) create mode 100644 plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_small_screen.png (limited to 'plugins/Dashboard') diff --git a/plugins/Dashboard/tests/UI/DashboardManager_spec.js b/plugins/Dashboard/tests/UI/DashboardManager_spec.js index fe6e1d7b13..157c6bac0d 100644 --- a/plugins/Dashboard/tests/UI/DashboardManager_spec.js +++ b/plugins/Dashboard/tests/UI/DashboardManager_spec.js @@ -99,6 +99,14 @@ describe("DashboardManager", function () { expect(await page.screenshot({ fullPage: true })).to.matchImage('create_new'); }); + + it("should load widgets on smaller screen", async function(){ + await page.webpage.setViewport({ width: 815, height: 512 }); + await page.waitForTimeout(500); + expect(await page.screenshot({ fullPage: true })).to.matchImage('small_screen'); + }); + + it("should remove dashboard when remove dashboard process completed", async function() { await page.click('.dashboard-manager .title'); await page.click('li[data-action="removeDashboard"]'); diff --git a/plugins/Dashboard/tests/UI/Dashboard_spec.js b/plugins/Dashboard/tests/UI/Dashboard_spec.js index 2140504911..a4b27f95e0 100644 --- a/plugins/Dashboard/tests/UI/Dashboard_spec.js +++ b/plugins/Dashboard/tests/UI/Dashboard_spec.js @@ -299,6 +299,7 @@ describe("Dashboard", function () { expect(await page.screenshot({ fullPage: true })).to.matchImage('create_new'); }); + it("should load segmented dashboard", async function() { await removeAllExtraDashboards(); await page.goto(url + '&segment=' + encodeURIComponent("browserCode==FF")); @@ -326,4 +327,5 @@ describe("Dashboard", function () { expect(await page.screenshot({ fullPage: true })).to.matchImage('invalid_token_auth'); }); + }); diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_small_screen.png b/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_small_screen.png new file mode 100644 index 0000000000..31f26f3197 --- /dev/null +++ b/plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_small_screen.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8200a233b30a708b15d95ad1266d3b02b8571858c4056f809a183cbd15b2ce6 +size 240977 -- cgit v1.2.3