Merge pull request #7545 from overleaf/td-split-test-data-sentry

Record split-test state in Sentry metadata from web clients

GitOrigin-RevId: 66dd195c546bd9fb0aedac52844200846c5012ca
This commit is contained in:
Tim Down
2022-04-22 11:42:57 +01:00
committed by Copybot
parent 817f0de6ca
commit b4d78ddfb6
9 changed files with 113 additions and 65 deletions

View File

@@ -126,10 +126,8 @@ describe('ProjectController', function () {
this.SplitTestHandler = {
promises: {
getAssignment: sinon.stub().resolves({ variant: 'default' }),
assignInLocalsContext: sinon.stub().resolves({ variant: 'default' }),
},
getAssignment: sinon.stub().yields(null, { variant: 'default' }),
assignInLocalsContext: sinon.stub().yields(null, { variant: 'default' }),
}
this.ProjectController = SandboxedModule.require(MODULE_PATH, {
@@ -1413,7 +1411,7 @@ describe('ProjectController', function () {
done()
}
this.SplitTestHandler.getAssignment
.withArgs(this.req, 'pdf-detach')
.withArgs(this.req, this.res, 'pdf-detach')
.yields(null, { variant: 'enabled' })
this.req.query.pdf_detach = 'false'
this.ProjectController.loadEditor(this.req, this.res)
@@ -1436,7 +1434,7 @@ describe('ProjectController', function () {
done()
}
this.SplitTestHandler.getAssignment
.withArgs(this.req, 'pdf-detach')
.withArgs(this.req, this.res, 'pdf-detach')
.yields(null, { variant: 'enabled' })
this.ProjectController.loadEditor(this.req, this.res)
})