mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 23:56:56 +00:00
We build too many walls and not enough bridges
This commit is contained in:
46
test/features/bridge/addressmode.feature
Normal file
46
test/features/bridge/addressmode.feature
Normal file
@ -0,0 +1,46 @@
|
||||
Feature: Address mode
|
||||
Background:
|
||||
Given there is connected user "userMoreAddresses"
|
||||
And there is "userMoreAddresses" with mailbox "Folders/mbox"
|
||||
And there are messages in mailbox "Folders/mbox" for "userMoreAddresses"
|
||||
| from | to | subject |
|
||||
| john.doe@mail.com | [primary] | foo |
|
||||
| jane.doe@mail.com | [secondary] | bar |
|
||||
|
||||
Scenario: All messages in one mailbox with combined mode
|
||||
Given there is "userMoreAddresses" in "combined" address mode
|
||||
Then mailbox "Folders/mbox" for address "primary" of "userMoreAddresses" has messages
|
||||
| from | to | subject |
|
||||
| john.doe@mail.com | [primary] | foo |
|
||||
| jane.doe@mail.com | [secondary] | bar |
|
||||
|
||||
Scenario: Messages separated in more mailboxes with split mode
|
||||
Given there is "userMoreAddresses" in "split" address mode
|
||||
Then mailbox "Folders/mbox" for address "primary" of "userMoreAddresses" has messages
|
||||
| from | to | subject |
|
||||
| john.doe@mail.com | [primary] | foo |
|
||||
And mailbox "Folders/mbox" for address "secondary" of "userMoreAddresses" has messages
|
||||
| from | to | subject |
|
||||
| jane.doe@mail.com | [secondary] | bar |
|
||||
|
||||
Scenario: Switch address mode from combined to split mode
|
||||
Given there is "userMoreAddresses" in "combined" address mode
|
||||
When "userMoreAddresses" changes the address mode
|
||||
Then bridge response is "OK"
|
||||
And "userMoreAddresses" has address mode in "split" mode
|
||||
And mailbox "Folders/mbox" for address "primary" of "userMoreAddresses" has messages
|
||||
| from | to | subject |
|
||||
| john.doe@mail.com | [primary] | foo |
|
||||
And mailbox "Folders/mbox" for address "secondary" of "userMoreAddresses" has messages
|
||||
| from | to | subject |
|
||||
| jane.doe@mail.com | [secondary] | bar |
|
||||
|
||||
Scenario: Switch address mode from split to combined mode
|
||||
Given there is "userMoreAddresses" in "split" address mode
|
||||
When "userMoreAddresses" changes the address mode
|
||||
Then bridge response is "OK"
|
||||
And "userMoreAddresses" has address mode in "combined" mode
|
||||
And mailbox "Folders/mbox" for address "primary" of "userMoreAddresses" has messages
|
||||
| from | to | subject |
|
||||
| john.doe@mail.com | [primary] | foo |
|
||||
| jane.doe@mail.com | [secondary] | bar |
|
||||
36
test/features/bridge/deleteuser.feature
Normal file
36
test/features/bridge/deleteuser.feature
Normal file
@ -0,0 +1,36 @@
|
||||
Feature: Delete user
|
||||
Scenario: Deleting connected user
|
||||
Given there is connected user "user"
|
||||
When user deletes "user" from bridge
|
||||
Then bridge response is "OK"
|
||||
And "user" has database file
|
||||
|
||||
Scenario: Deleting connected user with cache
|
||||
Given there is connected user "user"
|
||||
When user deletes "user" from bridge with cache
|
||||
Then bridge response is "OK"
|
||||
And "user" does not have database file
|
||||
|
||||
Scenario: Deleting connected user without database file
|
||||
Given there is connected user "user"
|
||||
And there is no database file for "user"
|
||||
When user deletes "user" from bridge with cache
|
||||
Then bridge response is "OK"
|
||||
|
||||
Scenario: Deleting disconnected user
|
||||
Given there is disconnected user "user"
|
||||
When user deletes "user" from bridge
|
||||
Then bridge response is "OK"
|
||||
And "user" has database file
|
||||
|
||||
Scenario: Deleting disconnected user with cache
|
||||
Given there is disconnected user "user"
|
||||
When user deletes "user" from bridge with cache
|
||||
Then bridge response is "OK"
|
||||
And "user" does not have database file
|
||||
|
||||
Scenario: Deleting disconnected user without database file
|
||||
Given there is disconnected user "user"
|
||||
And there is no database file for "user"
|
||||
When user deletes "user" from bridge with cache
|
||||
Then bridge response is "OK"
|
||||
66
test/features/bridge/login.feature
Normal file
66
test/features/bridge/login.feature
Normal file
@ -0,0 +1,66 @@
|
||||
Feature: Login to bridge for the first time
|
||||
Scenario: Normal bridge login
|
||||
Given there is user "user"
|
||||
When "user" logs in to bridge
|
||||
Then bridge response is "OK"
|
||||
And "user" is connected
|
||||
And "user" has database file
|
||||
And "user" has running event loop
|
||||
|
||||
Scenario: Login with bad username
|
||||
When "user" logs in to bridge with bad password
|
||||
Then bridge response is "failed to login: Incorrect login credentials. Please try again"
|
||||
|
||||
Scenario: Login with bad password
|
||||
Given there is user "user"
|
||||
When "user" logs in to bridge with bad password
|
||||
Then bridge response is "failed to login: Incorrect login credentials. Please try again"
|
||||
|
||||
Scenario: Login without internet connection
|
||||
Given there is no internet connection
|
||||
When "user" logs in to bridge
|
||||
Then bridge response is "failed to login: cannot reach the server"
|
||||
|
||||
@ignore-live
|
||||
Scenario: Login user with 2FA
|
||||
Given there is user "user2fa"
|
||||
When "user2fa" logs in to bridge
|
||||
Then bridge response is "OK"
|
||||
And "user2fa" is connected
|
||||
And "user2fa" has database file
|
||||
And "user2fa" has running event loop
|
||||
|
||||
Scenario: Login user with capital letters in address
|
||||
Given there is user "userAddressWithCapitalLetter"
|
||||
When "userAddressWithCapitalLetter" logs in to bridge
|
||||
Then bridge response is "OK"
|
||||
And "userAddressWithCapitalLetter" is connected
|
||||
And "userAddressWithCapitalLetter" has database file
|
||||
And "userAddressWithCapitalLetter" has running event loop
|
||||
|
||||
Scenario: Login user with more addresses
|
||||
Given there is user "userMoreAddresses"
|
||||
When "userMoreAddresses" logs in to bridge
|
||||
Then bridge response is "OK"
|
||||
And "userMoreAddresses" is connected
|
||||
And "userMoreAddresses" has database file
|
||||
And "userMoreAddresses" has running event loop
|
||||
|
||||
@ignore-live
|
||||
Scenario: Login user with disabled primary address
|
||||
Given there is user "userDisabledPrimaryAddress"
|
||||
When "userDisabledPrimaryAddress" logs in to bridge
|
||||
Then bridge response is "OK"
|
||||
And "userDisabledPrimaryAddress" is connected
|
||||
And "userDisabledPrimaryAddress" has database file
|
||||
And "userDisabledPrimaryAddress" has running event loop
|
||||
|
||||
Scenario: Login two users
|
||||
Given there is user "user"
|
||||
And there is user "userMoreAddresses"
|
||||
When "user" logs in to bridge
|
||||
Then bridge response is "OK"
|
||||
And "user" is connected
|
||||
When "userMoreAddresses" logs in to bridge
|
||||
Then bridge response is "OK"
|
||||
And "userMoreAddresses" is connected
|
||||
35
test/features/bridge/relogin.feature
Normal file
35
test/features/bridge/relogin.feature
Normal file
@ -0,0 +1,35 @@
|
||||
Feature: Re-login to bridge
|
||||
Scenario: Re-login with connected user and database file
|
||||
Given there is connected user "user"
|
||||
And there is database file for "user"
|
||||
When "user" logs in to bridge
|
||||
Then bridge response is "failed to finish login: user is already logged in"
|
||||
And "user" is connected
|
||||
And "user" has running event loop
|
||||
|
||||
@ignore
|
||||
Scenario: Re-login with connected user and no database file
|
||||
Given there is connected user "user"
|
||||
And there is no database file for "user"
|
||||
When "user" logs in to bridge
|
||||
Then bridge response is "failed to finish login: user is already logged in"
|
||||
And "user" is connected
|
||||
And "user" has database file
|
||||
And "user" has running event loop
|
||||
|
||||
Scenario: Re-login with disconnected user and database file
|
||||
Given there is disconnected user "user"
|
||||
And there is database file for "user"
|
||||
When "user" logs in to bridge
|
||||
Then bridge response is "OK"
|
||||
And "user" is connected
|
||||
And "user" has running event loop
|
||||
|
||||
Scenario: Re-login with disconnected user and no database file
|
||||
Given there is disconnected user "user"
|
||||
And there is no database file for "user"
|
||||
When "user" logs in to bridge
|
||||
Then bridge response is "OK"
|
||||
And "user" is connected
|
||||
And "user" has database file
|
||||
And "user" has running event loop
|
||||
78
test/features/bridge/start.feature
Normal file
78
test/features/bridge/start.feature
Normal file
@ -0,0 +1,78 @@
|
||||
Feature: Start bridge
|
||||
Scenario: Start with connected user, database file and internet connection
|
||||
Given there is connected user "user"
|
||||
And there is database file for "user"
|
||||
When bridge starts
|
||||
Then "user" is connected
|
||||
And "user" has loaded store
|
||||
And "user" has running event loop
|
||||
And "user" has API auth
|
||||
|
||||
Scenario: Start with connected user, database file and no internet connection
|
||||
Given there is connected user "user"
|
||||
And there is database file for "user"
|
||||
And there is no internet connection
|
||||
When bridge starts
|
||||
Then "user" is connected
|
||||
And "user" has loaded store
|
||||
And "user" has running event loop
|
||||
And "user" does not have API auth
|
||||
|
||||
@ignore
|
||||
Scenario: Start with connected user, no database file and internet connection
|
||||
Given there is connected user "user"
|
||||
And there is no database file for "user"
|
||||
When bridge starts
|
||||
Then "user" is connected
|
||||
And "user" has loaded store
|
||||
And "user" has running event loop
|
||||
And "user" has API auth
|
||||
|
||||
@ignore
|
||||
Scenario: Start with connected user, no database file and no internet connection
|
||||
Given there is connected user "user"
|
||||
And there is no database file for "user"
|
||||
And there is no internet connection
|
||||
When bridge starts
|
||||
Then "user" is disconnected
|
||||
And "user" does not have API auth
|
||||
|
||||
Scenario: Start with disconnected user, database file and internet connection
|
||||
Given there is disconnected user "user"
|
||||
And there is database file for "user"
|
||||
When bridge starts
|
||||
Then "user" is disconnected
|
||||
And "user" has loaded store
|
||||
And "user" does not have running event loop
|
||||
And "user" does not have API auth
|
||||
|
||||
Scenario: Start with disconnected user, database file and no internet connection
|
||||
Given there is disconnected user "user"
|
||||
And there is database file for "user"
|
||||
And there is no internet connection
|
||||
When bridge starts
|
||||
Then "user" is disconnected
|
||||
And "user" has loaded store
|
||||
And "user" does not have running event loop
|
||||
And "user" does not have API auth
|
||||
|
||||
@ignore
|
||||
Scenario: Start with disconnected user, no database file and internet connection
|
||||
Given there is disconnected user "user"
|
||||
And there is no database file for "user"
|
||||
When bridge starts
|
||||
Then "user" is disconnected
|
||||
And "user" does not have loaded store
|
||||
And "user" does not have running event loop
|
||||
And "user" does not have API auth
|
||||
|
||||
@ignore
|
||||
Scenario: Start with disconnected user, no database file and no internet connection
|
||||
Given there is disconnected user "user"
|
||||
And there is no database file for "user"
|
||||
And there is no internet connection
|
||||
When bridge starts
|
||||
Then "user" is disconnected
|
||||
And "user" does not have loaded store
|
||||
And "user" does not have running event loop
|
||||
And "user" does not have API auth
|
||||
60
test/features/bridge/sync.feature
Normal file
60
test/features/bridge/sync.feature
Normal file
@ -0,0 +1,60 @@
|
||||
Feature: Sync bridge
|
||||
Background:
|
||||
Given there is connected user "userMoreAddresses"
|
||||
And there is "userMoreAddresses" with mailboxes
|
||||
| Folders/one |
|
||||
| Folders/two |
|
||||
| Labels/three |
|
||||
| Labels/four |
|
||||
And there are messages for "userMoreAddresses" as follows
|
||||
| address | mailboxes | messages |
|
||||
| primary | INBOX,Folders/one | 1 |
|
||||
| primary | Archive,Labels/three | 2 |
|
||||
| primary | INBOX | 1000 |
|
||||
| primary | Archive | 1200 |
|
||||
| primary | Folders/one | 1400 |
|
||||
| primary | Folders/two | 1600 |
|
||||
| primary | Labels/three | 1800 |
|
||||
| primary | Labels/four | 2000 |
|
||||
| secondary | INBOX | 100 |
|
||||
| secondary | Archive | 120 |
|
||||
| secondary | Folders/one | 140 |
|
||||
| secondary | Folders/two | 160 |
|
||||
| secondary | Labels/three | 180 |
|
||||
| secondary | Labels/four | 200 |
|
||||
|
||||
# Too heavy for live.
|
||||
@ignore-live
|
||||
Scenario: Sync in combined mode
|
||||
And there is "userMoreAddresses" in "combined" address mode
|
||||
When bridge syncs "userMoreAddresses"
|
||||
Then bridge response is "OK"
|
||||
And "userMoreAddresses" has the following messages
|
||||
| mailboxes | messages |
|
||||
| INBOX | 1101 |
|
||||
| Archive | 1322 |
|
||||
| Folders/one | 1541 |
|
||||
| Folders/two | 1760 |
|
||||
| Labels/three | 1982 |
|
||||
| Labels/four | 2200 |
|
||||
|
||||
# Too heavy for live.
|
||||
@ignore-live
|
||||
Scenario: Sync in split mode
|
||||
And there is "userMoreAddresses" in "split" address mode
|
||||
When bridge syncs "userMoreAddresses"
|
||||
Then bridge response is "OK"
|
||||
And "userMoreAddresses" has the following messages
|
||||
| address | mailboxes | messages |
|
||||
| primary | INBOX | 1001 |
|
||||
| primary | Archive | 1202 |
|
||||
| primary | Folders/one | 1401 |
|
||||
| primary | Folders/two | 1600 |
|
||||
| primary | Labels/three | 1802 |
|
||||
| primary | Labels/four | 2000 |
|
||||
| secondary | INBOX | 100 |
|
||||
| secondary | Archive | 120 |
|
||||
| secondary | Folders/one | 140 |
|
||||
| secondary | Folders/two | 160 |
|
||||
| secondary | Labels/three | 180 |
|
||||
| secondary | Labels/four | 200 |
|
||||
88
test/features/imap/auth.feature
Normal file
88
test/features/imap/auth.feature
Normal file
@ -0,0 +1,88 @@
|
||||
Feature: IMAP auth
|
||||
Scenario: Authenticates successfully
|
||||
Given there is connected user "user"
|
||||
When IMAP client authenticates "user"
|
||||
Then IMAP response is "OK"
|
||||
|
||||
Scenario: Authenticates with bad password
|
||||
Given there is connected user "user"
|
||||
When IMAP client authenticates "user" with bad password
|
||||
Then IMAP response is "IMAP error: NO backend/credentials: incorrect password"
|
||||
|
||||
Scenario: Authenticates with disconnected user
|
||||
Given there is disconnected user "user"
|
||||
When IMAP client authenticates "user"
|
||||
Then IMAP response is "IMAP error: NO bridge account is logged out, use bridge to login again"
|
||||
|
||||
Scenario: Authenticates with connected user that was loaded without internet
|
||||
Given there is connected user "user"
|
||||
And there is no internet connection
|
||||
When bridge starts
|
||||
And the internet connection is restored
|
||||
And the event loop of "user" loops once
|
||||
And IMAP client authenticates "user"
|
||||
# Problems during IMAP auth could lead to the user being disconnected.
|
||||
# This could take a few milliseconds because it happens async in separate goroutines.
|
||||
# We wait enough time for that to happen, then check that it didn't happen (user should remain connected).
|
||||
And 2 seconds pass
|
||||
Then "user" is connected
|
||||
|
||||
Scenario: Authenticates with freshly logged-out user
|
||||
Given there is connected user "user"
|
||||
When "user" logs out from bridge
|
||||
And IMAP client authenticates "user"
|
||||
Then IMAP response is "IMAP error: NO bridge account is logged out, use bridge to login again"
|
||||
|
||||
Scenario: Authenticates user which was re-logged in
|
||||
Given there is connected user "user"
|
||||
When "user" logs out from bridge
|
||||
And IMAP client authenticates "user"
|
||||
Then IMAP response is "IMAP error: NO bridge account is logged out, use bridge to login again"
|
||||
When "user" logs in to bridge
|
||||
And IMAP client authenticates "user"
|
||||
Then IMAP response is "OK"
|
||||
When IMAP client selects "INBOX"
|
||||
Then IMAP response is "OK"
|
||||
|
||||
Scenario: Authenticates with no user
|
||||
When IMAP client authenticates with username "user@pm.me" and password "bridgepassword"
|
||||
Then IMAP response is "IMAP error: NO user user@pm.me not found"
|
||||
|
||||
Scenario: Authenticates with capital letter
|
||||
Given there is connected user "userAddressWithCapitalLetter"
|
||||
When IMAP client authenticates "userAddressWithCapitalLetter"
|
||||
Then IMAP response is "OK"
|
||||
|
||||
Scenario: Authenticates with more addresses - primary one
|
||||
Given there is connected user "userMoreAddresses"
|
||||
When IMAP client authenticates "userMoreAddresses" with address "primary"
|
||||
Then IMAP response is "OK"
|
||||
|
||||
Scenario: Authenticates with more addresses - secondary one
|
||||
Given there is connected user "userMoreAddresses"
|
||||
When IMAP client authenticates "userMoreAddresses" with address "secondary"
|
||||
Then IMAP response is "OK"
|
||||
|
||||
Scenario: Authenticates with more addresses - disabled address
|
||||
Given there is connected user "userMoreAddresses"
|
||||
When IMAP client authenticates "userMoreAddresses" with address "disabled"
|
||||
Then IMAP response is "IMAP error: NO user .* not found"
|
||||
|
||||
@ignore-live
|
||||
Scenario: Authenticates with disabled primary address
|
||||
Given there is connected user "userDisabledPrimaryAddress"
|
||||
When IMAP client authenticates "userDisabledPrimaryAddress" with address "primary"
|
||||
Then IMAP response is "OK"
|
||||
|
||||
Scenario: Authenticates two users
|
||||
Given there is connected user "user"
|
||||
And there is connected user "userMoreAddresses"
|
||||
When IMAP client "imap1" authenticates "user"
|
||||
Then IMAP response to "imap1" is "OK"
|
||||
When IMAP client "imap2" authenticates "userMoreAddresses" with address "primary"
|
||||
Then IMAP response to "imap2" is "OK"
|
||||
|
||||
Scenario: Logs out user
|
||||
Given there is connected user "user"
|
||||
When IMAP client logs out
|
||||
Then IMAP response is "OK"
|
||||
62
test/features/imap/idle/basic.feature
Normal file
62
test/features/imap/idle/basic.feature
Normal file
@ -0,0 +1,62 @@
|
||||
Feature: IMAP IDLE
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
And there are 10 messages in mailbox "INBOX" for "user"
|
||||
|
||||
@ignore
|
||||
Scenario Outline: Mark as read
|
||||
Given there is IMAP client "active" logged in as "user"
|
||||
And there is IMAP client "active" selected in "INBOX"
|
||||
And there is IMAP client "idling" logged in as "user"
|
||||
And there is IMAP client "idling" selected in "INBOX"
|
||||
When IMAP client "idling" starts IDLE-ing
|
||||
And IMAP client "active" marks message "<message>" as read
|
||||
Then IMAP client "idling" receives update marking message "<message>" as read within <seconds> seconds
|
||||
Then message "<message>" in "INBOX" for "user" is marked as read
|
||||
|
||||
Examples:
|
||||
| message | seconds |
|
||||
| 1 | 2 |
|
||||
| 1:5 | 2 |
|
||||
| 1:10 | 5 |
|
||||
|
||||
@ignore
|
||||
Scenario Outline: Mark as unread
|
||||
Given there is IMAP client "active" logged in as "user"
|
||||
And there is IMAP client "active" selected in "INBOX"
|
||||
And there is IMAP client "idling" logged in as "user"
|
||||
And there is IMAP client "idling" selected in "INBOX"
|
||||
When IMAP client "idling" starts IDLE-ing
|
||||
And IMAP client "active" marks message "<message>" as unread
|
||||
Then IMAP client "idling" receives update marking message "<message>" as unread within <seconds> seconds
|
||||
And message "<message>" in "INBOX" for "user" is marked as unread
|
||||
|
||||
Examples:
|
||||
| message | seconds |
|
||||
| 1 | 2 |
|
||||
| 1:5 | 2 |
|
||||
| 1:10 | 5 |
|
||||
|
||||
@ignore
|
||||
Scenario Outline: Three IDLEing
|
||||
Given there is IMAP client "active" logged in as "user"
|
||||
And there is IMAP client "active" selected in "INBOX"
|
||||
And there is IMAP client "idling1" logged in as "user"
|
||||
And there is IMAP client "idling1" selected in "INBOX"
|
||||
And there is IMAP client "idling2" logged in as "user"
|
||||
And there is IMAP client "idling2" selected in "INBOX"
|
||||
And there is IMAP client "idling3" logged in as "user"
|
||||
And there is IMAP client "idling3" selected in "INBOX"
|
||||
When IMAP client "idling1" starts IDLE-ing
|
||||
And IMAP client "idling2" starts IDLE-ing
|
||||
And IMAP client "idling3" starts IDLE-ing
|
||||
And IMAP client "active" marks message "<message>" as read
|
||||
Then IMAP client "idling1" receives update marking message "<message>" as read within <seconds> seconds
|
||||
Then IMAP client "idling2" receives update marking message "<message>" as read within <seconds> seconds
|
||||
Then IMAP client "idling3" receives update marking message "<message>" as read within <seconds> seconds
|
||||
|
||||
Examples:
|
||||
| message | seconds |
|
||||
| 1 | 2 |
|
||||
| 1:5 | 2 |
|
||||
| 1:10 | 5 |
|
||||
28
test/features/imap/idle/two_users.feature
Normal file
28
test/features/imap/idle/two_users.feature
Normal file
@ -0,0 +1,28 @@
|
||||
Feature: IMAP IDLE with two users
|
||||
Scenario: IDLE statements are not leaked to other account
|
||||
Given there is connected user "user"
|
||||
And there are 10 messages in mailbox "INBOX" for "user"
|
||||
And there is connected user "userMoreAddresses"
|
||||
And there is IMAP client "active" logged in as "user"
|
||||
And there is IMAP client "active" selected in "INBOX"
|
||||
And there is IMAP client "idling" logged in as "userMoreAddresses"
|
||||
And there is IMAP client "idling" selected in "INBOX"
|
||||
When IMAP client "idling" starts IDLE-ing
|
||||
And IMAP client "active" marks message "1" as read
|
||||
Then IMAP client "idling" does not receive update for message "1" within 5 seconds
|
||||
|
||||
Scenario: IDLE statements are not leaked to other alias
|
||||
Given there is connected user "userMoreAddresses"
|
||||
And there is "userMoreAddresses" in "combined" address mode
|
||||
And there is "userMoreAddresses" with mailbox "Folders/mbox"
|
||||
And there are messages in mailbox "Folders/mbox" for "userMoreAddresses"
|
||||
| from | to | subject |
|
||||
| john.doe@mail.com | [primary] | foo |
|
||||
| jane.doe@mail.com | [secondary] | bar |
|
||||
And there is IMAP client "active" logged in as "userMoreAddresses" with address "primary"
|
||||
And there is IMAP client "active" selected in "INBOX"
|
||||
And there is IMAP client "idling" logged in as "userMoreAddresses" with address "secondary"
|
||||
And there is IMAP client "idling" selected in "INBOX"
|
||||
When IMAP client "idling" starts IDLE-ing
|
||||
And IMAP client "active" marks message "1" as read
|
||||
Then IMAP client "idling" does not receive update for message "1" within 5 seconds
|
||||
25
test/features/imap/mailbox/create.feature
Normal file
25
test/features/imap/mailbox/create.feature
Normal file
@ -0,0 +1,25 @@
|
||||
Feature: IMAP create mailbox
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
And there is IMAP client logged in as "user"
|
||||
|
||||
Scenario: Create folder
|
||||
When IMAP client creates mailbox "Folders/mbox"
|
||||
Then IMAP response is "OK"
|
||||
And "user" has mailbox "Folders/mbox"
|
||||
And "user" does not have mailbox "Labels/mbox"
|
||||
|
||||
Scenario: Create label
|
||||
When IMAP client creates mailbox "Labels/mbox"
|
||||
Then IMAP response is "OK"
|
||||
And "user" does not have mailbox "Folders/mbox"
|
||||
And "user" has mailbox "Labels/mbox"
|
||||
|
||||
Scenario: Creating system mailbox is not possible
|
||||
When IMAP client creates mailbox "INBOX"
|
||||
Then IMAP response is "IMAP error: NO mailbox INBOX already exists"
|
||||
|
||||
Scenario: Creating mailbox without prefix is not possible
|
||||
When IMAP client creates mailbox "mbox"
|
||||
Then IMAP response is "OK"
|
||||
And "user" does not have mailbox "mbox"
|
||||
29
test/features/imap/mailbox/delete.feature
Normal file
29
test/features/imap/mailbox/delete.feature
Normal file
@ -0,0 +1,29 @@
|
||||
Feature: IMAP delete mailbox
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
|
||||
Scenario: Delete folder
|
||||
Given there is "user" with mailbox "Folders/mbox"
|
||||
And there is IMAP client logged in as "user"
|
||||
When IMAP client deletes mailbox "Folders/mbox"
|
||||
Then IMAP response is "OK"
|
||||
And "user" does not have mailbox "Folders/mbox"
|
||||
|
||||
Scenario: Delete label
|
||||
Given there is "user" with mailbox "Labels/mbox"
|
||||
And there is IMAP client logged in as "user"
|
||||
When IMAP client deletes mailbox "Labels/mbox"
|
||||
Then IMAP response is "OK"
|
||||
And "user" does not have mailbox "Labels/mbox"
|
||||
|
||||
Scenario: Empty Trash by deleting it
|
||||
Given there are 10 messages in mailbox "Trash" for "user"
|
||||
And there is IMAP client logged in as "user"
|
||||
When IMAP client deletes mailbox "Trash"
|
||||
Then IMAP response is "OK"
|
||||
And mailbox "Trash" for "user" has 0 messages
|
||||
|
||||
Scenario: Deleting system mailbox is not possible
|
||||
Given there is IMAP client logged in as "user"
|
||||
When IMAP client deletes mailbox "INBOX"
|
||||
Then IMAP response is "IMAP error: NO cannot empty mailbox 0"
|
||||
15
test/features/imap/mailbox/info.feature
Normal file
15
test/features/imap/mailbox/info.feature
Normal file
@ -0,0 +1,15 @@
|
||||
Feature: IMAP get mailbox info
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
And there are messages in mailbox "INBOX" for "user"
|
||||
| from | to | subject | body | read | starred |
|
||||
| john.doe@mail.com | user@pm.me | foo | hello | false | false |
|
||||
| jane.doe@mail.com | name@pm.me | bar | world | true | true |
|
||||
And there is IMAP client logged in as "user"
|
||||
|
||||
Scenario: Mailbox info contains mailbox name
|
||||
When IMAP client gets info of "INBOX"
|
||||
Then IMAP response contains "2 EXISTS"
|
||||
And IMAP response contains "UNSEEN 1"
|
||||
And IMAP response contains "UIDNEXT 3"
|
||||
And IMAP response contains "UIDVALIDITY"
|
||||
16
test/features/imap/mailbox/list.feature
Normal file
16
test/features/imap/mailbox/list.feature
Normal file
@ -0,0 +1,16 @@
|
||||
Feature: IMAP list mailboxes
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
And there is "user" with mailbox "Folders/mbox1"
|
||||
And there is "user" with mailbox "Labels/mbox2"
|
||||
And there is IMAP client logged in as "user"
|
||||
|
||||
Scenario: List mailboxes
|
||||
When IMAP client lists mailboxes
|
||||
Then IMAP response contains "INBOX"
|
||||
Then IMAP response contains "Sent"
|
||||
Then IMAP response contains "Archive"
|
||||
Then IMAP response contains "Trash"
|
||||
Then IMAP response contains "All Mail"
|
||||
Then IMAP response contains "Folders/mbox1"
|
||||
Then IMAP response contains "Labels/mbox2"
|
||||
30
test/features/imap/mailbox/rename.feature
Normal file
30
test/features/imap/mailbox/rename.feature
Normal file
@ -0,0 +1,30 @@
|
||||
Feature: IMAP mailbox rename
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
|
||||
Scenario: Rename folder
|
||||
Given there is "user" with mailbox "Folders/mbox"
|
||||
And there is IMAP client logged in as "user"
|
||||
When IMAP client renames mailbox "Folders/mbox" to "Folders/mbox2"
|
||||
Then IMAP response is "OK"
|
||||
And "user" does not have mailbox "Folders/mbox"
|
||||
And "user" has mailbox "Folders/mbox2"
|
||||
|
||||
Scenario: Rename label
|
||||
Given there is "user" with mailbox "Labels/mbox"
|
||||
And there is IMAP client logged in as "user"
|
||||
When IMAP client renames mailbox "Labels/mbox" to "Labels/mbox2"
|
||||
Then IMAP response is "OK"
|
||||
And "user" does not have mailbox "Labels/mbox"
|
||||
And "user" has mailbox "Labels/mbox2"
|
||||
|
||||
Scenario: Renaming folder to label is not possible
|
||||
Given there is "user" with mailbox "Folders/mbox"
|
||||
And there is IMAP client logged in as "user"
|
||||
When IMAP client renames mailbox "Folders/mbox" to "Labels/mbox"
|
||||
Then IMAP response is "IMAP error: NO cannot rename folder to non-folder"
|
||||
|
||||
Scenario: Renaming system folder is not possible
|
||||
Given there is IMAP client logged in as "user"
|
||||
When IMAP client renames mailbox "INBOX" to "Folders/mbox"
|
||||
Then IMAP response is "IMAP error: NO cannot rename system mailboxes"
|
||||
17
test/features/imap/mailbox/select.feature
Normal file
17
test/features/imap/mailbox/select.feature
Normal file
@ -0,0 +1,17 @@
|
||||
Feature: IMAP select into mailbox
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
And there is "user" with mailbox "Folders/mbox"
|
||||
And there is IMAP client logged in as "user"
|
||||
|
||||
Scenario: Select into inbox
|
||||
When IMAP client selects "INBOX"
|
||||
Then IMAP response is "OK"
|
||||
|
||||
Scenario: Select into custom mailbox
|
||||
When IMAP client selects "Folders/mbox"
|
||||
Then IMAP response is "OK"
|
||||
|
||||
Scenario: Select into non-existing mailbox
|
||||
When IMAP client selects "qwerty"
|
||||
Then IMAP response is "IMAP error: NO mailbox qwerty does not exist"
|
||||
21
test/features/imap/mailbox/status.feature
Normal file
21
test/features/imap/mailbox/status.feature
Normal file
@ -0,0 +1,21 @@
|
||||
Feature: IMAP get mailbox status
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
And there are messages in mailbox "INBOX" for "user"
|
||||
| from | to | subject | body | read | starred |
|
||||
| john.doe@mail.com | user@pm.me | foo | hello | false | false |
|
||||
| jane.doe@mail.com | name@pm.me | bar | world | true | true |
|
||||
And there is IMAP client logged in as "user"
|
||||
And there is IMAP client selected in "INBOX"
|
||||
|
||||
Scenario: Mailbox status contains mailbox name
|
||||
When IMAP client gets status of "INBOX"
|
||||
Then IMAP response contains "INBOX"
|
||||
|
||||
Scenario: Mailbox status contains
|
||||
When IMAP client gets status of "INBOX"
|
||||
Then IMAP response contains "INBOX"
|
||||
And IMAP response contains "MESSAGES 2"
|
||||
And IMAP response contains "UNSEEN 1"
|
||||
And IMAP response contains "UIDNEXT 3"
|
||||
And IMAP response contains "UIDVALIDITY"
|
||||
45
test/features/imap/message/copy.feature
Normal file
45
test/features/imap/message/copy.feature
Normal file
@ -0,0 +1,45 @@
|
||||
Feature: IMAP copy messages
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
And there is "user" with mailbox "Folders/mbox"
|
||||
And there is "user" with mailbox "Labels/label"
|
||||
And there are messages in mailbox "INBOX" for "user"
|
||||
| from | to | subject | body |
|
||||
| john.doe@mail.com | user@pm.me | foo | hello |
|
||||
| jane.doe@mail.com | name@pm.me | bar | world |
|
||||
And there is IMAP client logged in as "user"
|
||||
And there is IMAP client selected in "INBOX"
|
||||
|
||||
Scenario: Copy message to label
|
||||
When IMAP client copies messages "2" to "Labels/label"
|
||||
Then IMAP response is "OK"
|
||||
And mailbox "INBOX" for "user" has 2 messages
|
||||
And mailbox "Labels/label" for "user" has messages
|
||||
| from | to | subject |
|
||||
| john.doe@mail.com | user@pm.me | foo |
|
||||
|
||||
Scenario: Copy all messages to label
|
||||
When IMAP client copies messages "1:*" to "Labels/label"
|
||||
Then IMAP response is "OK"
|
||||
And mailbox "INBOX" for "user" has 2 messages
|
||||
And mailbox "Labels/label" for "user" has messages
|
||||
| from | to | subject |
|
||||
| john.doe@mail.com | user@pm.me | foo |
|
||||
| jane.doe@mail.com | name@pm.me | bar |
|
||||
|
||||
Scenario: Copy message to folder does move
|
||||
When IMAP client copies messages "2" to "Folders/mbox"
|
||||
Then IMAP response is "OK"
|
||||
And mailbox "INBOX" for "user" has 1 message
|
||||
And mailbox "Folders/mbox" for "user" has messages
|
||||
| from | to | subject |
|
||||
| john.doe@mail.com | user@pm.me | foo |
|
||||
|
||||
Scenario: Copy all messages to folder does move
|
||||
When IMAP client copies messages "1:*" to "Folders/mbox"
|
||||
Then IMAP response is "OK"
|
||||
And mailbox "INBOX" for "user" has 0 messages
|
||||
And mailbox "Folders/mbox" for "user" has messages
|
||||
| from | to | subject |
|
||||
| john.doe@mail.com | user@pm.me | foo |
|
||||
| jane.doe@mail.com | name@pm.me | bar |
|
||||
59
test/features/imap/message/create.feature
Normal file
59
test/features/imap/message/create.feature
Normal file
@ -0,0 +1,59 @@
|
||||
Feature: IMAP create messages
|
||||
Background:
|
||||
Given there is connected user "userMoreAddresses"
|
||||
And there is IMAP client logged in as "userMoreAddresses"
|
||||
|
||||
Scenario: Creates message to user's primary address
|
||||
Given there is IMAP client selected in "INBOX"
|
||||
When IMAP client creates message "foo" from "john.doe@email.com" to address "primary" of "userMoreAddresses" with body "hello world" in "INBOX"
|
||||
Then IMAP response is "OK"
|
||||
And mailbox "INBOX" for "userMoreAddresses" has messages
|
||||
| from | to | subject | read |
|
||||
| john.doe@email.com | [primary] | foo | true |
|
||||
|
||||
Scenario: Creates draft
|
||||
When IMAP client creates message "foo" from address "primary" of "userMoreAddresses" to "john.doe@email.com" with body "hello world" in "Drafts"
|
||||
Then IMAP response is "OK"
|
||||
And mailbox "Drafts" for "userMoreAddresses" has messages
|
||||
| from | to | subject | read |
|
||||
| [primary] | john.doe@email.com | foo | true |
|
||||
|
||||
@ignore
|
||||
Scenario: Creates message sent from user's primary address
|
||||
Given there is IMAP client selected in "Sent"
|
||||
When IMAP client creates message "foo" from address "primary" of "userMoreAddresses" to "john.doe@email.com" with body "hello world" in "Sent"
|
||||
Then IMAP response is "OK"
|
||||
When the event loop of "userMoreAddresses" loops once
|
||||
Then mailbox "Sent" for "userMoreAddresses" has messages
|
||||
| from | to | subject | read |
|
||||
| [primary] | john.doe@email.com | foo | true |
|
||||
And mailbox "INBOX" for "userMoreAddresses" has no messages
|
||||
|
||||
@ignore
|
||||
Scenario: Creates message sent from user's secondary address
|
||||
Given there is IMAP client selected in "Sent"
|
||||
When IMAP client creates message "foo" from address "secondary" of "userMoreAddresses" to "john.doe@email.com" with body "hello world" in "Sent"
|
||||
Then IMAP response is "OK"
|
||||
When the event loop of "userMoreAddresses" loops once
|
||||
Then mailbox "Sent" for "userMoreAddresses" has messages
|
||||
| from | to | subject | read |
|
||||
| [secondary] | john.doe@email.com | foo | true |
|
||||
And mailbox "INBOX" for "userMoreAddresses" has no messages
|
||||
|
||||
Scenario: Imports an unrelated message to inbox
|
||||
Given there is IMAP client selected in "INBOX"
|
||||
When IMAP client creates message "foo" from "john.doe@email.com" to "john.doe2@email.com" with body "hello world" in "INBOX"
|
||||
Then IMAP response is "OK"
|
||||
And mailbox "INBOX" for "userMoreAddresses" has messages
|
||||
| from | to | subject | read |
|
||||
| john.doe@email.com | john.doe2@email.com | foo | true |
|
||||
|
||||
Scenario: Imports an unrelated message to sent
|
||||
Given there is IMAP client selected in "Sent"
|
||||
When IMAP client creates message "foo" from "notuser@gmail.com" to "alsonotuser@gmail.com" with body "hello world" in "Sent"
|
||||
Then IMAP response is "OK"
|
||||
When the event loop of "userMoreAddresses" loops once
|
||||
Then mailbox "Sent" for "userMoreAddresses" has messages
|
||||
| from | to | subject | read |
|
||||
| notuser@gmail.com | alsonotuser@gmail.com | foo | true |
|
||||
And mailbox "INBOX" for "userMoreAddresses" has no messages
|
||||
41
test/features/imap/message/delete.feature
Normal file
41
test/features/imap/message/delete.feature
Normal file
@ -0,0 +1,41 @@
|
||||
Feature: IMAP delete messages
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
And there is "user" with mailbox "Folders/mbox"
|
||||
And there is "user" with mailbox "Labels/label"
|
||||
|
||||
# https://gitlab.protontech.ch/ProtonMail/Slim-API/issues/1420
|
||||
@ignore-live
|
||||
Scenario Outline: Delete message
|
||||
Given there are 10 messages in mailbox "<mailbox>" for "user"
|
||||
And there is IMAP client logged in as "user"
|
||||
And there is IMAP client selected in "<mailbox>"
|
||||
When IMAP client deletes messages "1"
|
||||
Then IMAP response is "OK"
|
||||
And mailbox "<mailbox>" for "user" has 9 messages
|
||||
|
||||
Examples:
|
||||
| mailbox |
|
||||
| INBOX |
|
||||
| Folders/mbox |
|
||||
| Labels/label |
|
||||
| Drafts |
|
||||
| Trash |
|
||||
|
||||
# https://gitlab.protontech.ch/ProtonMail/Slim-API/issues/1420
|
||||
@ignore-live
|
||||
Scenario Outline: Delete all messages
|
||||
Given there are 10 messages in mailbox "<mailbox>" for "user"
|
||||
And there is IMAP client logged in as "user"
|
||||
And there is IMAP client selected in "<mailbox>"
|
||||
When IMAP client deletes messages "1:*"
|
||||
Then IMAP response is "OK"
|
||||
And mailbox "<mailbox>" for "user" has 0 messages
|
||||
|
||||
Examples:
|
||||
| mailbox |
|
||||
| INBOX |
|
||||
| Folders/mbox |
|
||||
| Labels/label |
|
||||
| Drafts |
|
||||
| Trash |
|
||||
51
test/features/imap/message/fetch.feature
Normal file
51
test/features/imap/message/fetch.feature
Normal file
@ -0,0 +1,51 @@
|
||||
Feature: IMAP fetch messages
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
And there is "user" with mailbox "Folders/mbox"
|
||||
|
||||
Scenario: Fetch of inbox
|
||||
Given there are 10 messages in mailbox "INBOX" for "user"
|
||||
And there is IMAP client logged in as "user"
|
||||
And there is IMAP client selected in "INBOX"
|
||||
When IMAP client fetches "1:*"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response has 10 messages
|
||||
|
||||
Scenario: Fetch first few message of inbox
|
||||
Given there are 10 messages in mailbox "INBOX" for "user"
|
||||
And there is IMAP client logged in as "user"
|
||||
And there is IMAP client selected in "INBOX"
|
||||
When IMAP client fetches "1:5"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response has 5 messages
|
||||
|
||||
Scenario: Fetch of custom mailbox
|
||||
Given there are 10 messages in mailbox "Folders/mbox" for "user"
|
||||
And there is IMAP client logged in as "user"
|
||||
And there is IMAP client selected in "Folders/mbox"
|
||||
When IMAP client fetches "1:*"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response has 10 messages
|
||||
|
||||
Scenario: Fetch of emtpy mailbox
|
||||
Given there is IMAP client logged in as "user"
|
||||
And there is IMAP client selected in "Folders/mbox"
|
||||
When IMAP client fetches "1:*"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response has 0 messages
|
||||
|
||||
Scenario: Fetch of big mailbox
|
||||
Given there are 100 messages in mailbox "Folders/mbox" for "user"
|
||||
And there is IMAP client logged in as "user"
|
||||
And there is IMAP client selected in "Folders/mbox"
|
||||
When IMAP client fetches "1:*"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response has 100 messages
|
||||
|
||||
Scenario: Fetch returns alsways latest messages
|
||||
Given there are 10 messages in mailbox "Folders/mbox" for "user"
|
||||
And there is IMAP client logged in as "user"
|
||||
And there is IMAP client selected in "Folders/mbox"
|
||||
When IMAP client fetches by UID "11:*"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response has 1 message
|
||||
54
test/features/imap/message/move.feature
Normal file
54
test/features/imap/message/move.feature
Normal file
@ -0,0 +1,54 @@
|
||||
Feature: IMAP move messages
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
And there is "user" with mailbox "Folders/mbox"
|
||||
And there are messages in mailbox "INBOX" for "user"
|
||||
| from | to | subject | body |
|
||||
| john.doe@mail.com | user@pm.me | foo | hello |
|
||||
| jane.doe@mail.com | name@pm.me | bar | world |
|
||||
And there is IMAP client logged in as "user"
|
||||
And there is IMAP client selected in "INBOX"
|
||||
|
||||
@ignore
|
||||
Scenario: Move message
|
||||
When IMAP client moves messages "1" to "Folders/mbox"
|
||||
Then IMAP response is "OK"
|
||||
And mailbox "INBOX" for "user" has messages
|
||||
| from | to | subject |
|
||||
| jane.doe@mail.com | name@pm.me | bar |
|
||||
And mailbox "Folders/mbox" for "user" has messages
|
||||
| from | to | subject |
|
||||
| john.doe@mail.com | user@pm.me | foo |
|
||||
|
||||
@ignore
|
||||
Scenario: Move all messages
|
||||
When IMAP client moves messages "1:*" to "Folders/mbox"
|
||||
Then IMAP response is "OK"
|
||||
And mailbox "INBOX" for "user" has 0 messages
|
||||
And mailbox "Folders/mbox" for "user" has messages
|
||||
| from | to | subject |
|
||||
| john.doe@mail.com | user@pm.me | foo |
|
||||
| jane.doe@mail.com | name@pm.me | bar |
|
||||
|
||||
@ignore
|
||||
Scenario: Move message to All Mail
|
||||
When IMAP client moves messages "1" to "All Mail"
|
||||
Then IMAP response is "OK"
|
||||
And mailbox "INBOX" for "user" has messages
|
||||
| from | to | subject |
|
||||
| jane.doe@mail.com | name@pm.me | bar |
|
||||
And mailbox "All Mail" for "user" has messages
|
||||
| from | to | subject |
|
||||
| john.doe@mail.com | user@pm.me | foo |
|
||||
|
||||
@ignore
|
||||
Scenario: Move message from All Mail is not possible
|
||||
When IMAP client moves messages "1" to "Folders/mbox"
|
||||
Then IMAP response is "OK"
|
||||
And mailbox "All Mail" for "user" has messages
|
||||
| from | to | subject |
|
||||
| john.doe@mail.com | user@pm.me | foo |
|
||||
| jane.doe@mail.com | name@pm.me | bar |
|
||||
And mailbox "Folders/mbox" for "user" has messages
|
||||
| from | to | subject |
|
||||
| john.doe@mail.com | user@pm.me | foo |
|
||||
29
test/features/imap/message/search.feature
Normal file
29
test/features/imap/message/search.feature
Normal file
@ -0,0 +1,29 @@
|
||||
Feature: IMAP search messages
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
Given there are messages in mailbox "INBOX" for "user"
|
||||
| from | to | subject | body |
|
||||
| john.doe@mail.com | user@pm.me | foo | hello |
|
||||
| jane.doe@mail.com | name@pm.me | bar | world |
|
||||
And there is IMAP client logged in as "user"
|
||||
And there is IMAP client selected in "INBOX"
|
||||
|
||||
Scenario: Search by subject
|
||||
When IMAP client searches for "SUBJECT foo"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response has 1 message
|
||||
|
||||
Scenario: Search by text
|
||||
When IMAP client searches for "TEXT world"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response has 1 message
|
||||
|
||||
Scenario: Search by from
|
||||
When IMAP client searches for "FROM jane.doe@email.com"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response has 1 message
|
||||
|
||||
Scenario: Search by to
|
||||
When IMAP client searches for "TO user@pm.me"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response has 1 message
|
||||
35
test/features/imap/message/update.feature
Normal file
35
test/features/imap/message/update.feature
Normal file
@ -0,0 +1,35 @@
|
||||
Feature: IMAP update messages
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
And there are messages in mailbox "INBOX" for "user"
|
||||
| from | to | subject | body | read | starred |
|
||||
| john.doe@mail.com | user@pm.me | foo | hello | false | false |
|
||||
| jane.doe@mail.com | name@pm.me | bar | world | true | true |
|
||||
And there is IMAP client logged in as "user"
|
||||
And there is IMAP client selected in "INBOX"
|
||||
|
||||
Scenario: Mark message as read
|
||||
When IMAP client marks message "2" as read
|
||||
Then IMAP response is "OK"
|
||||
And message "1" in "INBOX" for "user" is marked as read
|
||||
And message "1" in "INBOX" for "user" is marked as unstarred
|
||||
|
||||
Scenario: Mark message as unread
|
||||
When IMAP client marks message "1" as unread
|
||||
Then IMAP response is "OK"
|
||||
And message "2" in "INBOX" for "user" is marked as unread
|
||||
And message "2" in "INBOX" for "user" is marked as starred
|
||||
|
||||
Scenario: Mark message as starred
|
||||
Then message "1" in "INBOX" for "user" is marked as unread
|
||||
And message "1" in "INBOX" for "user" is marked as unstarred
|
||||
When IMAP client marks message "2" as starred
|
||||
Then IMAP response is "OK"
|
||||
And message "1" in "INBOX" for "user" is marked as unread
|
||||
And message "1" in "INBOX" for "user" is marked as starred
|
||||
|
||||
Scenario: Mark message as unstarred
|
||||
When IMAP client marks message "1" as unstarred
|
||||
Then IMAP response is "OK"
|
||||
And message "2" in "INBOX" for "user" is marked as read
|
||||
And message "2" in "INBOX" for "user" is marked as unstarred
|
||||
65
test/features/smtp/auth.feature
Normal file
65
test/features/smtp/auth.feature
Normal file
@ -0,0 +1,65 @@
|
||||
Feature: SMTP auth
|
||||
Scenario: Ask EHLO
|
||||
Given there is connected user "user"
|
||||
When SMTP client sends EHLO
|
||||
Then SMTP response is "OK"
|
||||
|
||||
Scenario: Authenticates successfully and EHLO successfully
|
||||
Given there is connected user "user"
|
||||
When SMTP client authenticates "user"
|
||||
Then SMTP response is "OK"
|
||||
When SMTP client sends EHLO
|
||||
Then SMTP response is "OK"
|
||||
|
||||
Scenario: Authenticates with bad password
|
||||
Given there is connected user "user"
|
||||
When SMTP client authenticates "user" with bad password
|
||||
Then SMTP response is "SMTP error: 454 backend/credentials: incorrect password"
|
||||
|
||||
Scenario: Authenticates with disconnected user
|
||||
Given there is disconnected user "user"
|
||||
When SMTP client authenticates "user"
|
||||
Then SMTP response is "SMTP error: 454 bridge account is logged out, use bridge to login again"
|
||||
|
||||
Scenario: Authenticates with no user
|
||||
When SMTP client authenticates with username "user@pm.me" and password "bridgepassword"
|
||||
Then SMTP response is "SMTP error: 454 user user@pm.me not found"
|
||||
|
||||
Scenario: Authenticates with capital letter
|
||||
Given there is connected user "userAddressWithCapitalLetter"
|
||||
When SMTP client authenticates "userAddressWithCapitalLetter"
|
||||
Then SMTP response is "OK"
|
||||
|
||||
Scenario: Authenticates with more addresses - primary one
|
||||
Given there is connected user "userMoreAddresses"
|
||||
When SMTP client authenticates "userMoreAddresses" with address "primary"
|
||||
Then SMTP response is "OK"
|
||||
|
||||
Scenario: Authenticates with more addresses - secondary one
|
||||
Given there is connected user "userMoreAddresses"
|
||||
When SMTP client authenticates "userMoreAddresses" with address "secondary"
|
||||
Then SMTP response is "OK"
|
||||
|
||||
Scenario: Authenticates with more addresses - disabled address
|
||||
Given there is connected user "userMoreAddresses"
|
||||
When SMTP client authenticates "userMoreAddresses" with address "disabled"
|
||||
Then SMTP response is "SMTP error: 454 user .* not found"
|
||||
|
||||
@ignore-live
|
||||
Scenario: Authenticates with disabled primary address
|
||||
Given there is connected user "userDisabledPrimaryAddress"
|
||||
When SMTP client authenticates "userDisabledPrimaryAddress" with address "primary"
|
||||
Then SMTP response is "OK"
|
||||
|
||||
Scenario: Authenticates two users
|
||||
Given there is connected user "user"
|
||||
And there is connected user "userMoreAddresses"
|
||||
When SMTP client "smtp1" authenticates "user"
|
||||
Then SMTP response to "smtp1" is "OK"
|
||||
When SMTP client "smtp2" authenticates "userMoreAddresses" with address "primary"
|
||||
Then SMTP response to "smtp2" is "OK"
|
||||
|
||||
Scenario: Logs out user
|
||||
Given there is connected user "user"
|
||||
When SMTP client logs out
|
||||
Then SMTP response is "OK"
|
||||
69
test/features/smtp/send/bcc.feature
Normal file
69
test/features/smtp/send/bcc.feature
Normal file
@ -0,0 +1,69 @@
|
||||
Feature: SMTP with bcc
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
And there is SMTP client logged in as "user"
|
||||
|
||||
Scenario: Send message to address in to and bcc
|
||||
When SMTP client sends message with bcc "bridgetest2@protonmail.com"
|
||||
"""
|
||||
Subject: hello
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: Internal Bridge <bridgetest@protonmail.com>
|
||||
|
||||
hello
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | bridgetest@protonmail.com | hello |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
"Message": {
|
||||
"Subject": "hello",
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "bridgetest@protonmail.com",
|
||||
"Name": "Internal Bridge"
|
||||
}
|
||||
],
|
||||
"CCList": [],
|
||||
"BCCList": [
|
||||
{
|
||||
"Address": "bridgetest2@protonmail.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
Scenario: Send message only to bcc
|
||||
When SMTP client sends message with bcc "bridgetest@protonmail.com"
|
||||
"""
|
||||
Subject: hello
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
|
||||
hello
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | | hello |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
"Message": {
|
||||
"Subject": "hello",
|
||||
"ToList": [],
|
||||
"CCList": [],
|
||||
"BCCList": [
|
||||
{
|
||||
"Address": "bridgetest@protonmail.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
"""
|
||||
56
test/features/smtp/send/failures.feature
Normal file
56
test/features/smtp/send/failures.feature
Normal file
@ -0,0 +1,56 @@
|
||||
Feature: SMTP wrong messages
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
And there is SMTP client logged in as "user"
|
||||
|
||||
Scenario: Message with no charset and bad character
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: External Bridge <pm.bridge.qa@gmail.com>
|
||||
Subject: Plain text, no charset, wrong base64 external
|
||||
Content-Disposition: inline
|
||||
Content-Type: text/plain;
|
||||
Content-Transfer-Encoding: base64
|
||||
|
||||
sdfsdfsd
|
||||
|
||||
"""
|
||||
Then SMTP response is "SMTP error: 554 Error: transaction failed, blame it on the weather: non-utf8 content without charset specification"
|
||||
|
||||
Scenario: Message with attachment and wrong boundaries
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: Internal Bridge <bridgetest@protonmail.com>
|
||||
Subject: With attachment (wrong boundaries)
|
||||
Content-Type: multipart/related; boundary=bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
|
||||
--bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
Content-Disposition: inline
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
|
||||
This is body of mail with attachment
|
||||
|
||||
--bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
Content-Disposition: attachment; filename=outline-light-instagram-48.png
|
||||
Content-Id: <9114fe6f0adfaf7fdf7a@protonmail.com>
|
||||
Content-Transfer-Encoding: base64
|
||||
Content-Type: image/png
|
||||
|
||||
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEUAAAD/////////////////
|
||||
//////////////////////////////////////+hSKubAAAADnRSTlMAgO8QQM+/IJ9gj1AwcIQd
|
||||
OXUAAAGdSURBVDjLXJC9SgNBFIVPXDURTYhgIQghINgowyLYCAYtRFAIgtYhpAjYhC0srCRW6YIg
|
||||
WNpoHVSsg/gEii+Qnfxq4DyDc3cyMfrBwl2+O+fOHTi8p7LS5RUf/9gpMKL7iT9sK47Q95ggpkzv
|
||||
1cvRcsGYNMYsmP+zKN27NR2vcDyTNVdfkOuuniNPMWafvIbljt+YoMEvW8y7lt+ARwhvrgPjhA0I
|
||||
BTng7S1GLPlypBvtIBPidY4YBDJFdtnkscQ5JGaGqxC9i7jSDwcwnB8qHWBaQjw1ABI8wYgtVoG6
|
||||
9pFkH8iZIiJeulFt4JLvJq8I5N2GMWYbHWDWzM3JZTMdeSWla0kW86FcuI0mfStiNKQ/AhEeh8h0
|
||||
YUTffFwrMTT5oSwdojIQ0UKcocgAKRH1HiqhFQmmJa5qRaYHNbRiSsOgslY0NdixItUTUWlZkedP
|
||||
HXVyAgAIA1F0wP5btQZPIyTwvAqa/Fl4oacuP+e4XHAjSYpkQkxSiMX+T7FPoZJToSStzED70HCy
|
||||
KE3NGCg4jJrC6Ti7AFwZLhnW0gMbzFZc0RmmeAAAAABJRU5ErkJggg==
|
||||
--bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
|
||||
|
||||
"""
|
||||
Then SMTP response is "SMTP error: 554 Error: transaction failed, blame it on the weather: multipart: NextPart: EOF"
|
||||
297
test/features/smtp/send/html.feature
Normal file
297
test/features/smtp/send/html.feature
Normal file
@ -0,0 +1,297 @@
|
||||
Feature: SMTP sending of HTML messages
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
And there is SMTP client logged in as "user"
|
||||
|
||||
Scenario: HTML message to external account
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: External Bridge <pm.bridge.qa@gmail.com>
|
||||
Subject: HTML text external
|
||||
Content-Disposition: inline
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
Content-Type: text/html; charset=utf-8
|
||||
In-Reply-To: base64hashOfSomeMessage@protonmail.internalID
|
||||
References: base64hashOfSomeConversation@protonmail.internalID base64hashOfSomeConversation@protonmail.conversationID
|
||||
|
||||
<html><body>This is body of <b>HTML mail</b> without attachment<body></html>
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | pm.bridge.qa@gmail.com | HTML text external |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
"Message": {
|
||||
"Subject": "HTML text external",
|
||||
"Sender": {
|
||||
"Name": "Bridge Test"
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "pm.bridge.qa@gmail.com",
|
||||
"Name": "External Bridge"
|
||||
}
|
||||
],
|
||||
"CCList": [],
|
||||
"BCCList": [],
|
||||
"MIMEType": "text/html"
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
Scenario: HTML message with inline image to external account
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: External Bridge <pm.bridge.qa@gmail.com>
|
||||
Subject: Html Inline External
|
||||
Content-Disposition: inline
|
||||
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0
|
||||
MIME-Version: 1.0
|
||||
Content-Language: en-US
|
||||
Content-Type: multipart/related; boundary="------------61FA22A41A3F46E8E90EF528"
|
||||
|
||||
This is a multi-part message in MIME format.
|
||||
--------------61FA22A41A3F46E8E90EF528
|
||||
Content-Type: text/html; charset=utf-8
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
</head>
|
||||
<body text="#000000" bgcolor="#FFFFFF">
|
||||
<p><br>
|
||||
</p>
|
||||
<p>Behold! An inline <img moz-do-not-send="false"
|
||||
src="cid:part1.D96BFAE9.E2E1CAE3@protonmail.com" alt=""
|
||||
width="24" height="24"><br>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
--------------61FA22A41A3F46E8E90EF528
|
||||
Content-Type: image/gif; name="email-action-left.gif"
|
||||
Content-Transfer-Encoding: base64
|
||||
Content-ID: <part1.D96BFAE9.E2E1CAE3@protonmail.com>
|
||||
Content-Disposition: inline; filename="email-action-left.gif"
|
||||
|
||||
R0lGODlhGAAYANUAACcsKOHs4kppTH6tgYWxiIq0jTVENpG5lDI/M7bRuEaJSkqOTk2RUU+P
|
||||
U16lYl+lY2iva262cXS6d3rDfYLNhWeeamKTZGSVZkNbRGqhbOPt4////+7u7qioqFZWVlNT
|
||||
UyIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAGAAYAAAG
|
||||
/8CNcLjRJAqVRqNSSGiI0GFgoKhar4NAdHioMhyRCYUyiTgY1cOWUH1ILgIDAGAQXCSPKgHa
|
||||
XUAyGCCCg4IYGRALCmpCAVUQFgiEkiAIFhBVWhtUDxmRk5IIGXkDRQoMEoGfHpIYEmhGCg4X
|
||||
nyAdHB+SFw4KRwoRArQdG7eEAhEKSAoTBoIdzs/Cw7iCBhMKSQoUAIJbQ8QgABQKStnbIN1C
|
||||
3+HjFcrMtdDO6dMg1dcFvsCfwt+CxsgJYs3a10+QLl4aTKGitYpQq1eaFHDyREtQqFGMHEGq
|
||||
SMkSJi4K/ACiZQiRIihsJL6JM6fOnTwK9kTpYgqMGDJm0JzsNuWKTw0FWdANMYJECRMnW4IA
|
||||
ADs=
|
||||
--------------61FA22A41A3F46E8E90EF528--
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | pm.bridge.qa@gmail.com | Html Inline External |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
"Message": {
|
||||
"Subject": "Html Inline External",
|
||||
"Sender": {
|
||||
"Name": "Bridge Test"
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "pm.bridge.qa@gmail.com",
|
||||
"Name": "External Bridge"
|
||||
}
|
||||
],
|
||||
"CCList": [],
|
||||
"BCCList": [],
|
||||
"MIMEType": "text/html"
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
Scenario: HTML message with alternative inline to internal account
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: Internal Bridge <bridgetest@protonmail.com>
|
||||
Subject: Html Inline Alternative Internal
|
||||
Content-Disposition: inline
|
||||
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0
|
||||
MIME-Version: 1.0
|
||||
Content-Type: multipart/alternative; boundary="------------5A259F4DE164B5ADA313F644"
|
||||
Content-Language: en-US
|
||||
|
||||
This is a multi-part message in MIME format.
|
||||
--------------5A259F4DE164B5ADA313F644
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
|
||||
Behold! An inline
|
||||
|
||||
|
||||
--------------5A259F4DE164B5ADA313F644
|
||||
Content-Type: multipart/related; boundary="------------61FA22A41A3F46E8E90EF528"
|
||||
|
||||
|
||||
--------------61FA22A41A3F46E8E90EF528
|
||||
Content-Type: text/html; charset=utf-8
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
</head>
|
||||
<body text="#000000" bgcolor="#FFFFFF">
|
||||
<p><br>
|
||||
</p>
|
||||
<p>Behold! An inline <img moz-do-not-send="false"
|
||||
src="cid:part1.D96BFAE9.E2E1CAE3@protonmail.com" alt=""
|
||||
width="24" height="24"><br>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
--------------61FA22A41A3F46E8E90EF528
|
||||
Content-Type: image/gif; name="email-action-left.gif"
|
||||
Content-Transfer-Encoding: base64
|
||||
Content-ID: <part1.D96BFAE9.E2E1CAE3@protonmail.com>
|
||||
Content-Disposition: inline; filename="email-action-left.gif"
|
||||
|
||||
R0lGODlhGAAYANUAACcsKOHs4kppTH6tgYWxiIq0jTVENpG5lDI/M7bRuEaJSkqOTk2RUU+P
|
||||
U16lYl+lY2iva262cXS6d3rDfYLNhWeeamKTZGSVZkNbRGqhbOPt4////+7u7qioqFZWVlNT
|
||||
UyIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAGAAYAAAG
|
||||
/8CNcLjRJAqVRqNSSGiI0GFgoKhar4NAdHioMhyRCYUyiTgY1cOWUH1ILgIDAGAQXCSPKgHa
|
||||
XUAyGCCCg4IYGRALCmpCAVUQFgiEkiAIFhBVWhtUDxmRk5IIGXkDRQoMEoGfHpIYEmhGCg4X
|
||||
nyAdHB+SFw4KRwoRArQdG7eEAhEKSAoTBoIdzs/Cw7iCBhMKSQoUAIJbQ8QgABQKStnbIN1C
|
||||
3+HjFcrMtdDO6dMg1dcFvsCfwt+CxsgJYs3a10+QLl4aTKGitYpQq1eaFHDyREtQqFGMHEGq
|
||||
SMkSJi4K/ACiZQiRIihsJL6JM6fOnTwK9kTpYgqMGDJm0JzsNuWKTw0FWdANMYJECRMnW4IA
|
||||
ADs=
|
||||
--------------61FA22A41A3F46E8E90EF528--
|
||||
|
||||
--------------5A259F4DE164B5ADA313F644--
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | bridgetest@protonmail.com | Html Inline Alternative Internal |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
"Message": {
|
||||
"Subject": "Html Inline Alternative Internal",
|
||||
"Sender": {
|
||||
"Name": "Bridge Test"
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "bridgetest@protonmail.com",
|
||||
"Name": "Internal Bridge"
|
||||
}
|
||||
],
|
||||
"CCList": [],
|
||||
"BCCList": [],
|
||||
"MIMEType": "text/html"
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
Scenario: HTML message with alternative inline to external account
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: External Bridge <pm.bridge.qa@gmail.com>
|
||||
Subject: Html Inline Alternative External
|
||||
Content-Disposition: inline
|
||||
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0
|
||||
MIME-Version: 1.0
|
||||
Content-Type: multipart/alternative; boundary="------------5A259F4DE164B5ADA313F644"
|
||||
Content-Language: en-US
|
||||
|
||||
This is a multi-part message in MIME format.
|
||||
--------------5A259F4DE164B5ADA313F644
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
|
||||
Behold! An inline
|
||||
|
||||
|
||||
--------------5A259F4DE164B5ADA313F644
|
||||
Content-Type: multipart/related; boundary="------------61FA22A41A3F46E8E90EF528"
|
||||
|
||||
|
||||
--------------61FA22A41A3F46E8E90EF528
|
||||
Content-Type: text/html; charset=utf-8
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
</head>
|
||||
<body text="#000000" bgcolor="#FFFFFF">
|
||||
<p><br>
|
||||
</p>
|
||||
<p>Behold! An inline <img moz-do-not-send="false"
|
||||
src="cid:part1.D96BFAE9.E2E1CAE3@protonmail.com" alt=""
|
||||
width="24" height="24"><br>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
--------------61FA22A41A3F46E8E90EF528
|
||||
Content-Type: image/gif; name="email-action-left.gif"
|
||||
Content-Transfer-Encoding: base64
|
||||
Content-ID: <part1.D96BFAE9.E2E1CAE3@protonmail.com>
|
||||
Content-Disposition: inline; filename="email-action-left.gif"
|
||||
|
||||
R0lGODlhGAAYANUAACcsKOHs4kppTH6tgYWxiIq0jTVENpG5lDI/M7bRuEaJSkqOTk2RUU+P
|
||||
U16lYl+lY2iva262cXS6d3rDfYLNhWeeamKTZGSVZkNbRGqhbOPt4////+7u7qioqFZWVlNT
|
||||
UyIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAGAAYAAAG
|
||||
/8CNcLjRJAqVRqNSSGiI0GFgoKhar4NAdHioMhyRCYUyiTgY1cOWUH1ILgIDAGAQXCSPKgHa
|
||||
XUAyGCCCg4IYGRALCmpCAVUQFgiEkiAIFhBVWhtUDxmRk5IIGXkDRQoMEoGfHpIYEmhGCg4X
|
||||
nyAdHB+SFw4KRwoRArQdG7eEAhEKSAoTBoIdzs/Cw7iCBhMKSQoUAIJbQ8QgABQKStnbIN1C
|
||||
3+HjFcrMtdDO6dMg1dcFvsCfwt+CxsgJYs3a10+QLl4aTKGitYpQq1eaFHDyREtQqFGMHEGq
|
||||
SMkSJi4K/ACiZQiRIihsJL6JM6fOnTwK9kTpYgqMGDJm0JzsNuWKTw0FWdANMYJECRMnW4IA
|
||||
ADs=
|
||||
--------------61FA22A41A3F46E8E90EF528--
|
||||
|
||||
--------------5A259F4DE164B5ADA313F644--
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | pm.bridge.qa@gmail.com | Html Inline Alternative External |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
"Message": {
|
||||
"Subject": "Html Inline Alternative External",
|
||||
"Sender": {
|
||||
"Name": "Bridge Test"
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "pm.bridge.qa@gmail.com",
|
||||
"Name": "External Bridge"
|
||||
}
|
||||
],
|
||||
"CCList": [],
|
||||
"BCCList": [],
|
||||
"MIMEType": "text/html"
|
||||
}
|
||||
}
|
||||
"""
|
||||
122
test/features/smtp/send/html_att.feature
Normal file
122
test/features/smtp/send/html_att.feature
Normal file
@ -0,0 +1,122 @@
|
||||
Feature: SMTP sending of HTML messages with attachments
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
And there is SMTP client logged in as "user"
|
||||
|
||||
Scenario: HTML message with attachment to internal account
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: Internal Bridge <bridgetest@protonmail.com>
|
||||
Subject: HTML with attachment internal
|
||||
Content-Type: multipart/related; boundary=bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
|
||||
--bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
Content-Disposition: inline
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
Content-Type: text/html; charset=utf-8
|
||||
|
||||
<html><body>This is body of <b>HTML mail</b> with attachment<body></html>
|
||||
|
||||
--bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
Content-Disposition: attachment; filename=outline-light-instagram-48.png
|
||||
Content-Id: <9114fe6f0adfaf7fdf7a@protonmail.com>
|
||||
Content-Transfer-Encoding: base64
|
||||
Content-Type: image/png
|
||||
|
||||
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEUAAAD/////////////////
|
||||
//////////////////////////////////////+hSKubAAAADnRSTlMAgO8QQM+/IJ9gj1AwcIQd
|
||||
OXUAAAGdSURBVDjLXJC9SgNBFIVPXDURTYhgIQghINgowyLYCAYtRFAIgtYhpAjYhC0srCRW6YIg
|
||||
WNpoHVSsg/gEii+Qnfxq4DyDc3cyMfrBwl2+O+fOHTi8p7LS5RUf/9gpMKL7iT9sK47Q95ggpkzv
|
||||
1cvRcsGYNMYsmP+zKN27NR2vcDyTNVdfkOuuniNPMWafvIbljt+YoMEvW8y7lt+ARwhvrgPjhA0I
|
||||
BTng7S1GLPlypBvtIBPidY4YBDJFdtnkscQ5JGaGqxC9i7jSDwcwnB8qHWBaQjw1ABI8wYgtVoG6
|
||||
9pFkH8iZIiJeulFt4JLvJq8I5N2GMWYbHWDWzM3JZTMdeSWla0kW86FcuI0mfStiNKQ/AhEeh8h0
|
||||
YUTffFwrMTT5oSwdojIQ0UKcocgAKRH1HiqhFQmmJa5qRaYHNbRiSsOgslY0NdixItUTUWlZkedP
|
||||
HXVyAgAIA1F0wP5btQZPIyTwvAqa/Fl4oacuP+e4XHAjSYpkQkxSiMX+T7FPoZJToSStzED70HCy
|
||||
KE3NGCg4jJrC6Ti7AFwZLhnW0gMbzFZc0RmmeAAAAABJRU5ErkJggg==
|
||||
--bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606--
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | bridgetest@protonmail.com | HTML with attachment internal |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
"Message": {
|
||||
"Subject": "HTML with attachment internal",
|
||||
"Sender": {
|
||||
"Name": "Bridge Test"
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "bridgetest@protonmail.com",
|
||||
"Name": "Internal Bridge"
|
||||
}
|
||||
],
|
||||
"CCList": [],
|
||||
"BCCList": [],
|
||||
"MIMEType": "text/html"
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
Scenario: HTML message with attachment to external account
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: External Bridge <pm.bridge.qa@gmail.com>
|
||||
Subject: HTML with attachment external PGP
|
||||
Content-Type: multipart/mixed; boundary=bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
|
||||
--bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
Content-Disposition: inline
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
Content-Type: text/html; charset=utf-8
|
||||
|
||||
<html><body>This is body of <b>HTML mail</b> with attachment<body></html>
|
||||
|
||||
--bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
Content-Disposition: attachment; filename=outline-light-instagram-48.png
|
||||
Content-Id: <9114fe6f0adfaf7fdf7a@protonmail.com>
|
||||
Content-Transfer-Encoding: base64
|
||||
Content-Type: image/png
|
||||
|
||||
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEUAAAD/////////////////
|
||||
//////////////////////////////////////+hSKubAAAADnRSTlMAgO8QQM+/IJ9gj1AwcIQd
|
||||
OXUAAAGdSURBVDjLXJC9SgNBFIVPXDURTYhgIQghINgowyLYCAYtRFAIgtYhpAjYhC0srCRW6YIg
|
||||
WNpoHVSsg/gEii+Qnfxq4DyDc3cyMfrBwl2+O+fOHTi8p7LS5RUf/9gpMKL7iT9sK47Q95ggpkzv
|
||||
1cvRcsGYNMYsmP+zKN27NR2vcDyTNVdfkOuuniNPMWafvIbljt+YoMEvW8y7lt+ARwhvrgPjhA0I
|
||||
BTng7S1GLPlypBvtIBPidY4YBDJFdtnkscQ5JGaGqxC9i7jSDwcwnB8qHWBaQjw1ABI8wYgtVoG6
|
||||
9pFkH8iZIiJeulFt4JLvJq8I5N2GMWYbHWDWzM3JZTMdeSWla0kW86FcuI0mfStiNKQ/AhEeh8h0
|
||||
YUTffFwrMTT5oSwdojIQ0UKcocgAKRH1HiqhFQmmJa5qRaYHNbRiSsOgslY0NdixItUTUWlZkedP
|
||||
HXVyAgAIA1F0wP5btQZPIyTwvAqa/Fl4oacuP+e4XHAjSYpkQkxSiMX+T7FPoZJToSStzED70HCy
|
||||
KE3NGCg4jJrC6Ti7AFwZLhnW0gMbzFZc0RmmeAAAAABJRU5ErkJggg==
|
||||
--bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606--
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | pm.bridge.qa@gmail.com | HTML with attachment external PGP |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
"Message": {
|
||||
"Subject": "HTML with attachment external PGP",
|
||||
"Sender": {
|
||||
"Name": "Bridge Test"
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "pm.bridge.qa@gmail.com",
|
||||
"Name": "External Bridge"
|
||||
}
|
||||
],
|
||||
"CCList": [],
|
||||
"BCCList": [],
|
||||
"MIMEType": "text/html"
|
||||
}
|
||||
}
|
||||
"""
|
||||
218
test/features/smtp/send/plain.feature
Normal file
218
test/features/smtp/send/plain.feature
Normal file
@ -0,0 +1,218 @@
|
||||
Feature: SMTP sending of plain messages
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
And there is SMTP client logged in as "user"
|
||||
|
||||
Scenario: Only from and to headers to internal account
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: Internal Bridge <bridgetest@protonmail.com>
|
||||
|
||||
hello
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | bridgetest@protonmail.com | |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
"Message": {
|
||||
"Subject": "",
|
||||
"Sender": {
|
||||
"Name": "Bridge Test"
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "bridgetest@protonmail.com",
|
||||
"Name": "Internal Bridge"
|
||||
}
|
||||
],
|
||||
"CCList": [],
|
||||
"BCCList": [],
|
||||
"MIMEType": "text/plain"
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
Scenario: Only from and to headers to external account
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: External Bridge <pm.bridge.qa@gmail.com>
|
||||
|
||||
hello
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | pm.bridge.qa@gmail.com | |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
"Message": {
|
||||
"Subject": "",
|
||||
"Sender": {
|
||||
"Name": "Bridge Test"
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "pm.bridge.qa@gmail.com",
|
||||
"Name": "External Bridge"
|
||||
}
|
||||
],
|
||||
"CCList": [],
|
||||
"BCCList": [],
|
||||
"MIMEType": "text/plain"
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
Scenario: Basic message to internal account
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: Internal Bridge <bridgetest@protonmail.com>
|
||||
Subject: Plain text internal
|
||||
Content-Disposition: inline
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
|
||||
This is body of mail 👋
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | bridgetest@protonmail.com | Plain text internal |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
"Message": {
|
||||
"Subject": "Plain text internal",
|
||||
"Sender": {
|
||||
"Name": "Bridge Test"
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "bridgetest@protonmail.com",
|
||||
"Name": "Internal Bridge"
|
||||
}
|
||||
],
|
||||
"CCList": [],
|
||||
"BCCList": [],
|
||||
"MIMEType": "text/plain"
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
Scenario: Basic message to external account
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: External Bridge <pm.bridge.qa@gmail.com>
|
||||
Subject: Plain text external
|
||||
Content-Disposition: inline
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
|
||||
This is body of mail 👋
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | pm.bridge.qa@gmail.com | Plain text external |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
"Message": {
|
||||
"Subject": "Plain text external",
|
||||
"Sender": {
|
||||
"Name": "Bridge Test"
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "pm.bridge.qa@gmail.com",
|
||||
"Name": "External Bridge"
|
||||
}
|
||||
],
|
||||
"CCList": [],
|
||||
"BCCList": [],
|
||||
"MIMEType": "text/plain"
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
Scenario: Message without charset
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: External Bridge <pm.bridge.qa@gmail.com>
|
||||
Subject: Plain text no charset external
|
||||
Content-Disposition: inline
|
||||
Content-Type: text/plain;
|
||||
|
||||
This is body of mail without charset. Please assume utf8
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | pm.bridge.qa@gmail.com | Plain text no charset external |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
"Message": {
|
||||
"Subject": "Plain text no charset external",
|
||||
"Sender": {
|
||||
"Name": "Bridge Test"
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "pm.bridge.qa@gmail.com",
|
||||
"Name": "External Bridge"
|
||||
}
|
||||
],
|
||||
"CCList": [],
|
||||
"BCCList": [],
|
||||
"MIMEType": "text/plain"
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
Scenario: Message without charset and content is detected as HTML
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: External Bridge <pm.bridge.qa@gmail.com>
|
||||
Subject: Plain, no charset, no content, external
|
||||
Content-Disposition: inline
|
||||
Content-Type: text/plain;
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | pm.bridge.qa@gmail.com | Plain, no charset, no content, external |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
"Message": {
|
||||
"Subject": "Plain, no charset, no content, external",
|
||||
"Sender": {
|
||||
"Name": "Bridge Test"
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "pm.bridge.qa@gmail.com",
|
||||
"Name": "External Bridge"
|
||||
}
|
||||
],
|
||||
"CCList": [],
|
||||
"BCCList": [],
|
||||
"MIMEType": "text/html"
|
||||
}
|
||||
}
|
||||
"""
|
||||
187
test/features/smtp/send/plain_att.feature
Normal file
187
test/features/smtp/send/plain_att.feature
Normal file
@ -0,0 +1,187 @@
|
||||
Feature: SMTP sending of plain messages with attachments
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
And there is SMTP client logged in as "user"
|
||||
|
||||
Scenario: Basic message with attachment to internal account
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: Internal Bridge <bridgetest@protonmail.com>
|
||||
Subject: Plain with attachment
|
||||
Content-Type: multipart/related; boundary=bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
|
||||
--bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
Content-Disposition: inline
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
|
||||
This is body of mail with attachment
|
||||
|
||||
--bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
Content-Disposition: attachment; filename=outline-light-instagram-48.png
|
||||
Content-Id: <9114fe6f0adfaf7fdf7a@protonmail.com>
|
||||
Content-Transfer-Encoding: base64
|
||||
Content-Type: image/png
|
||||
|
||||
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEUAAAD/////////////////
|
||||
//////////////////////////////////////+hSKubAAAADnRSTlMAgO8QQM+/IJ9gj1AwcIQd
|
||||
OXUAAAGdSURBVDjLXJC9SgNBFIVPXDURTYhgIQghINgowyLYCAYtRFAIgtYhpAjYhC0srCRW6YIg
|
||||
WNpoHVSsg/gEii+Qnfxq4DyDc3cyMfrBwl2+O+fOHTi8p7LS5RUf/9gpMKL7iT9sK47Q95ggpkzv
|
||||
1cvRcsGYNMYsmP+zKN27NR2vcDyTNVdfkOuuniNPMWafvIbljt+YoMEvW8y7lt+ARwhvrgPjhA0I
|
||||
BTng7S1GLPlypBvtIBPidY4YBDJFdtnkscQ5JGaGqxC9i7jSDwcwnB8qHWBaQjw1ABI8wYgtVoG6
|
||||
9pFkH8iZIiJeulFt4JLvJq8I5N2GMWYbHWDWzM3JZTMdeSWla0kW86FcuI0mfStiNKQ/AhEeh8h0
|
||||
YUTffFwrMTT5oSwdojIQ0UKcocgAKRH1HiqhFQmmJa5qRaYHNbRiSsOgslY0NdixItUTUWlZkedP
|
||||
HXVyAgAIA1F0wP5btQZPIyTwvAqa/Fl4oacuP+e4XHAjSYpkQkxSiMX+T7FPoZJToSStzED70HCy
|
||||
KE3NGCg4jJrC6Ti7AFwZLhnW0gMbzFZc0RmmeAAAAABJRU5ErkJggg==
|
||||
--bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606--
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | bridgetest@protonmail.com | Plain with attachment |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
"Message": {
|
||||
"Subject": "Plain with attachment",
|
||||
"Sender": {
|
||||
"Name": "Bridge Test"
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "bridgetest@protonmail.com",
|
||||
"Name": "Internal Bridge"
|
||||
}
|
||||
],
|
||||
"CCList": [],
|
||||
"BCCList": [],
|
||||
"MIMEType": "text/plain"
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
Scenario: Plain message with attachment to external account
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: External Bridge <pm.bridge.qa@gmail.com>
|
||||
Subject: Plain with attachment external
|
||||
Content-Type: multipart/related; boundary=bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
|
||||
--bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
Content-Disposition: inline
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
|
||||
This is body of mail with attachment
|
||||
|
||||
--bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
Content-Disposition: attachment; filename=outline-light-instagram-48.png
|
||||
Content-Id: <9114fe6f0adfaf7fdf7a@protonmail.com>
|
||||
Content-Transfer-Encoding: base64
|
||||
Content-Type: image/png
|
||||
|
||||
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEUAAAD/////////////////
|
||||
//////////////////////////////////////+hSKubAAAADnRSTlMAgO8QQM+/IJ9gj1AwcIQd
|
||||
OXUAAAGdSURBVDjLXJC9SgNBFIVPXDURTYhgIQghINgowyLYCAYtRFAIgtYhpAjYhC0srCRW6YIg
|
||||
WNpoHVSsg/gEii+Qnfxq4DyDc3cyMfrBwl2+O+fOHTi8p7LS5RUf/9gpMKL7iT9sK47Q95ggpkzv
|
||||
1cvRcsGYNMYsmP+zKN27NR2vcDyTNVdfkOuuniNPMWafvIbljt+YoMEvW8y7lt+ARwhvrgPjhA0I
|
||||
BTng7S1GLPlypBvtIBPidY4YBDJFdtnkscQ5JGaGqxC9i7jSDwcwnB8qHWBaQjw1ABI8wYgtVoG6
|
||||
9pFkH8iZIiJeulFt4JLvJq8I5N2GMWYbHWDWzM3JZTMdeSWla0kW86FcuI0mfStiNKQ/AhEeh8h0
|
||||
YUTffFwrMTT5oSwdojIQ0UKcocgAKRH1HiqhFQmmJa5qRaYHNbRiSsOgslY0NdixItUTUWlZkedP
|
||||
HXVyAgAIA1F0wP5btQZPIyTwvAqa/Fl4oacuP+e4XHAjSYpkQkxSiMX+T7FPoZJToSStzED70HCy
|
||||
KE3NGCg4jJrC6Ti7AFwZLhnW0gMbzFZc0RmmeAAAAABJRU5ErkJggg==
|
||||
--bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606--
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | pm.bridge.qa@gmail.com | Plain with attachment external |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
"Message": {
|
||||
"Subject": "Plain with attachment external",
|
||||
"Sender": {
|
||||
"Name": "Bridge Test"
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "pm.bridge.qa@gmail.com",
|
||||
"Name": "External Bridge"
|
||||
}
|
||||
],
|
||||
"CCList": [],
|
||||
"BCCList": [],
|
||||
"MIMEType": "text/plain"
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
Scenario: Plain message with attachment to two external accounts
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: External Bridge 1 <pm.bridge.qa@gmail.com>
|
||||
CC: External Bridge 2 <bridgeqa@seznam.cz>
|
||||
Subject: Plain with attachment external PGP and external CC
|
||||
Content-Type: multipart/mixed; boundary=bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
|
||||
--bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
Content-Disposition: inline
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
|
||||
This is body of mail with attachment
|
||||
|
||||
--bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
Content-Disposition: attachment; filename=outline-light-instagram-48.png
|
||||
Content-Id: <9114fe6f0adfaf7fdf7a@protonmail.com>
|
||||
Content-Transfer-Encoding: base64
|
||||
Content-Type: image/png
|
||||
|
||||
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEUAAAD/////////////////
|
||||
//////////////////////////////////////+hSKubAAAADnRSTlMAgO8QQM+/IJ9gj1AwcIQd
|
||||
OXUAAAGdSURBVDjLXJC9SgNBFIVPXDURTYhgIQghINgowyLYCAYtRFAIgtYhpAjYhC0srCRW6YIg
|
||||
WNpoHVSsg/gEii+Qnfxq4DyDc3cyMfrBwl2+O+fOHTi8p7LS5RUf/9gpMKL7iT9sK47Q95ggpkzv
|
||||
1cvRcsGYNMYsmP+zKN27NR2vcDyTNVdfkOuuniNPMWafvIbljt+YoMEvW8y7lt+ARwhvrgPjhA0I
|
||||
BTng7S1GLPlypBvtIBPidY4YBDJFdtnkscQ5JGaGqxC9i7jSDwcwnB8qHWBaQjw1ABI8wYgtVoG6
|
||||
9pFkH8iZIiJeulFt4JLvJq8I5N2GMWYbHWDWzM3JZTMdeSWla0kW86FcuI0mfStiNKQ/AhEeh8h0
|
||||
YUTffFwrMTT5oSwdojIQ0UKcocgAKRH1HiqhFQmmJa5qRaYHNbRiSsOgslY0NdixItUTUWlZkedP
|
||||
HXVyAgAIA1F0wP5btQZPIyTwvAqa/Fl4oacuP+e4XHAjSYpkQkxSiMX+T7FPoZJToSStzED70HCy
|
||||
KE3NGCg4jJrC6Ti7AFwZLhnW0gMbzFZc0RmmeAAAAABJRU5ErkJggg==
|
||||
--bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606--
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | cc | subject |
|
||||
| now | [userAddress] | pm.bridge.qa@gmail.com | bridgeqa@seznam.cz | Plain with attachment external PGP and external CC |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
"Message": {
|
||||
"Subject": "Plain with attachment external PGP and external CC",
|
||||
"Sender": {
|
||||
"Name": "Bridge Test"
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "pm.bridge.qa@gmail.com",
|
||||
"Name": "External Bridge 1"
|
||||
}
|
||||
],
|
||||
"CCList": [
|
||||
{
|
||||
"Address": "bridgeqa@seznam.cz",
|
||||
"Name": "External Bridge 2"
|
||||
}
|
||||
],
|
||||
"BCCList": [],
|
||||
"MIMEType": "text/plain"
|
||||
}
|
||||
}
|
||||
"""
|
||||
45
test/features/smtp/send/same_message.feature
Normal file
45
test/features/smtp/send/same_message.feature
Normal file
@ -0,0 +1,45 @@
|
||||
Feature: SMTP sending the same message twice
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
And there is SMTP client logged in as "user"
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: Internal Bridge <bridgetest@protonmail.com>
|
||||
Subject: Hello
|
||||
|
||||
World
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
|
||||
Scenario: The exact same message is not sent twice
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: Internal Bridge <bridgetest@protonmail.com>
|
||||
Subject: Hello
|
||||
|
||||
World
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | bridgetest@protonmail.com | Hello |
|
||||
|
||||
Scenario: Slight change means different message and is sent twice
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: Internal Bridge <bridgetest@protonmail.com>
|
||||
Subject: Hello.
|
||||
|
||||
World
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | bridgetest@protonmail.com | Hello |
|
||||
| now | [userAddress] | bridgetest@protonmail.com | Hello. |
|
||||
71
test/features/smtp/send/two_messages.feature
Normal file
71
test/features/smtp/send/two_messages.feature
Normal file
@ -0,0 +1,71 @@
|
||||
Feature: SMTP sending two messages
|
||||
Scenario: Send two messages in one connection
|
||||
Given there is connected user "user"
|
||||
And there is SMTP client logged in as "user"
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: Internal Bridge <bridgetest@protonmail.com>
|
||||
|
||||
hello
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
When SMTP client sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: Internal Bridge <bridgetest@protonmail.com>
|
||||
|
||||
world
|
||||
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
|
||||
Scenario: Send to two addresses
|
||||
Given there is connected user "userMoreAddresses"
|
||||
And there is "userMoreAddresses" in "split" address mode
|
||||
And there is SMTP client "smtp1" logged in as "userMoreAddresses" with address "primary"
|
||||
And there is SMTP client "smtp2" logged in as "userMoreAddresses" with address "secondary"
|
||||
When SMTP client "smtp1" sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: Internal Bridge <bridgetest@protonmail.com>
|
||||
|
||||
hello
|
||||
|
||||
"""
|
||||
Then SMTP response to "smtp1" is "OK"
|
||||
When SMTP client "smtp2" sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: Internal Bridge <bridgetest@protonmail.com>
|
||||
|
||||
world
|
||||
|
||||
"""
|
||||
Then SMTP response to "smtp2" is "OK"
|
||||
|
||||
Scenario: Send to two users
|
||||
Given there is connected user "user"
|
||||
And there is connected user "userMoreAddresses"
|
||||
And there is SMTP client "smtp1" logged in as "user"
|
||||
And there is SMTP client "smtp2" logged in as "userMoreAddresses"
|
||||
|
||||
When SMTP client "smtp1" sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: Internal Bridge <bridgetest@protonmail.com>
|
||||
|
||||
hello
|
||||
|
||||
"""
|
||||
Then SMTP response to "smtp1" is "OK"
|
||||
When SMTP client "smtp2" sends message
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: Internal Bridge <bridgetest@protonmail.com>
|
||||
|
||||
world
|
||||
|
||||
"""
|
||||
Then SMTP response to "smtp2" is "OK"
|
||||
Reference in New Issue
Block a user