test(GODT-2636): Add step for sending from EML

This commit is contained in:
Gjorgji Slamkov
2023-06-23 06:45:31 +00:00
parent cc1d0e803b
commit 55081fa59b
10 changed files with 189 additions and 21 deletions

View File

@ -73,7 +73,7 @@ Feature: IMAP import messages
# The message is imported as UTF-8 and the content type is determined at build time.
Scenario: Import message as latin1 without content type
When IMAP client "1" appends "text_plain_unknown_latin1.eml" to "INBOX"
When IMAP client "1" appends "plain/text_plain_unknown_latin1.eml" to "INBOX"
Then it succeeds
And IMAP client "1" eventually sees the following messages in "INBOX":
| from | to | body |
@ -81,7 +81,7 @@ Feature: IMAP import messages
# The message is imported and the body is converted to UTF-8.
Scenario: Import message as latin1 with content type
When IMAP client "1" appends "text_plain_latin1.eml" to "INBOX"
When IMAP client "1" appends "plain/text_plain_latin1.eml" to "INBOX"
Then it succeeds
And IMAP client "1" eventually sees the following messages in "INBOX":
| from | to | body |
@ -89,7 +89,7 @@ Feature: IMAP import messages
# The message is imported anad the body is wrongly converted (body is corrupted).
Scenario: Import message as latin1 with wrong content type
When IMAP client "1" appends "text_plain_wrong_latin1.eml" to "INBOX"
When IMAP client "1" appends "plain/text_plain_wrong_latin1.eml" to "INBOX"
Then it succeeds
And IMAP client "1" eventually sees the following messages in "INBOX":
| from | to |

View File

@ -343,3 +343,34 @@ Feature: SMTP sending of plain messages
}
}
"""
Scenario: HTML message with Foreign/Nonascii chars in Subject and Body
When there exists an account with username "bridgetest" and password "password"
And the user logs in with username "bridgetest" and password "password"
And user "bridgetest" connects and authenticates SMTP client "1"
And SMTP client "1" sends the following EML "html/foreign_ascii_subject_body.eml" from "bridgetest@proton.local" to "pm.bridge.qa@gmail.com"
Then it succeeds
When user "bridgetest" connects and authenticates IMAP client "1"
Then IMAP client "1" eventually sees the following messages in "Sent":
| from | to | subject |
| bridgetest@proton.local | pm.bridge.qa@gmail.com | Subjεέςτ Ä È |
And the body in the "POST" request to "/mail/v4/messages" is:
"""
{
"Message": {
"Subject": "Subjεέςτ Ä È",
"Sender": {
"Name": "Bridge Test"
},
"ToList": [
{
"Address": "pm.bridge.qa@gmail.com",
"Name": "External Bridge"
}
],
"CCList": [],
"BCCList": [],
"MIMEType": "text/html"
}
}
"""

View File

@ -193,3 +193,34 @@ Feature: SMTP sending of plain messages
}
}
"""
Scenario: Basic message with multiple different attachments to internal account
When there exists an account with username "bridgetest" and password "password"
And the user logs in with username "bridgetest" and password "password"
And user "bridgetest" connects and authenticates SMTP client "1"
And SMTP client "1" sends the following EML "plain/text_plain_multiple_attachments.eml" from "bridgetest@proton.local" to "internalbridgetest@proton.local"
Then it succeeds
When user "bridgetest" connects and authenticates IMAP client "1"
Then IMAP client "1" eventually sees the following messages in "Sent":
| from | to | subject |
| bridgetest@proton.local | internalbridgetest@proton.local | Plain with multiple different attachments |
And the body in the "POST" request to "/mail/v4/messages" is:
"""
{
"Message": {
"Subject": "Plain with multiple different attachments",
"Sender": {
"Name": "Bridge Test"
},
"ToList": [
{
"Address": "internalbridgetest@proton.local",
"Name": "Internal Bridge"
}
],
"CCList": [],
"BCCList": [],
"MIMEType": "text/plain"
}
}
"""