Merge pull request #17907 from overleaf/ab-split-test-assignments-optim-pt1

[web] Read anonymous split test assignments in session from both old&new fields

GitOrigin-RevId: 5235bb3e7d72d5ff9e89c6543b70fb80e9f1213c
This commit is contained in:
Alexandre Bourdin
2024-04-18 15:54:16 +02:00
committed by Copybot
parent 945e51b8ed
commit bee4c95c28
11 changed files with 621 additions and 204 deletions

View File

@@ -23,14 +23,14 @@ describe('BetaProgramController', function () {
user: this.user,
},
}
this.SplitTestHandler = {
this.SplitTestSessionHandler = {
promises: {
sessionMaintenance: sinon.stub(),
},
}
this.BetaProgramController = SandboxedModule.require(modulePath, {
requires: {
'../SplitTests/SplitTestHandler': this.SplitTestHandler,
'../SplitTests/SplitTestSessionHandler': this.SplitTestSessionHandler,
'./BetaProgramHandler': (this.BetaProgramHandler = {
promises: {
optIn: sinon.stub().resolves(),
@@ -76,7 +76,7 @@ describe('BetaProgramController', function () {
it('should invoke the session maintenance', function (done) {
this.res.callback = () => {
this.SplitTestHandler.promises.sessionMaintenance.should.have.been.calledWith(
this.SplitTestSessionHandler.promises.sessionMaintenance.should.have.been.calledWith(
this.req
)
done()
@@ -130,7 +130,7 @@ describe('BetaProgramController', function () {
it('should invoke the session maintenance', function (done) {
this.res.callback = () => {
this.SplitTestHandler.promises.sessionMaintenance.should.have.been.calledWith(
this.SplitTestSessionHandler.promises.sessionMaintenance.should.have.been.calledWith(
this.req,
null
)