mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
Merge pull request #34768 from overleaf/jel-email-when-domain-verified
[web] Email group admin when domain is verified GitOrigin-RevId: 5f8bc6187c561067d16863d3586a94ef498f3bdf
This commit is contained in:
@@ -1093,6 +1093,41 @@ describe('EmailBuilder', function () {
|
||||
expect(email.text).to.contain('admin@overleaf.test')
|
||||
})
|
||||
})
|
||||
|
||||
describe('domainVerifiedForGroup', function () {
|
||||
it('should build captured-by-group variant', function (ctx) {
|
||||
const email = ctx.EmailBuilder.buildEmail('domainVerifiedForGroup', {
|
||||
to: 'admin@example.com',
|
||||
domain: 'example.com',
|
||||
capturedByGroup: true,
|
||||
})
|
||||
|
||||
expect(email.subject).to.equal('Your domain is verified')
|
||||
expect(email.html).to.contain("We've verified")
|
||||
expect(email.html).to.contain('<b>example.com</b>')
|
||||
expect(email.html).to.contain(
|
||||
'Your group will continue capturing users with this domain.'
|
||||
)
|
||||
})
|
||||
|
||||
it('should build not-captured variant with support instructions', function (ctx) {
|
||||
const email = ctx.EmailBuilder.buildEmail('domainVerifiedForGroup', {
|
||||
to: 'admin@example.com',
|
||||
domain: 'example.com',
|
||||
capturedByGroup: false,
|
||||
})
|
||||
|
||||
expect(email.subject).to.equal(
|
||||
'Your domain is verified — ready to capture?'
|
||||
)
|
||||
expect(email.html).to.contain(
|
||||
"To complete the capture, reply to this email and we'll take it from there."
|
||||
)
|
||||
expect(email.html).to.contain(
|
||||
"You'll receive a confirmation email once the capture is active."
|
||||
)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user