[MM-44995] remove reference to 30 days trial in welcome email (#20425)
Этот коммит содержится в:
@@ -315,7 +315,7 @@ func (es *Service) SendCloudWelcomeEmail(userEmail, locale, teamInviteID, workSp
|
||||
subject := T("api.templates.cloud_welcome_email.subject")
|
||||
|
||||
data := es.NewEmailTemplateData(locale)
|
||||
data.Props["Title"] = T("api.templates.cloud_welcome_email.title", map[string]interface{}{"WorkSpace": workSpaceName})
|
||||
data.Props["Title"] = T("api.templates.cloud_welcome_email.title")
|
||||
data.Props["SubTitle"] = T("api.templates.cloud_welcome_email.subtitle")
|
||||
data.Props["SubTitleInfo"] = T("api.templates.cloud_welcome_email.subtitle_info")
|
||||
data.Props["Info"] = T("api.templates.cloud_welcome_email.info")
|
||||
|
||||
@@ -301,6 +301,44 @@ func TestSendCloudUpgradedEmail(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestSendCloudWelcomeEmail(t *testing.T) {
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
th.ConfigureInbucketMail()
|
||||
|
||||
emailTo := "testclouduser@example.com"
|
||||
|
||||
t.Run("TestSendCloudWelcomeEmail", func(t *testing.T) {
|
||||
verifyMailbox := func(t *testing.T) {
|
||||
t.Helper()
|
||||
|
||||
var resultsMailbox mail.JSONMessageHeaderInbucket
|
||||
err2 := mail.RetryInbucket(5, func() error {
|
||||
var err error
|
||||
resultsMailbox, err = mail.GetMailBox(emailTo)
|
||||
return err
|
||||
})
|
||||
if err2 != nil {
|
||||
t.Skipf("No email was received, maybe due load on the server: %v", err2)
|
||||
}
|
||||
|
||||
require.Len(t, resultsMailbox, 1)
|
||||
require.Contains(t, resultsMailbox[0].To[0], emailTo, "Wrong To: recipient")
|
||||
resultsEmail, err := mail.GetMessageFromMailbox(emailTo, resultsMailbox[0].ID)
|
||||
require.NoError(t, err, "Could not get message from mailbox")
|
||||
require.Contains(t, resultsEmail.Subject, "Congratulations!", "Wrong subject message %s", resultsEmail.Subject)
|
||||
require.Contains(t, resultsEmail.Body.Text, "Your workspace is ready to go!", "Wrong body %s", resultsEmail.Body.Text)
|
||||
|
||||
}
|
||||
mail.DeleteMailBox(emailTo)
|
||||
|
||||
err := th.service.SendCloudWelcomeEmail(emailTo, th.BasicUser.Locale, "inviteID", "SomeName", "example.com", "https://example.com")
|
||||
require.NoError(t, err)
|
||||
|
||||
verifyMailbox(t)
|
||||
})
|
||||
}
|
||||
|
||||
func TestMailServiceConfig(t *testing.T) {
|
||||
configuredReplyTo := "feedbackexample@test.com"
|
||||
customReplyTo := "customreplyto@test.com"
|
||||
|
||||
@@ -3237,7 +3237,7 @@
|
||||
},
|
||||
{
|
||||
"id": "api.templates.cloud_welcome_email.title",
|
||||
"translation": "Your 30-day trial of the {{.WorkSpace}} workspace is ready to go!"
|
||||
"translation": "Your workspace is ready to go!"
|
||||
},
|
||||
{
|
||||
"id": "api.templates.copyright",
|
||||
|
||||
Ссылка в новой задаче
Block a user