mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-30 20:31:34 +02:00
Merge pull request #4639 from overleaf/ab-web-mono-analytics-id
Analytics ID support GitOrigin-RevId: 820a6c0f4d19f046f6c791ce4dc64dbc80748924
This commit is contained in:
committed by
Copybot
parent
3af8fc63de
commit
44a8883b6d
@@ -36,7 +36,7 @@ describe('UserPostRegistrationAnalyticsManager', function () {
|
||||
},
|
||||
}
|
||||
this.AnalyticsManager = {
|
||||
setUserProperty: sinon.stub().resolves(),
|
||||
setUserPropertyForUser: sinon.stub().resolves(),
|
||||
}
|
||||
this.UserPostRegistrationAnalyticsManager = SandboxedModule.require(
|
||||
MODULE_PATH,
|
||||
@@ -72,7 +72,8 @@ describe('UserPostRegistrationAnalyticsManager', function () {
|
||||
)
|
||||
expect(this.InstitutionsAPI.promises.getUserAffiliations).not.to.have.been
|
||||
.called
|
||||
expect(this.AnalyticsManager.setUserProperty).not.to.have.been.called
|
||||
expect(this.AnalyticsManager.setUserPropertyForUser).not.to.have.been
|
||||
.called
|
||||
})
|
||||
|
||||
it('sets user property if user has commons account affiliationd', async function () {
|
||||
@@ -92,7 +93,9 @@ describe('UserPostRegistrationAnalyticsManager', function () {
|
||||
await this.UserPostRegistrationAnalyticsManager.postRegistrationAnalytics(
|
||||
this.fakeUserId
|
||||
)
|
||||
expect(this.AnalyticsManager.setUserProperty).to.have.been.calledWith(
|
||||
expect(
|
||||
this.AnalyticsManager.setUserPropertyForUser
|
||||
).to.have.been.calledWith(
|
||||
this.fakeUserId,
|
||||
'registered-from-commons-account',
|
||||
true
|
||||
@@ -110,7 +113,8 @@ describe('UserPostRegistrationAnalyticsManager', function () {
|
||||
await this.UserPostRegistrationAnalyticsManager.postRegistrationAnalytics(
|
||||
this.fakeUserId
|
||||
)
|
||||
expect(this.AnalyticsManager.setUserProperty).not.to.have.been.called
|
||||
expect(this.AnalyticsManager.setUserPropertyForUser).not.to.have.been
|
||||
.called
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user