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:
Jessica Lawshe
2026-06-25 08:06:22 +00:00
committed by Copybot
parent 02d9c344f2
commit 6c9b4aa498
2 changed files with 64 additions and 0 deletions
@@ -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."
)
})
})
})
})
})