[web] Add extra details to flexible license sales email (#32929)
* [web] Add extra details to flexible license sales email GitOrigin-RevId: fbd41adae21c55c5e97f9531565100e1ae911808
This commit is contained in:
@@ -28,6 +28,7 @@ describe('SubscriptionGroupController', function () {
|
||||
teamName: 'Cool group',
|
||||
groupPlan: true,
|
||||
membersLimit: 5,
|
||||
planCode: 'group_collaborator_10',
|
||||
}
|
||||
|
||||
ctx.plan = {
|
||||
@@ -212,6 +213,10 @@ describe('SubscriptionGroupController', function () {
|
||||
() => ctx.SubscriptionModel
|
||||
)
|
||||
|
||||
vi.doMock('@overleaf/settings', () => ({
|
||||
default: { adminUrl: 'https://admin.overleaf.com' },
|
||||
}))
|
||||
|
||||
vi.doMock('@overleaf/logger', () => ({
|
||||
default: {
|
||||
err: sinon.stub(),
|
||||
@@ -786,6 +791,12 @@ describe('SubscriptionGroupController', function () {
|
||||
'\n' +
|
||||
`**Estimated Number of Users:** ${adding}\n` +
|
||||
'\n' +
|
||||
`**Subscription:** [${ctx.subscriptionId}](https://admin.overleaf.com/admin/subscription/${ctx.subscriptionId})\n` +
|
||||
'\n' +
|
||||
`**Current Number of Seats:** ${ctx.subscription.membersLimit}\n` +
|
||||
'\n' +
|
||||
`**Plan Code:** ${ctx.subscription.planCode}\n` +
|
||||
'\n' +
|
||||
`**PO Number:** ${poNumber}\n` +
|
||||
'\n' +
|
||||
`**Message:** This email has been generated on behalf of user with email **${ctx.user.email}** to request an increase in the total number of users for their subscription.`,
|
||||
@@ -800,6 +811,27 @@ describe('SubscriptionGroupController', function () {
|
||||
ctx.Controller.submitForm(ctx.req, res, resolve)
|
||||
})
|
||||
})
|
||||
|
||||
it('should include the Salesforce ID line when the subscription has a salesforce_id', async function (ctx) {
|
||||
await new Promise(resolve => {
|
||||
const adding = 100
|
||||
const salesforceId = '0061x000ABCDEFG'
|
||||
ctx.subscription.salesforce_id = salesforceId
|
||||
ctx.req.body = { adding }
|
||||
|
||||
const res = {
|
||||
sendStatus: () => {
|
||||
const { message } =
|
||||
ctx.Modules.promises.hooks.fire.getCall(0).args[1]
|
||||
message.should.include(
|
||||
`**Salesforce ID:** [${salesforceId}](https://digitalscience.lightning.force.com/lightning/r/Opportunity/${salesforceId}/view)\n`
|
||||
)
|
||||
resolve()
|
||||
},
|
||||
}
|
||||
ctx.Controller.submitForm(ctx.req, res, resolve)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('subscriptionUpgradePage', function () {
|
||||
|
||||
Reference in New Issue
Block a user