mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-26 19:56:43 +00:00
GODT-2181(test): Use [user:NAME] for more test user names
This commit is contained in:
@ -1,26 +1,26 @@
|
||||
Feature: SMTP sending of plain messages
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And there exists an account with username "bridgetest" and password "password"
|
||||
And there exists an account with username "bridgetest2" and password "password"
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And there exists an account with username "[user:to]" and password "password"
|
||||
And there exists an account with username "[user:cc]" and password "password"
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" connects and authenticates SMTP client "1"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" connects and authenticates SMTP client "1"
|
||||
|
||||
Scenario: Only from and to headers to internal account
|
||||
When SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain]":
|
||||
When SMTP client "1" sends the following message from "[user:user]@[domain]" to "[user:to]@[domain]":
|
||||
"""
|
||||
From: Bridge Test <user@[domain]>
|
||||
To: Internal Bridge <bridgetest@[domain]>
|
||||
From: Bridge Test <[user:user]@[domain]>
|
||||
To: Internal Bridge <[user:to]@[domain]>
|
||||
|
||||
hello
|
||||
|
||||
"""
|
||||
Then it succeeds
|
||||
When user "user" connects and authenticates IMAP client "1"
|
||||
When user "[user:user]" connects and authenticates IMAP client "1"
|
||||
Then IMAP client "1" eventually sees the following messages in "Sent":
|
||||
| from | to | subject |
|
||||
| user@[domain] | bridgetest@[domain] | |
|
||||
| from | to | subject |
|
||||
| [user:user]@[domain] | [user:to]@[domain] | |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -31,7 +31,7 @@ Feature: SMTP sending of plain messages
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "bridgetest@[domain]",
|
||||
"Address": "[user:to]@[domain]",
|
||||
"Name": "Internal Bridge"
|
||||
}
|
||||
],
|
||||
@ -43,19 +43,19 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
|
||||
Scenario: Only from and to headers to external account
|
||||
When SMTP client "1" sends the following message from "user@[domain]" to "pm.bridge.qa@gmail.com":
|
||||
When SMTP client "1" sends the following message from "[user:user]@[domain]" to "pm.bridge.qa@gmail.com":
|
||||
"""
|
||||
From: Bridge Test <user@[domain]>
|
||||
From: Bridge Test <[user:user]@[domain]>
|
||||
To: External Bridge <pm.bridge.qa@gmail.com>
|
||||
|
||||
hello
|
||||
|
||||
"""
|
||||
Then it succeeds
|
||||
When user "user" connects and authenticates IMAP client "1"
|
||||
When user "[user:user]" connects and authenticates IMAP client "1"
|
||||
Then IMAP client "1" eventually sees the following messages in "Sent":
|
||||
| from | to | subject |
|
||||
| user@[domain] | pm.bridge.qa@gmail.com | |
|
||||
| from | to | subject |
|
||||
| [user:user]@[domain] | pm.bridge.qa@gmail.com | |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -78,10 +78,10 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
|
||||
Scenario: Basic message to internal account
|
||||
When SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain]":
|
||||
When SMTP client "1" sends the following message from "[user:user]@[domain]" to "[user:to]@[domain]":
|
||||
"""
|
||||
From: Bridge Test <user@[domain]>
|
||||
To: Internal Bridge <bridgetest@[domain]>
|
||||
From: Bridge Test <[user:user]@[domain]>
|
||||
To: Internal Bridge <[user:to]@[domain]>
|
||||
Subject: Plain text internal
|
||||
Content-Disposition: inline
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
@ -90,10 +90,10 @@ Feature: SMTP sending of plain messages
|
||||
|
||||
"""
|
||||
Then it succeeds
|
||||
When user "user" connects and authenticates IMAP client "1"
|
||||
When user "[user:user]" connects and authenticates IMAP client "1"
|
||||
Then IMAP client "1" eventually sees the following messages in "Sent":
|
||||
| from | to | subject |
|
||||
| user@[domain] | bridgetest@[domain] | Plain text internal |
|
||||
| from | to | subject |
|
||||
| [user:user]@[domain] | [user:to]@[domain] | Plain text internal |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -104,7 +104,7 @@ Feature: SMTP sending of plain messages
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "bridgetest@[domain]",
|
||||
"Address": "[user:to]@[domain]",
|
||||
"Name": "Internal Bridge"
|
||||
}
|
||||
],
|
||||
@ -116,9 +116,9 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
|
||||
Scenario: Basic message to external account
|
||||
When SMTP client "1" sends the following message from "user@[domain]" to "pm.bridge.qa@gmail.com":
|
||||
When SMTP client "1" sends the following message from "[user:user]@[domain]" to "pm.bridge.qa@gmail.com":
|
||||
"""
|
||||
From: Bridge Test <user@[domain]>
|
||||
From: Bridge Test <[user:user]@[domain]>
|
||||
To: External Bridge <pm.bridge.qa@gmail.com>
|
||||
Subject: Plain text external
|
||||
Content-Disposition: inline
|
||||
@ -128,10 +128,10 @@ Feature: SMTP sending of plain messages
|
||||
|
||||
"""
|
||||
Then it succeeds
|
||||
When user "user" connects and authenticates IMAP client "1"
|
||||
When user "[user:user]" connects and authenticates IMAP client "1"
|
||||
Then IMAP client "1" eventually sees the following messages in "Sent":
|
||||
| from | to | subject |
|
||||
| user@[domain] | pm.bridge.qa@gmail.com | Plain text external |
|
||||
| from | to | subject |
|
||||
| [user:user]@[domain] | pm.bridge.qa@gmail.com | Plain text external |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -154,9 +154,9 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
|
||||
Scenario: Message without charset is utf8
|
||||
When SMTP client "1" sends the following message from "user@[domain]" to "pm.bridge.qa@gmail.com":
|
||||
When SMTP client "1" sends the following message from "[user:user]@[domain]" to "pm.bridge.qa@gmail.com":
|
||||
"""
|
||||
From: Bridge Test <user@[domain]>
|
||||
From: Bridge Test <[user:user]@[domain]>
|
||||
To: External Bridge <pm.bridge.qa@gmail.com>
|
||||
Subject: Plain text no charset external
|
||||
Content-Disposition: inline
|
||||
@ -166,10 +166,10 @@ Feature: SMTP sending of plain messages
|
||||
|
||||
"""
|
||||
Then it succeeds
|
||||
When user "user" connects and authenticates IMAP client "1"
|
||||
When user "[user:user]" connects and authenticates IMAP client "1"
|
||||
Then IMAP client "1" eventually sees the following messages in "Sent":
|
||||
| from | to | subject |
|
||||
| user@[domain] | pm.bridge.qa@gmail.com | Plain text no charset external |
|
||||
| from | to | subject |
|
||||
| [user:user]@[domain] | pm.bridge.qa@gmail.com | Plain text no charset external |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -192,9 +192,9 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
|
||||
Scenario: Message without charset is base64-encoded latin1
|
||||
When SMTP client "1" sends the following message from "user@[domain]" to "pm.bridge.qa@gmail.com":
|
||||
When SMTP client "1" sends the following message from "[user:user]@[domain]" to "pm.bridge.qa@gmail.com":
|
||||
"""
|
||||
From: Bridge Test <user@[domain]>
|
||||
From: Bridge Test <[user:user]@[domain]>
|
||||
To: External Bridge <pm.bridge.qa@gmail.com>
|
||||
Subject: Plain text no charset external
|
||||
Content-Disposition: inline
|
||||
@ -207,10 +207,10 @@ Feature: SMTP sending of plain messages
|
||||
|
||||
"""
|
||||
Then it succeeds
|
||||
When user "user" connects and authenticates IMAP client "1"
|
||||
When user "[user:user]" connects and authenticates IMAP client "1"
|
||||
Then IMAP client "1" eventually sees the following messages in "Sent":
|
||||
| from | to | subject |
|
||||
| user@[domain] | pm.bridge.qa@gmail.com | Plain text no charset external |
|
||||
| from | to | subject |
|
||||
| [user:user]@[domain] | pm.bridge.qa@gmail.com | Plain text no charset external |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -233,9 +233,9 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
|
||||
Scenario: Message without charset and content is detected as HTML
|
||||
When SMTP client "1" sends the following message from "user@[domain]" to "pm.bridge.qa@gmail.com":
|
||||
When SMTP client "1" sends the following message from "[user:user]@[domain]" to "pm.bridge.qa@gmail.com":
|
||||
"""
|
||||
From: Bridge Test <user@[domain]>
|
||||
From: Bridge Test <[user:user]@[domain]>
|
||||
To: External Bridge <pm.bridge.qa@gmail.com>
|
||||
Subject: Plain, no charset, no content, external
|
||||
Content-Disposition: inline
|
||||
@ -243,10 +243,10 @@ Feature: SMTP sending of plain messages
|
||||
|
||||
"""
|
||||
Then it succeeds
|
||||
When user "user" connects and authenticates IMAP client "1"
|
||||
When user "[user:user]" connects and authenticates IMAP client "1"
|
||||
Then IMAP client "1" eventually sees the following messages in "Sent":
|
||||
| from | to | subject |
|
||||
| user@[domain] | pm.bridge.qa@gmail.com | Plain, no charset, no content, external |
|
||||
| from | to | subject |
|
||||
| [user:user]@[domain] | pm.bridge.qa@gmail.com | Plain, no charset, no content, external |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -269,13 +269,13 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
|
||||
Scenario: RCPT does not contain all CC
|
||||
When SMTP client "1" sends MAIL FROM "<user@[domain]>"
|
||||
And SMTP client "1" sends RCPT TO "<bridgetest@[domain]>"
|
||||
When SMTP client "1" sends MAIL FROM "<[user:user]@[domain]>"
|
||||
And SMTP client "1" sends RCPT TO "<[user:to]@[domain]>"
|
||||
And SMTP client "1" sends DATA:
|
||||
"""
|
||||
From: Bridge Test <user@[domain]>
|
||||
To: Internal Bridge <bridgetest@[domain]>
|
||||
CC: Internal Bridge 2 <bridgetest2@[domain]>
|
||||
From: Bridge Test <[user:user]@[domain]>
|
||||
To: Internal Bridge <[user:to]@[domain]>
|
||||
CC: Internal Bridge 2 <[user:cc]@[domain]>
|
||||
Content-Type: text/plain
|
||||
Subject: RCPT-CC test
|
||||
|
||||
@ -283,10 +283,10 @@ Feature: SMTP sending of plain messages
|
||||
.
|
||||
"""
|
||||
Then it succeeds
|
||||
When user "user" connects and authenticates IMAP client "1"
|
||||
When user "[user:user]" connects and authenticates IMAP client "1"
|
||||
Then IMAP client "1" eventually sees the following messages in "Sent":
|
||||
| from | to | cc | subject |
|
||||
| user@[domain] | bridgetest@[domain] | bridgetest2@[domain] | RCPT-CC test |
|
||||
| from | to | cc | subject |
|
||||
| [user:user]@[domain] | [user:to]@[domain] | [user:cc]@[domain] | RCPT-CC test |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -297,13 +297,13 @@ Feature: SMTP sending of plain messages
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "bridgetest@[domain]",
|
||||
"Address": "[user:to]@[domain]",
|
||||
"Name": "Internal Bridge"
|
||||
}
|
||||
],
|
||||
"CCList": [
|
||||
{
|
||||
"Address": "bridgetest2@[domain]",
|
||||
"Address": "[user:cc]@[domain]",
|
||||
"Name": "Internal Bridge 2"
|
||||
}
|
||||
],
|
||||
@ -317,10 +317,10 @@ Feature: SMTP sending of plain messages
|
||||
"Packages": [
|
||||
{
|
||||
"Addresses": {
|
||||
"bridgetest@[domain]": {
|
||||
"[user:to]@[domain]": {
|
||||
"Type": 1
|
||||
},
|
||||
"bridgetest2@[domain]": {
|
||||
"[user:cc]@[domain]": {
|
||||
"Type": 1
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user