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:
Diffstat (limited to 'tests/UI/specs/Overlay_spec.js')
-rw-r--r--tests/UI/specs/Overlay_spec.js17
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/UI/specs/Overlay_spec.js b/tests/UI/specs/Overlay_spec.js
index 2a63870081..d4117627e3 100644
--- a/tests/UI/specs/Overlay_spec.js
+++ b/tests/UI/specs/Overlay_spec.js
@@ -12,6 +12,7 @@ describe("Overlay", function () {
this.timeout(0);
var url = null;
+ var urlWithSegment;
function removeOptOutIframe(page) {
page.evaluate(function () {
@@ -20,8 +21,12 @@ describe("Overlay", function () {
}
before(function (done) {
- url = "?module=Overlay&period=year&date=today&idSite=3#l=" + encodeURIComponent(testEnvironment.overlayUrl).replace(/[%]/g, "$");
-
+ var baseUrl = '?module=Overlay&period=year&date=today&idSite=3';
+ var hash = '#l=' + encodeURIComponent(testEnvironment.overlayUrl).replace(/[%]/g, "$");
+
+ url = baseUrl + hash;
+ urlWithSegment = baseUrl + '&segment=' + encodeURIComponent('visitIp==20.56.34.67') + hash;
+
testEnvironment.callApi("SitesManager.addSiteAliasUrls", {idSite: 3, urls: [config.piwikUrl]}, done);
});
@@ -122,4 +127,12 @@ describe("Overlay", function () {
removeOptOutIframe(page);
}, done);
});
+
+ it("should load an overlay with segment", function (done) {
+ expect.screenshot("loaded_with_segment").to.be.capture(function (page) {
+ page.load(urlWithSegment);
+
+ removeOptOutIframe(page);
+ }, done);
+ });
}); \ No newline at end of file