fix: Welcome email copy changes and canned response API error handling [cw-1290] (#6905)

* fix: Welcome email copy changes and canned response API error handling

* Review fixes

* Uses mixin for alerts in canned page

* Typo fixes

* Copy changes

* Fixes broken tests

* Fixes review comments

* Fixes typo errors with mail template

* Removes unwanted case

* Fixes repetitive texts

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
Nithin David Thomas
2023-05-10 15:55:48 +05:30
committed by GitHub
parent 520bdabefe
commit 07aaa046c1
7 changed files with 42 additions and 32 deletions

View File

@@ -22,7 +22,7 @@ RSpec.describe 'Confirmation Instructions', type: :mailer do
end
it 'uses the user\'s name' do
expect(mail.body).to match("Welcome, #{CGI.escapeHTML(confirmable_user.name)}!")
expect(mail.body).to match("Hi #{CGI.escapeHTML(confirmable_user.name)},")
end
it 'does not refer to the inviter and their account' do
@@ -39,7 +39,7 @@ RSpec.describe 'Confirmation Instructions', type: :mailer do
it 'refers to the inviter and their account' do
expect(mail.body).to match(
"#{CGI.escapeHTML(inviter_val.name)}, with #{CGI.escapeHTML(account.name)}, has invited you to try out Chatwoot!"
"#{CGI.escapeHTML(inviter_val.name)}, with #{CGI.escapeHTML(account.name)}, has invited you to try out Chatwoot."
)
end