Merge pull request #6332 from overleaf/ab-split-test-param-overrides

Split tests query param overrides

GitOrigin-RevId: 8112710d057ddc22cebf37a619dfc969be57b6cc
This commit is contained in:
Alexandre Bourdin
2022-01-24 11:59:30 +01:00
committed by Copybot
parent bbac46156b
commit 1b954fa720
10 changed files with 313 additions and 819 deletions
@@ -29,7 +29,7 @@ describe('RecurlyEventHandler', function () {
'./SubscriptionEmailHandler': (this.SubscriptionEmailHandler = {
sendTrialOnboardingEmail: sinon.stub(),
}),
'../SplitTests/SplitTestV2Handler': (this.SplitTestV2Handler = {
'../SplitTests/SplitTestHandler': (this.SplitTestHandler = {
promises: {
getAssignment: sinon.stub().resolves({ active: false }),
},
@@ -76,14 +76,14 @@ describe('RecurlyEventHandler', function () {
true
)
sinon.assert.calledWith(
this.SplitTestV2Handler.promises.getAssignment,
this.SplitTestHandler.promises.getAssignment,
this.userId,
'trial-onboarding-email'
)
})
it('sends free trial onboarding email if user in ab group', async function () {
this.SplitTestV2Handler.promises.getAssignment = sinon
this.SplitTestHandler.promises.getAssignment = sinon
.stub()
.resolves({ active: true, variant: 'send-email' })
this.userId = '123456789trial'
@@ -94,7 +94,7 @@ describe('RecurlyEventHandler', function () {
await this.RecurlyEventHandler.sendSubscriptionStartedEvent(this.eventData)
sinon.assert.calledWith(
this.SplitTestV2Handler.promises.getAssignment,
this.SplitTestHandler.promises.getAssignment,
this.userId,
'trial-onboarding-email'
)