Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <diosmosis@users.noreply.github.com>2019-05-17 00:20:29 +0300
committerGitHub <noreply@github.com>2019-05-17 00:20:29 +0300
commit56113989c01e26b3bf4c90d132aa40ff2601da31 (patch)
tree4c061b6556677f565c5485359619efe48cb065a1
parent03ca65180e488847c3faec1167b1c82ac7cc9722 (diff)
Fix realtime map ui test (#14453)3.10.0-b2
* Make sure tooltip shows up in map. * debug travis * another test * another test * another test * another test * another test * updating screenshot * Update screenshot.
-rw-r--r--plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step2.png4
-rw-r--r--plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step3.png4
-rw-r--r--plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step4.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_visitors_realtime_map.png4
-rw-r--r--tests/UI/specs/UIIntegration_spec.js17
-rw-r--r--tests/lib/screenshot-testing/support/app.js5
6 files changed, 17 insertions, 21 deletions
diff --git a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step2.png b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step2.png
index 80b1b5f669..1ee4db2cf5 100644
--- a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step2.png
+++ b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step2.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:38ff826e3a31aac524bd5199bc5559f2b464a3b613f070ba4fc7c6365fcd6d4e
-size 146470
+oid sha256:d4d30ce41d0678ee044c43da6b19196f9572071299b1bdb3e038cbfdb88d2220
+size 125936
diff --git a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step3.png b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step3.png
index 218fbe102f..25e9db400a 100644
--- a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step3.png
+++ b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step3.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:0cacd1a674acb3d025a6967f2476b55847af196c62273a06e9a5f3aa77c74fe9
-size 185441
+oid sha256:af488689d018a75711147fe4dcf97abb63c448d61c3b8dbc32e2545533c54b8a
+size 164435
diff --git a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step4.png b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step4.png
index 07e63fa139..b7b036caf4 100644
--- a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step4.png
+++ b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step4.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:db93961069bfc3e3fb3f2fb7204921eb835545c2ce7535b068f5502474822591
-size 93376
+oid sha256:406db65e1a97717babe5b8d5a8a9cae79318ef27b70677f635f7b6b84bd87b24
+size 136725
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_visitors_realtime_map.png b/tests/UI/expected-screenshots/UIIntegrationTest_visitors_realtime_map.png
index f1fe6a03a3..68a0edfbe3 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_visitors_realtime_map.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_visitors_realtime_map.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:0eb2886f4fdc10f17284148a95408286c3646789e2e538c9410b09346ce7f416
-size 104966
+oid sha256:5473e2d4383328daf7ead131a9c31c016256af6f3146c73321cf4731666e7be4
+size 116983
diff --git a/tests/UI/specs/UIIntegration_spec.js b/tests/UI/specs/UIIntegration_spec.js
index ebc9c8ed1f..9fa5ab5026 100644
--- a/tests/UI/specs/UIIntegration_spec.js
+++ b/tests/UI/specs/UIIntegration_spec.js
@@ -218,26 +218,19 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
+ "&removeOldVisits=0");
await page.waitForSelector('circle');
- var pos = await page.webpage.evaluate(() => {
- var circle = $('circle:first').offset();
- return {
- x: circle.left + 5,
- y: circle.top + 5
- };
- });
- console.log(pos.x, pos.y);
- await page.mouse.move(pos.x, pos.y);
- await page.waitFor(100); // wait for tooltip
+ await page.waitFor(250); // rendering
+ await (await page.jQuery('circle:eq(0)')).hover();
+ await page.waitFor('.ui-tooltip', { visible: true }); // wait for tooltip
await page.evaluate(function(){
$('.ui-tooltip:visible .rel-time').data('actiontime', Math.floor(new Date((new Date()).getTime()-(4*3600*24000))/1000));
});
- pageWrap = await page.$('.pageWrap,.ui-tooltip');
- expect(await pageWrap.screenshot()).to.matchImage('visitors_realtime_map');
+ expect(await page.screenshotSelector('.pageWrap,.ui-tooltip')).to.matchImage('visitors_realtime_map');
});
it('should load the visitors > real-time visits page correctly', async function () {
await page.goto("?" + urlBase + "#?" + idSite2Params + "&category=General_Visitors&subcategory=General_RealTime");
+ await page.mouse.move(-10, -10);
pageWrap = await page.$('.pageWrap');
expect(await pageWrap.screenshot()).to.matchImage('visitors_realtime_visits');
diff --git a/tests/lib/screenshot-testing/support/app.js b/tests/lib/screenshot-testing/support/app.js
index 0aff28d6dc..1290ac4b81 100644
--- a/tests/lib/screenshot-testing/support/app.js
+++ b/tests/lib/screenshot-testing/support/app.js
@@ -236,7 +236,10 @@ Application.prototype.loadTestModules = function () {
message += "\n" + indent + indent + "Url to reproduce: " + url + "\n";
if (message.indexOf('Generated screenshot') === -1) {
- const failurePath = path.join(PIWIK_INCLUDE_PATH, 'tests/UI/processed-ui-screenshots', test.title.replace(/\s+/g, '_') + '_failure.png');
+ if (!fs.existsSync(path.join(PIWIK_INCLUDE_PATH, 'tests/UI/processed-ui-screenshots'))) {
+ fsExtra.mkdirsSync(path.join(PIWIK_INCLUDE_PATH, 'tests/UI/processed-ui-screenshots'));
+ }
+ const failurePath = path.join(PIWIK_INCLUDE_PATH, 'tests/UI/processed-ui-screenshots', test.title.replace(/(\s|[^a-zA-Z0-9_])+/g, '_') + '_failure.png');
message += indent + indent + "Screenshot of failure: " + failurePath + "\n";