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>2020-02-21 06:22:56 +0300
committerGitHub <noreply@github.com>2020-02-21 06:22:56 +0300
commita3ccdede6f6d6fed000a6de92a7284ba38e14b7f (patch)
treedd5787269353fdb6cfba22d9fa5b09bd05084da3 /tests/resources/overlay-test-site
parent150e6667e49469f77c73e4c9191963f719c93b6c (diff)
Add UI test for JavaScript tracking. (#15567)
* Add UI test for JavaScript tracking. * apply some review feedback * try to fix UI test on travis * Add missing screenshot. * Normalize JSTracker UI test result. * update screenshot
Diffstat (limited to 'tests/resources/overlay-test-site')
-rw-r--r--tests/resources/overlay-test-site/index.html6
-rw-r--r--tests/resources/overlay-test-site/page-1.html6
-rw-r--r--tests/resources/overlay-test-site/page-2.html6
-rw-r--r--tests/resources/overlay-test-site/page-3.html6
-rw-r--r--tests/resources/overlay-test-site/page-4.html6
-rw-r--r--tests/resources/overlay-test-site/page-5.html6
-rw-r--r--tests/resources/overlay-test-site/page-6.html6
7 files changed, 28 insertions, 14 deletions
diff --git a/tests/resources/overlay-test-site/index.html b/tests/resources/overlay-test-site/index.html
index 2b1f099263..d8151c2054 100644
--- a/tests/resources/overlay-test-site/index.html
+++ b/tests/resources/overlay-test-site/index.html
@@ -86,12 +86,14 @@
<script>
var pkBaseURL = (("https:" == document.location.protocol) ? "https://%trackerBaseUrl%" : "http://%trackerBaseUrl%");
try {
- var piwikTracker = Piwik.getTracker(pkBaseURL + "matomo.php", 3);
+ var piwikTracker = Piwik.addTracker(pkBaseURL + "matomo.php", %idSite%);
piwikTracker.setCookieDomain('*.piwik.org');
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
- } catch( err ) {}
+ } catch( err ) {
+ console.log(err.stack || err.message);
+ }
</script>
</body>
</html> \ No newline at end of file
diff --git a/tests/resources/overlay-test-site/page-1.html b/tests/resources/overlay-test-site/page-1.html
index 16330c63a8..70575666ae 100644
--- a/tests/resources/overlay-test-site/page-1.html
+++ b/tests/resources/overlay-test-site/page-1.html
@@ -83,12 +83,14 @@
<script>
var pkBaseURL = (("https:" == document.location.protocol) ? "https://%trackerBaseUrl%" : "http://%trackerBaseUrl%");
try {
- var piwikTracker = Piwik.getTracker(pkBaseURL + "matomo.php", 3);
+ var piwikTracker = Piwik.getTracker(pkBaseURL + "matomo.php", %idSite%);
piwikTracker.setCookieDomain('*.piwik.org');
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
- } catch( err ) {}
+ } catch( err ) {
+ console.log(err.stack || err.message);
+ }
</script>
</body>
</html> \ No newline at end of file
diff --git a/tests/resources/overlay-test-site/page-2.html b/tests/resources/overlay-test-site/page-2.html
index 43f08ee61f..cf83bdb641 100644
--- a/tests/resources/overlay-test-site/page-2.html
+++ b/tests/resources/overlay-test-site/page-2.html
@@ -83,12 +83,14 @@
<script>
var pkBaseURL = (("https:" == document.location.protocol) ? "https://%trackerBaseUrl%" : "http://%trackerBaseUrl%");
try {
- var piwikTracker = Piwik.getTracker(pkBaseURL + "matomo.php", 3);
+ var piwikTracker = Piwik.addTracker(pkBaseURL + "matomo.php", %idSite%);
piwikTracker.setCookieDomain('*.piwik.org');
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
- } catch( err ) {}
+ } catch( err ) {
+ console.log(err.stack || err.message);
+ }
</script>
</body>
</html> \ No newline at end of file
diff --git a/tests/resources/overlay-test-site/page-3.html b/tests/resources/overlay-test-site/page-3.html
index a53f07050e..3399004f97 100644
--- a/tests/resources/overlay-test-site/page-3.html
+++ b/tests/resources/overlay-test-site/page-3.html
@@ -83,12 +83,14 @@
<script>
var pkBaseURL = (("https:" == document.location.protocol) ? "https://%trackerBaseUrl%" : "http://%trackerBaseUrl%");
try {
- var piwikTracker = Piwik.getTracker(pkBaseURL + "matomo.php", 3);
+ var piwikTracker = Piwik.addTracker(pkBaseURL + "matomo.php", %idSite%);
piwikTracker.setCookieDomain('*.piwik.org');
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
- } catch( err ) {}
+ } catch( err ) {
+ console.log(err.stack || err.message);
+ }
</script>
</body>
</html> \ No newline at end of file
diff --git a/tests/resources/overlay-test-site/page-4.html b/tests/resources/overlay-test-site/page-4.html
index 8341fc48c7..6085970787 100644
--- a/tests/resources/overlay-test-site/page-4.html
+++ b/tests/resources/overlay-test-site/page-4.html
@@ -83,12 +83,14 @@
<script>
var pkBaseURL = (("https:" == document.location.protocol) ? "https://%trackerBaseUrl%" : "http://%trackerBaseUrl%");
try {
- var piwikTracker = Piwik.getTracker(pkBaseURL + "matomo.php", 3);
+ var piwikTracker = Piwik.addTracker(pkBaseURL + "matomo.php", %idSite%);
piwikTracker.setCookieDomain('*.piwik.org');
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
- } catch( err ) {}
+ } catch( err ) {
+ console.log(err.stack || err.message);
+ }
</script>
</body>
</html> \ No newline at end of file
diff --git a/tests/resources/overlay-test-site/page-5.html b/tests/resources/overlay-test-site/page-5.html
index e8806b0d68..0e4ece13a5 100644
--- a/tests/resources/overlay-test-site/page-5.html
+++ b/tests/resources/overlay-test-site/page-5.html
@@ -83,12 +83,14 @@
<script>
var pkBaseURL = (("https:" == document.location.protocol) ? "https://%trackerBaseUrl%" : "http://%trackerBaseUrl%");
try {
- var piwikTracker = Piwik.getTracker(pkBaseURL + "matomo.php", 3);
+ var piwikTracker = Piwik.addTracker(pkBaseURL + "matomo.php", %idSite%);
piwikTracker.setCookieDomain('*.piwik.org');
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
- } catch( err ) {}
+ } catch( err ) {
+ console.log(err.stack || err.message);
+ }
</script>
</body>
</html> \ No newline at end of file
diff --git a/tests/resources/overlay-test-site/page-6.html b/tests/resources/overlay-test-site/page-6.html
index 1dbe72c1a8..b43abaac79 100644
--- a/tests/resources/overlay-test-site/page-6.html
+++ b/tests/resources/overlay-test-site/page-6.html
@@ -83,12 +83,14 @@
<script>
var pkBaseURL = (("https:" == document.location.protocol) ? "https://%trackerBaseUrl%" : "http://%trackerBaseUrl%");
try {
- var piwikTracker = Piwik.getTracker(pkBaseURL + "matomo.php", 3);
+ var piwikTracker = Piwik.addTracker(pkBaseURL + "matomo.php", %idSite%);
piwikTracker.setCookieDomain('*.piwik.org');
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
- } catch( err ) {}
+ } catch( err ) {
+ console.log(err.stack || err.message);
+ }
</script>
</body>
</html> \ No newline at end of file