Merge pull request #29043 from overleaf/oa-odc-to-cio

[web] Send onboarding data to Customer IO

GitOrigin-RevId: b45d1b66d36c3bba36e9c777fb66699c6bb56d33
This commit is contained in:
Olzhas Askar
2025-10-14 14:55:33 +02:00
committed by Copybot
parent 15a6e8ba04
commit 60fe5b2e4a
3 changed files with 55 additions and 1 deletions
@@ -54,6 +54,22 @@ describe('ProjectListController', function () {
ctx.settings = {
siteUrl: 'https://overleaf.com',
}
ctx.onboardingDataCollection = {
companyDivisionDepartment: '',
companyJobTitle: '',
firstName: 'Dos',
governmentJobTitle: '',
institutionName: '',
lastName: 'Mukasan',
nonprofitDivisionDepartment: '',
nonprofitJobTitle: '',
otherJobTitle: '',
primaryOccupation: 'company',
role: 'conductor',
subjectArea: 'music',
updatedAt: '2025-09-04T12:12:21.628Z',
usedLatex: 'occasionally',
}
ctx.TagsHandler = {
promises: {
getAllTags: sinon.stub().resolves(ctx.tags),
@@ -67,6 +83,9 @@ describe('ProjectListController', function () {
ctx.UserModel = {
findById: sinon.stub().resolves(ctx.user),
}
ctx.OnboardingDataCollectionModel = {
findById: sinon.stub().resolves(ctx.onboardingDataCollection),
}
ctx.UserPrimaryEmailCheckHandler = {
requiresPrimaryEmailCheck: sinon.stub().returns(false),
}
@@ -209,6 +228,10 @@ describe('ProjectListController', function () {
User: ctx.UserModel,
}))
vi.doMock('../../../../app/src/models/OnboardingDataCollection', () => ({
OnboardingDataCollection: ctx.OnboardingDataCollectionModel,
}))
vi.doMock('../../../../app/src/Features/Project/ProjectGetter', () => ({
default: ctx.ProjectGetter,
}))