Merge pull request #6628 from overleaf/jk-heartbeat-editor-type-metadata
Add editor metadata to editing-session pings GitOrigin-RevId: f42be772c13f71380d59bae7c447645fe0e16a17
This commit is contained in:
@@ -43,6 +43,11 @@ describe('AnalyticsController', function () {
|
||||
projectId: 'a project id',
|
||||
},
|
||||
session: {},
|
||||
body: {
|
||||
segmentation: {
|
||||
editorType: 'abc',
|
||||
},
|
||||
},
|
||||
}
|
||||
this.GeoIpLookup.getDetails = sinon
|
||||
.stub()
|
||||
@@ -54,7 +59,7 @@ describe('AnalyticsController', function () {
|
||||
this.controller.updateEditingSession(this.req, this.res)
|
||||
|
||||
this.AnalyticsManager.updateEditingSession
|
||||
.calledWith('1234', 'a project id', 'XY')
|
||||
.calledWith('1234', 'a project id', 'XY', { editorType: 'abc' })
|
||||
.should.equal(true)
|
||||
done()
|
||||
})
|
||||
|
||||
@@ -146,10 +146,12 @@ describe('AnalyticsManager', function () {
|
||||
it('updateEditingSession', function () {
|
||||
const projectId = '789ghi'
|
||||
const countryCode = 'fr'
|
||||
const segmentation = { editorType: 'abc' }
|
||||
this.AnalyticsManager.updateEditingSession(
|
||||
this.fakeUserId,
|
||||
projectId,
|
||||
countryCode
|
||||
countryCode,
|
||||
segmentation
|
||||
)
|
||||
sinon.assert.calledWithMatch(
|
||||
this.analyticsEditingSessionQueue.add,
|
||||
@@ -158,6 +160,7 @@ describe('AnalyticsManager', function () {
|
||||
userId: this.fakeUserId,
|
||||
projectId,
|
||||
countryCode,
|
||||
segmentation,
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user