|
|
@@ -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."
|
|
|
+ )
|
|
|
+ })
|
|
|
+ })
|
|
|
})
|
|
|
})
|
|
|
})
|