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:
authorsgiehl <stefan@matomo.org>2020-04-20 18:26:00 +0300
committersgiehl <stefan@matomo.org>2020-04-20 18:26:00 +0300
commit51671aff44f2ec35174f2a64a7dbd66147799ee8 (patch)
tree038d3093687ec510998242e5727ebd8405257f15
parent4469a9adad4953298afefb65d6e831e826f42132 (diff)
fix metric tooltip ui test
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_metric_tooltip.png4
-rw-r--r--tests/UI/specs/UIIntegration_spec.js9
2 files changed, 8 insertions, 5 deletions
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_metric_tooltip.png b/tests/UI/expected-screenshots/UIIntegrationTest_metric_tooltip.png
index 716e918254..76163d8ebc 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_metric_tooltip.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_metric_tooltip.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:87a2486fc08fd803cbf9d27370b95dc768fa2e69fcca27d25799597f02e53e3c
-size 8451
+oid sha256:7446dc1f9fe69fde5206e0688fb166479987a281ab41848c8ce9280df296efda
+size 8449
diff --git a/tests/UI/specs/UIIntegration_spec.js b/tests/UI/specs/UIIntegration_spec.js
index 72cb206829..5e205a280c 100644
--- a/tests/UI/specs/UIIntegration_spec.js
+++ b/tests/UI/specs/UIIntegration_spec.js
@@ -378,15 +378,18 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
let elem = await page.jQuery('[data-report="Referrers.getReferrerType"] #nb_visits .thDIV');
await elem.hover();
- await page.jQuery('.columnDocumentation:visible', { waitFor: true });
+ let tip = await page.jQuery('.columnDocumentation:visible', { waitFor: true });
+
+ // manipulate the styles a bit, as it's otherwise not visible on screenshot
await page.evaluate(function(){
$('.columnDocumentation:visible').css({
display: 'block!important',
+ top: 50,
+ left: 100
});
});
- await page.waitFor(500);
- expect(await page.screenshotSelector('.columnDocumentation:visible')).to.matchImage('metric_tooltip');
+ expect(await tip.screenshot()).to.matchImage('metric_tooltip');
});
it('should load the referrers > search engines & keywords page correctly', async function () {