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:
authorThomas Steur <thomas.steur@googlemail.com>2014-09-10 18:39:26 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-09-10 18:39:26 +0400
commitf84cd9377360b68a77d52f427152b8da1e624808 (patch)
tree2edc7091be311e48c34a81fa324aa7de070a5790 /tests/javascript
parent77abe4062a9fc71524a3a79c92c77f1cfced5eba (diff)
merged userid
Diffstat (limited to 'tests/javascript')
-rw-r--r--tests/javascript/index.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/javascript/index.php b/tests/javascript/index.php
index a1ff474547..73cbb8e7be 100644
--- a/tests/javascript/index.php
+++ b/tests/javascript/index.php
@@ -1796,7 +1796,7 @@ function PiwikTest() {
});
test("API methods", function() {
- expect(63);
+ expect(64);
equal( typeof Piwik.addPlugin, 'function', 'addPlugin' );
equal( typeof Piwik.getTracker, 'function', 'getTracker' );
@@ -1820,6 +1820,7 @@ function PiwikTest() {
equal( typeof tracker.setTrackerUrl, 'function', 'setTrackerUrl' );
equal( typeof tracker.getRequest, 'function', 'getRequest' );
equal( typeof tracker.addPlugin, 'function', 'addPlugin' );
+ equal( typeof tracker.setUserId, 'function', 'setUserId' );
equal( typeof tracker.setSiteId, 'function', 'setSiteId' );
equal( typeof tracker.setCustomData, 'function', 'setCustomData' );
equal( typeof tracker.getCustomData, 'function', 'getCustomData' );
@@ -2454,7 +2455,7 @@ if ($sqlite) {
});
test("tracking", function() {
- expect(98);
+ expect(99);
/*
* Prevent Opera and HtmlUnit from performing the default action (i.e., load the href URL)
@@ -2685,6 +2686,9 @@ if ($sqlite) {
// do not track
tracker3.setDoNotTrack(false);
+ // User ID
+ tracker3.setUserId('userid@mydomain.org');
+
// Append tracking url parameter
tracker3.appendToTrackingUrl("appended=1&appended2=value");
@@ -2810,6 +2814,9 @@ if ($sqlite) {
// Testing the Tracking URL append
ok( /&appended=1&appended2=value/.test( results ), "appendToTrackingUrl(query) function");
+ // Testing the User ID setter
+ ok( /&uid=%40mydomain.org/.test( results ), "setUserId(userId) function");
+
// Testing the JavaScript Error Tracking
ok( /e_c=JavaScript%20Errors&e_a=http%3A%2F%2Fpiwik.org%2Fpath%2Fto%2Ffile.js%3Fcb%3D34343%3A44%3A12&e_n=Uncaught%20Error%3A%20The%20message&idsite=1/.test( results ), "enableJSErrorTracking() function with predefined onerror event");
ok( /e_c=JavaScript%20Errors&e_a=http%3A%2F%2Fpiwik.org%2Fpath%2Fto%2Ffile.js%3Fcb%3D3kfkf%3A45&e_n=Second%20Error%3A%20With%20less%20data&idsite=1/.test( results ), "enableJSErrorTracking() function without predefined onerror event and less parameters");