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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-23 12:06:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-23 12:06:03 +0300
commitb3e4ec8e8adf4fe96c982124e91b6a05021a9cda (patch)
tree5fda0011a7cc7de000186e465e61f893d478a1c8 /spec/frontend/tracking_spec.js
parent90cdc9391171e1be29b2b57a2e2aad0c02c2a7a9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/tracking_spec.js')
-rw-r--r--spec/frontend/tracking_spec.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/frontend/tracking_spec.js b/spec/frontend/tracking_spec.js
index 964f8b8787e..d9cc7104139 100644
--- a/spec/frontend/tracking_spec.js
+++ b/spec/frontend/tracking_spec.js
@@ -11,6 +11,7 @@ describe('Tracking', () => {
namespace: '_namespace_',
hostname: 'app.gitfoo.com',
cookieDomain: '.gitfoo.com',
+ userId: null,
};
snowplowSpy = jest.spyOn(window, 'snowplow');
});
@@ -34,6 +35,7 @@ describe('Tracking', () => {
contexts: { webPage: true },
formTracking: false,
linkClickTracking: false,
+ userId: null,
});
});
@@ -41,15 +43,18 @@ describe('Tracking', () => {
initUserTracking();
expect(snowplowSpy).toHaveBeenCalledWith('enableActivityTracking', 30, 30);
expect(snowplowSpy).toHaveBeenCalledWith('trackPageView');
+ expect(snowplowSpy).not.toHaveBeenCalledWith('setUserId');
expect(snowplowSpy).not.toHaveBeenCalledWith('enableFormTracking');
expect(snowplowSpy).not.toHaveBeenCalledWith('enableLinkClickTracking');
window.snowplowOptions = Object.assign({}, window.snowplowOptions, {
formTracking: true,
linkClickTracking: true,
+ userId: '1',
});
initUserTracking();
+ expect(snowplowSpy).toHaveBeenCalledWith('setUserId', '1');
expect(snowplowSpy).toHaveBeenCalledWith('enableFormTracking');
expect(snowplowSpy).toHaveBeenCalledWith('enableLinkClickTracking');
});