mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 12:46:46 +00:00
GODT-2181(test): Use [user:NAME] for more test user names
This commit is contained in:
@ -21,6 +21,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/smtp"
|
||||
"net/url"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"strings"
|
||||
@ -71,6 +72,7 @@ type testCtx struct {
|
||||
|
||||
// These maps hold expected userIDByName, their primary addresses and bridge passwords.
|
||||
userUUIDByName map[string]string
|
||||
addrUUIDByName map[string]string
|
||||
userIDByName map[string]string
|
||||
userAddrByEmail map[string]map[string]string
|
||||
userPassByID map[string]string
|
||||
@ -114,6 +116,7 @@ func newTestCtx(tb testing.TB) *testCtx {
|
||||
reporter: newReportRecorder(tb),
|
||||
|
||||
userUUIDByName: make(map[string]string),
|
||||
addrUUIDByName: make(map[string]string),
|
||||
userIDByName: make(map[string]string),
|
||||
userAddrByEmail: make(map[string]map[string]string),
|
||||
userPassByID: make(map[string]string),
|
||||
@ -152,6 +155,23 @@ func (t *testCtx) replace(value string) string {
|
||||
return t.userUUIDByName[name]
|
||||
})
|
||||
|
||||
// Replace [addr:EMAIL] with a unique address for the email EMAIL.
|
||||
value = regexp.MustCompile(`\[addr:(\w+)\]`).ReplaceAllStringFunc(value, func(match string) string {
|
||||
email := regexp.MustCompile(`\[addr:(\w+)\]`).FindStringSubmatch(match)[1]
|
||||
|
||||
// Create a new address if it doesn't exist yet.
|
||||
if _, ok := t.addrUUIDByName[email]; !ok {
|
||||
t.addrUUIDByName[email] = uuid.NewString()
|
||||
}
|
||||
|
||||
return t.addrUUIDByName[email]
|
||||
})
|
||||
|
||||
// Replace {upper:VALUE} with VALUE in uppercase.
|
||||
value = regexp.MustCompile(`\{toUpper:([^}]+)\}`).ReplaceAllStringFunc(value, func(match string) string {
|
||||
return strings.ToUpper(regexp.MustCompile(`\{toUpper:([^}].+)\}`).FindStringSubmatch(match)[1])
|
||||
})
|
||||
|
||||
return value
|
||||
}
|
||||
|
||||
@ -285,8 +305,13 @@ func (t *testCtx) getLastCall(method, pathExp string) (server.Call, error) {
|
||||
t.callsLock.RLock()
|
||||
defer t.callsLock.RUnlock()
|
||||
|
||||
root, err := url.Parse(t.api.GetHostURL())
|
||||
if err != nil {
|
||||
return server.Call{}, err
|
||||
}
|
||||
|
||||
if matches := xslices.Filter(xslices.Join(t.calls...), func(call server.Call) bool {
|
||||
return call.Method == method && regexp.MustCompile("^"+pathExp+"$").MatchString(call.URL.Path)
|
||||
return call.Method == method && regexp.MustCompile("^"+pathExp+"$").MatchString(strings.TrimPrefix(call.URL.Path, root.Path))
|
||||
}); len(matches) > 0 {
|
||||
return matches[len(matches)-1], nil
|
||||
}
|
||||
|
||||
@ -1,30 +1,30 @@
|
||||
Feature: A user can authenticate an IMAP client
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
|
||||
Scenario: IMAP client can authenticate successfully
|
||||
When user "user" connects IMAP client "1"
|
||||
When user "[user:user]" connects IMAP client "1"
|
||||
Then IMAP client "1" can authenticate
|
||||
|
||||
Scenario: IMAP client can authenticate successfully with different case
|
||||
When user "user" connects IMAP client "1"
|
||||
Then IMAP client "1" can authenticate with address "USER@[domain]"
|
||||
When user "[user:user]" connects IMAP client "1"
|
||||
Then IMAP client "1" can authenticate with address "{toUpper:[user:user]@[domain]}"
|
||||
|
||||
Scenario: IMAP client can authenticate successfully
|
||||
When user "user" connects IMAP client "1"
|
||||
When user "[user:user]" connects IMAP client "1"
|
||||
Then IMAP client "1" can authenticate
|
||||
|
||||
Scenario: IMAP client cannot authenticate with bad username
|
||||
When user "user" connects IMAP client "1"
|
||||
When user "[user:user]" connects IMAP client "1"
|
||||
Then IMAP client "1" cannot authenticate with incorrect username
|
||||
|
||||
Scenario: IMAP client cannot authenticate with bad password
|
||||
When user "user" connects IMAP client "1"
|
||||
When user "[user:user]" connects IMAP client "1"
|
||||
Then IMAP client "1" cannot authenticate with incorrect password
|
||||
|
||||
Scenario: IMAP client cannot authenticate for disconnected user
|
||||
When user "user" logs out
|
||||
And user "user" connects IMAP client "1"
|
||||
When user "[user:user]" logs out
|
||||
And user "[user:user]" connects IMAP client "1"
|
||||
Then IMAP client "1" cannot authenticate
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
Feature: The IMAP ID is propagated to bridge
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
|
||||
Scenario: Initial user agent before an IMAP client announces its ID
|
||||
When user "user" connects IMAP client "1"
|
||||
When user "[user:user]" connects IMAP client "1"
|
||||
Then the user agent is "UnknownClient/0.0.1 ([GOOS])"
|
||||
|
||||
Scenario: User agent after an IMAP client announces its ID
|
||||
When user "user" connects IMAP client "1"
|
||||
When user "[user:user]" connects IMAP client "1"
|
||||
And IMAP client "1" announces its ID with name "name" and version "version"
|
||||
Then the user agent is "name/version ([GOOS])"
|
||||
|
||||
Scenario: User agent is used for API calls
|
||||
When user "user" connects IMAP client "1"
|
||||
When user "[user:user]" connects IMAP client "1"
|
||||
And IMAP client "1" announces its ID with name "name" and version "version"
|
||||
When the user reports a bug
|
||||
Then the header in the "POST" request to "/core/v4/reports/bug" has "User-Agent" set to "name/version ([GOOS])"
|
||||
@ -1,16 +1,16 @@
|
||||
Feature: IMAP create mailbox
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And the account "user" has the following custom mailboxes:
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And the account "[user:user]" has the following custom mailboxes:
|
||||
| name | type |
|
||||
| f1 | folder |
|
||||
| f2 | folder |
|
||||
| l1 | label |
|
||||
| l2 | label |
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
And user "user" connects and authenticates IMAP client "1"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
And user "[user:user]" connects and authenticates IMAP client "1"
|
||||
|
||||
Scenario: Create folder
|
||||
When IMAP client "1" creates "Folders/mbox"
|
||||
@ -85,10 +85,10 @@ Feature: IMAP create mailbox
|
||||
| Labels |
|
||||
| Labels/l1 |
|
||||
| Labels/l2 |
|
||||
When user "user" is deleted
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
And user "user" connects and authenticates IMAP client "2"
|
||||
When user "[user:user]" is deleted
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
And user "[user:user]" connects and authenticates IMAP client "2"
|
||||
Then IMAP client "2" sees the following mailbox info:
|
||||
| name |
|
||||
| INBOX |
|
||||
@ -163,10 +163,10 @@ Feature: IMAP create mailbox
|
||||
| Labels |
|
||||
| Labels/l1 |
|
||||
| Labels/l2 |
|
||||
When user "user" is deleted
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
And user "user" connects and authenticates IMAP client "2"
|
||||
When user "[user:user]" is deleted
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
And user "[user:user]" connects and authenticates IMAP client "2"
|
||||
Then IMAP client "2" sees the following mailbox info:
|
||||
| name |
|
||||
| INBOX |
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
Feature: IMAP delete mailbox
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And the account "user" has the following custom mailboxes:
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And the account "[user:user]" has the following custom mailboxes:
|
||||
| name | type |
|
||||
| one | folder |
|
||||
| two | folder |
|
||||
| three | label |
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
And user "user" connects and authenticates IMAP client "1"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
And user "[user:user]" connects and authenticates IMAP client "1"
|
||||
|
||||
Scenario: Delete folder
|
||||
When IMAP client "1" deletes "Folders/one"
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
Feature: IMAP Hide All Mail
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
And user "user" connects and authenticates IMAP client "1"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
And user "[user:user]" connects and authenticates IMAP client "1"
|
||||
|
||||
Scenario: Hide All Mail Mailbox
|
||||
Given IMAP client "1" sees the following mailbox info:
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
Feature: IMAP get mailbox info
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And the account "user" has the following custom mailboxes:
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And the account "[user:user]" has the following custom mailboxes:
|
||||
| name | type |
|
||||
| one | folder |
|
||||
And the address "user@[domain]" of account "user" has the following messages in "one":
|
||||
And the address "[user:user]@[domain]" of account "[user:user]" has the following messages in "one":
|
||||
| from | to | subject | unread |
|
||||
| a@[domain] | a@[domain] | one | true |
|
||||
| b@[domain] | b@[domain] | two | false |
|
||||
| a@example.com | a@example.com | one | true |
|
||||
| b@example.com | b@example.com | two | false |
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
|
||||
Scenario: Mailbox status reports correct name, total and unread
|
||||
When user "user" connects and authenticates IMAP client "1"
|
||||
When user "[user:user]" connects and authenticates IMAP client "1"
|
||||
Then IMAP client "1" sees the following mailbox info for "Folders/one":
|
||||
| name | total | unread |
|
||||
| Folders/one | 2 | 1 |
|
||||
@ -1,14 +1,14 @@
|
||||
Feature: IMAP list mailboxes
|
||||
Scenario: List mailboxes
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And the account "user" has the following custom mailboxes:
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And the account "[user:user]" has the following custom mailboxes:
|
||||
| name | type |
|
||||
| mbox1 | folder |
|
||||
| mbox2 | label |
|
||||
When bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
And user "user" connects and authenticates IMAP client "1"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
And user "[user:user]" connects and authenticates IMAP client "1"
|
||||
Then IMAP client "1" sees the following mailbox info:
|
||||
| name |
|
||||
| INBOX |
|
||||
@ -25,14 +25,14 @@ Feature: IMAP list mailboxes
|
||||
| Labels/mbox2 |
|
||||
|
||||
Scenario: List multiple times in parallel without crash
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And the account "user" has 20 custom folders
|
||||
And the account "user" has 60 custom labels
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And the account "[user:user]" has 20 custom folders
|
||||
And the account "[user:user]" has 60 custom labels
|
||||
When bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
When user "user" connects and authenticates IMAP client "1"
|
||||
And user "user" connects and authenticates IMAP client "2"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
When user "[user:user]" connects and authenticates IMAP client "1"
|
||||
And user "[user:user]" connects and authenticates IMAP client "2"
|
||||
Then IMAP client "1" counts 20 mailboxes under "Folders"
|
||||
And IMAP client "1" counts 60 mailboxes under "Labels"
|
||||
Then IMAP client "2" counts 20 mailboxes under "Folders"
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
Feature: IMAP get mailbox info
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And the account "user" has the following custom mailboxes:
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And the account "[user:user]" has the following custom mailboxes:
|
||||
| name | type |
|
||||
| f1 | folder |
|
||||
| l1 | label |
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
And user "user" connects and authenticates IMAP client "1"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
And user "[user:user]" connects and authenticates IMAP client "1"
|
||||
|
||||
Scenario: Rename folder
|
||||
When IMAP client "1" renames "Folders/f1" to "Folders/f2"
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
Feature: IMAP select mailbox
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And the account "user" has the following custom mailboxes:
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And the account "[user:user]" has the following custom mailboxes:
|
||||
| name | type |
|
||||
| mbox | folder |
|
||||
| label | label |
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
And user "user" connects and authenticates IMAP client "1"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
And user "[user:user]" connects and authenticates IMAP client "1"
|
||||
|
||||
Scenario: Select inbox
|
||||
When IMAP client "1" selects "INBOX"
|
||||
|
||||
@ -1,38 +1,38 @@
|
||||
Feature: IMAP copy messages
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And the account "user" has the following custom mailboxes:
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And the account "[user:user]" has the following custom mailboxes:
|
||||
| name | type |
|
||||
| mbox | folder |
|
||||
| label | label |
|
||||
And the address "user@[domain]" of account "user" has the following messages in "Inbox":
|
||||
And the address "[user:user]@[domain]" of account "[user:user]" has the following messages in "Inbox":
|
||||
| from | to | subject | unread |
|
||||
| john.doe@mail.com | user@[domain] | foo | false |
|
||||
| john.doe@mail.com | [user:user]@[domain] | foo | false |
|
||||
| jane.doe@mail.com | name@[domain] | bar | true |
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
And user "user" connects and authenticates IMAP client "1"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
And user "[user:user]" connects and authenticates IMAP client "1"
|
||||
|
||||
Scenario: Copy message to label
|
||||
When IMAP client "1" copies the message with subject "foo" from "INBOX" to "Labels/label"
|
||||
Then IMAP client "1" sees the following messages in "INBOX":
|
||||
| from | to | subject | unread |
|
||||
| john.doe@mail.com | user@[domain] | foo | false |
|
||||
| john.doe@mail.com | [user:user]@[domain] | foo | false |
|
||||
| jane.doe@mail.com | name@[domain] | bar | true |
|
||||
And IMAP client "1" sees the following messages in "Labels/label":
|
||||
| from | to | subject | unread |
|
||||
| john.doe@mail.com | user@[domain] | foo | false |
|
||||
| john.doe@mail.com | [user:user]@[domain] | foo | false |
|
||||
|
||||
Scenario: Copy all messages to label
|
||||
When IMAP client "1" copies all messages from "INBOX" to "Labels/label"
|
||||
Then IMAP client "1" sees the following messages in "INBOX":
|
||||
| from | to | subject | unread |
|
||||
| john.doe@mail.com | user@[domain] | foo | false |
|
||||
| john.doe@mail.com | [user:user]@[domain] | foo | false |
|
||||
| jane.doe@mail.com | name@[domain] | bar | true |
|
||||
And IMAP client "1" sees the following messages in "Labels/label":
|
||||
| from | to | subject | unread |
|
||||
| john.doe@mail.com | user@[domain] | foo | false |
|
||||
| john.doe@mail.com | [user:user]@[domain] | foo | false |
|
||||
| jane.doe@mail.com | name@[domain] | bar | true |
|
||||
|
||||
Scenario: Copy message to folder does move
|
||||
@ -42,13 +42,13 @@ Feature: IMAP copy messages
|
||||
| jane.doe@mail.com | name@[domain] | bar | true |
|
||||
And IMAP client "1" sees the following messages in "Folders/mbox":
|
||||
| from | to | subject | unread |
|
||||
| john.doe@mail.com | user@[domain] | foo | false |
|
||||
| john.doe@mail.com | [user:user]@[domain] | foo | false |
|
||||
|
||||
Scenario: Copy all messages to folder does move
|
||||
When IMAP client "1" copies all messages from "INBOX" to "Folders/mbox"
|
||||
Then IMAP client "1" sees the following messages in "Folders/mbox":
|
||||
| from | to | subject | unread |
|
||||
| john.doe@mail.com | user@[domain] | foo | false |
|
||||
| john.doe@mail.com | [user:user]@[domain] | foo | false |
|
||||
| jane.doe@mail.com | name@[domain] | bar | true |
|
||||
And IMAP client "1" eventually sees 0 messages in "INBOX"
|
||||
|
||||
@ -56,6 +56,6 @@ Feature: IMAP copy messages
|
||||
When IMAP client "1" copies the message with subject "foo" from "INBOX" to "Sent"
|
||||
Then IMAP client "1" eventually sees the following messages in "INBOX":
|
||||
| from | to | subject | unread |
|
||||
| john.doe@mail.com | user@[domain] | foo | false |
|
||||
| john.doe@mail.com | [user:user]@[domain] | foo | false |
|
||||
| jane.doe@mail.com | name@[domain] | bar | true |
|
||||
And IMAP client "1" eventually sees 0 messages in "Sent"
|
||||
@ -1,60 +1,60 @@
|
||||
Feature: IMAP create messages
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And the account "user" has additional address "alias@[domain]"
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And the account "[user:user]" has additional address "[alias:alias]@[domain]"
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
And user "user" connects and authenticates IMAP client "1"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
And user "[user:user]" connects and authenticates IMAP client "1"
|
||||
|
||||
Scenario: Creates message to user's primary address
|
||||
When IMAP client "1" appends the following messages to "INBOX":
|
||||
| from | to | subject | body |
|
||||
| john.doe@email.com | user@[domain] | foo | bar |
|
||||
| john.doe@email.com | [user:user]@[domain] | foo | bar |
|
||||
Then it succeeds
|
||||
And IMAP client "1" sees the following messages in "INBOX":
|
||||
| from | to | subject | body |
|
||||
| john.doe@email.com | user@[domain] | foo | bar |
|
||||
| john.doe@email.com | [user:user]@[domain] | foo | bar |
|
||||
And IMAP client "1" sees the following messages in "All Mail":
|
||||
| from | to | subject | body |
|
||||
| john.doe@email.com | user@[domain] | foo | bar |
|
||||
| john.doe@email.com | [user:user]@[domain] | foo | bar |
|
||||
|
||||
Scenario: Creates draft
|
||||
When IMAP client "1" appends the following messages to "Drafts":
|
||||
| from | to | subject | body |
|
||||
| user@[domain] | john.doe@email.com | foo | bar |
|
||||
| [user:user]@[domain] | john.doe@email.com | foo | bar |
|
||||
Then it succeeds
|
||||
And IMAP client "1" eventually sees the following messages in "Drafts":
|
||||
| from | to | subject | body |
|
||||
| user@[domain] | john.doe@email.com | foo | bar |
|
||||
| [user:user]@[domain] | john.doe@email.com | foo | bar |
|
||||
# This fails now
|
||||
And IMAP client "1" eventually sees the following messages in "All Mail":
|
||||
| from | to | subject | body |
|
||||
| user@[domain] | john.doe@email.com | foo | bar |
|
||||
| [user:user]@[domain] | john.doe@email.com | foo | bar |
|
||||
|
||||
Scenario: Creates message sent from user's primary address
|
||||
When IMAP client "1" appends the following messages to "Sent":
|
||||
| from | to | subject | body |
|
||||
| user@[domain] | john.doe@email.com | foo | bar |
|
||||
| [user:user]@[domain] | john.doe@email.com | foo | bar |
|
||||
Then it succeeds
|
||||
And IMAP client "1" sees the following messages in "Sent":
|
||||
| from | to | subject | body |
|
||||
| user@[domain] | john.doe@email.com | foo | bar |
|
||||
| [user:user]@[domain] | john.doe@email.com | foo | bar |
|
||||
And IMAP client "1" sees the following messages in "All Mail":
|
||||
| from | to | subject | body |
|
||||
| user@[domain] | john.doe@email.com | foo | bar |
|
||||
| [user:user]@[domain] | john.doe@email.com | foo | bar |
|
||||
|
||||
Scenario: Creates message sent from user's secondary address
|
||||
When IMAP client "1" appends the following messages to "Sent":
|
||||
| from | to | subject | body |
|
||||
| alias@[domain] | john.doe@email.com | foo | bar |
|
||||
| [alias:alias]@[domain] | john.doe@email.com | foo | bar |
|
||||
Then it succeeds
|
||||
And IMAP client "1" sees the following messages in "Sent":
|
||||
| from | to | subject | body |
|
||||
| alias@[domain] | john.doe@email.com | foo | bar |
|
||||
| [alias:alias]@[domain] | john.doe@email.com | foo | bar |
|
||||
And IMAP client "1" sees the following messages in "All Mail":
|
||||
| from | to | subject | body |
|
||||
| alias@[domain] | john.doe@email.com | foo | bar |
|
||||
| [alias:alias]@[domain] | john.doe@email.com | foo | bar |
|
||||
|
||||
Scenario: Imports an unrelated message to inbox
|
||||
When IMAP client "1" appends the following messages to "INBOX":
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
Feature: IMAP remove messages from mailbox
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And the account "user" has the following custom mailboxes:
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And the account "[user:user]" has the following custom mailboxes:
|
||||
| name | type |
|
||||
| mbox | folder |
|
||||
| label | label |
|
||||
And the address "user@[domain]" of account "user" has 10 messages in "mbox"
|
||||
And the address "[user:user]@[domain]" of account "[user:user]" has 10 messages in "mbox"
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
And user "user" connects and authenticates IMAP client "1"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
And user "[user:user]" connects and authenticates IMAP client "1"
|
||||
|
||||
Scenario: Mark message as deleted and EXPUNGE
|
||||
When IMAP client "1" selects "Folders/mbox"
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
Feature: IMAP remove messages from Trash
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And the account "user" has the following custom mailboxes:
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And the account "[user:user]" has the following custom mailboxes:
|
||||
| name | type |
|
||||
| mbox | folder |
|
||||
| label | label |
|
||||
|
||||
Scenario Outline: Message in Trash and some other label is not permanently deleted
|
||||
Given the address "user@[domain]" of account "user" has the following messages in "Trash":
|
||||
Given the address "[user:user]@[domain]" of account "[user:user]" has the following messages in "Trash":
|
||||
| from | to | subject | body |
|
||||
| john.doe@mail.com | user@[domain] | foo | hello |
|
||||
| john.doe@mail.com | [user:user]@[domain] | foo | hello |
|
||||
| jane.doe@mail.com | name@[domain] | bar | world |
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
And user "user" connects and authenticates IMAP client "1"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
And user "[user:user]" connects and authenticates IMAP client "1"
|
||||
And IMAP client "1" selects "Trash"
|
||||
When IMAP client "1" copies the message with subject "foo" from "Trash" to "Labels/label"
|
||||
Then it succeeds
|
||||
@ -30,14 +30,14 @@ Feature: IMAP remove messages from Trash
|
||||
And IMAP client "1" sees 1 messages in "Labels/label"
|
||||
|
||||
Scenario Outline: Message in Trash only is permanently deleted
|
||||
Given the address "user@[domain]" of account "user" has the following messages in "Trash":
|
||||
Given the address "[user:user]@[domain]" of account "[user:user]" has the following messages in "Trash":
|
||||
| from | to | subject | body |
|
||||
| john.doe@mail.com | user@[domain] | foo | hello |
|
||||
| john.doe@mail.com | [user:user]@[domain] | foo | hello |
|
||||
| jane.doe@mail.com | name@[domain] | bar | world |
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
And user "user" connects and authenticates IMAP client "1"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
And user "[user:user]" connects and authenticates IMAP client "1"
|
||||
And IMAP client "1" selects "Trash"
|
||||
When IMAP client "1" marks the message with subject "foo" as deleted
|
||||
Then it succeeds
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
Feature: IMAP Draft messages
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
And user "user" connects and authenticates IMAP client "1"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
And user "[user:user]" connects and authenticates IMAP client "1"
|
||||
And IMAP client "1" selects "Drafts"
|
||||
When IMAP client "1" appends the following message to "Drafts":
|
||||
"""
|
||||
@ -35,7 +35,7 @@ Feature: IMAP Draft messages
|
||||
And IMAP client "1" sees 1 messages in "Drafts"
|
||||
|
||||
Scenario: Draft edited remotely
|
||||
When the following fields were changed in draft 1 for address "user@[domain]" of account "user":
|
||||
When the following fields were changed in draft 1 for address "[user:user]@[domain]" of account "[user:user]":
|
||||
| to | subject | body |
|
||||
| someone@proton.me | Basic Draft | This is a draft body, but longer |
|
||||
Then IMAP client "1" eventually sees the following messages in "Drafts":
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
Feature: IMAP import messages
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
And user "user" connects and authenticates IMAP client "1"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
And user "[user:user]" connects and authenticates IMAP client "1"
|
||||
|
||||
Scenario: Basic message import
|
||||
When IMAP client "1" appends the following message to "INBOX":
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: Internal Bridge <bridgetest@[domain]>
|
||||
To: Internal Bridge <bridgetest@example.com>
|
||||
Received: by 2002:0:0:0:0:0:0:0 with SMTP id 0123456789abcdef; Wed, 30 Dec 2020 01:23:45 0000
|
||||
Subject: Basic text/plain message
|
||||
Content-Type: text/plain
|
||||
@ -20,13 +20,13 @@ Feature: IMAP import messages
|
||||
Then it succeeds
|
||||
And IMAP client "1" eventually sees the following messages in "INBOX":
|
||||
| from | to | subject | body |
|
||||
| bridgetest@pm.test | bridgetest@[domain] | Basic text/plain message | Hello |
|
||||
| bridgetest@pm.test | bridgetest@example.com | Basic text/plain message | Hello |
|
||||
|
||||
Scenario: Import message with double charset in content type
|
||||
When IMAP client "1" appends the following message to "INBOX":
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: Internal Bridge <bridgetest@[domain]>
|
||||
To: Internal Bridge <bridgetest@example.com>
|
||||
Subject: Message with double charset in content type
|
||||
Content-Type: text/plain; charset=utf-8; charset=utf-8
|
||||
Content-Disposition: inline
|
||||
@ -37,7 +37,7 @@ Feature: IMAP import messages
|
||||
Then it succeeds
|
||||
And IMAP client "1" eventually sees the following messages in "INBOX":
|
||||
| from | to | subject | body |
|
||||
| bridgetest@pm.test | bridgetest@[domain] | Message with double charset in content type | Hello |
|
||||
| bridgetest@pm.test | bridgetest@example.com | Message with double charset in content type | Hello |
|
||||
|
||||
# The message is imported as UTF-8 and the content type is determined at build time.
|
||||
Scenario: Import message as latin1 without content type
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
Feature: IMAP move messages by append and delete (without MOVE support, e.g., Outlook)
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And the account "user" has the following custom mailboxes:
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And the account "[user:user]" has the following custom mailboxes:
|
||||
| name | type |
|
||||
| mbox | folder |
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
And user "user" connects and authenticates IMAP client "source"
|
||||
And user "user" connects and authenticates IMAP client "target"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
And user "[user:user]" connects and authenticates IMAP client "source"
|
||||
And user "[user:user]" connects and authenticates IMAP client "target"
|
||||
|
||||
Scenario Outline: Move message from <srcMailbox> to <dstMailbox> by <order>
|
||||
When IMAP client "source" appends the following message to "<srcMailbox>":
|
||||
@ -33,7 +33,7 @@ Feature: IMAP move messages by append and delete (without MOVE support, e.g., Ou
|
||||
Then it succeeds
|
||||
And IMAP client "source" selects "<srcMailbox>"
|
||||
And IMAP client "target" selects "<dstMailbox>"
|
||||
When IMAP clients "source" and "target" move message seq "2" of "user" to "<dstMailbox>" by <order>
|
||||
When IMAP clients "source" and "target" move message seq "2" of "[user:user]" to "<dstMailbox>" by <order>
|
||||
And IMAP client "source" sees 1 messages in "<srcMailbox>"
|
||||
And IMAP client "source" sees the following messages in "<srcMailbox>":
|
||||
| from | to | subject |
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
Feature: Bridge can fully sync an account
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And the account "user" has 20 custom folders
|
||||
And the account "user" has 60 custom labels
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And the account "[user:user]" has 20 custom folders
|
||||
And the account "[user:user]" has 60 custom labels
|
||||
When bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
When user "user" connects and authenticates IMAP client "1"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
When user "[user:user]" connects and authenticates IMAP client "1"
|
||||
Then IMAP client "1" counts 20 mailboxes under "Folders"
|
||||
And IMAP client "1" counts 60 mailboxes under "Labels"
|
||||
|
||||
Scenario: The user changes the gluon path
|
||||
When the user changes the gluon path
|
||||
And user "user" connects and authenticates IMAP client "2"
|
||||
And user "[user:user]" connects and authenticates IMAP client "2"
|
||||
Then IMAP client "2" counts 20 mailboxes under "Folders"
|
||||
And IMAP client "2" counts 60 mailboxes under "Labels"
|
||||
@ -1,10 +1,10 @@
|
||||
Feature: A user can connect an IMAP client to custom ports
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And the user changes the IMAP port to 1144
|
||||
|
||||
Scenario: Authenticates successfully on custom port
|
||||
When user "user" connects IMAP client "1" on port 1144
|
||||
When user "[user:user]" connects IMAP client "1" on port 1144
|
||||
Then IMAP client "1" can authenticate
|
||||
@ -1,22 +1,22 @@
|
||||
Feature: A user can authenticate an SMTP client
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
|
||||
Scenario: SMTP client can authenticate successfully
|
||||
When user "user" connects SMTP client "1"
|
||||
When user "[user:user]" connects SMTP client "1"
|
||||
Then SMTP client "1" can authenticate
|
||||
|
||||
Scenario: SMTP client cannot authenticate with wrong username
|
||||
When user "user" connects SMTP client "1"
|
||||
When user "[user:user]" connects SMTP client "1"
|
||||
Then SMTP client "1" cannot authenticate with incorrect username
|
||||
|
||||
Scenario: SMTP client cannot authenticate with wrong password
|
||||
When user "user" connects SMTP client "1"
|
||||
When user "[user:user]" connects SMTP client "1"
|
||||
Then SMTP client "1" cannot authenticate with incorrect password
|
||||
|
||||
Scenario: SMTP client cannot authenticate for disconnected user
|
||||
When user "user" logs out
|
||||
And user "user" connects SMTP client "1"
|
||||
When user "[user:user]" logs out
|
||||
And user "[user:user]" connects SMTP client "1"
|
||||
Then SMTP client "1" cannot authenticate
|
||||
@ -1,9 +1,9 @@
|
||||
Feature: SMTP initiation
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
When user "user" connects and authenticates SMTP client "1"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
When user "[user:user]" connects and authenticates SMTP client "1"
|
||||
|
||||
Scenario: Send without first announcing FROM and TO
|
||||
When SMTP client "1" sends DATA:
|
||||
@ -13,9 +13,9 @@ Feature: SMTP initiation
|
||||
Then it fails with error "Missing RCPT TO command"
|
||||
|
||||
Scenario: Reset is the same as without FROM and TO
|
||||
When SMTP client "1" sends MAIL FROM "<user@[domain]>"
|
||||
When SMTP client "1" sends MAIL FROM "<[user:user]@[domain]>"
|
||||
Then it succeeds
|
||||
When SMTP client "1" sends RCPT TO "<user@[domain]>"
|
||||
When SMTP client "1" sends RCPT TO "<[user:user]@[domain]>"
|
||||
Then it succeeds
|
||||
When SMTP client "1" sends RSET
|
||||
Then it succeeds
|
||||
@ -26,11 +26,11 @@ Feature: SMTP initiation
|
||||
Then it fails with error "Missing RCPT TO command"
|
||||
|
||||
Scenario: Send without FROM
|
||||
When SMTP client "1" sends RCPT TO "<user@[domain]>"
|
||||
When SMTP client "1" sends RCPT TO "<[user:user]@[domain]>"
|
||||
Then it fails with error "Missing MAIL FROM command"
|
||||
|
||||
Scenario: Send without TO
|
||||
When SMTP client "1" sends MAIL FROM "<user@[domain]>"
|
||||
When SMTP client "1" sends MAIL FROM "<[user:user]@[domain]>"
|
||||
Then it succeeds
|
||||
When SMTP client "1" sends DATA:
|
||||
"""
|
||||
@ -39,16 +39,16 @@ Feature: SMTP initiation
|
||||
Then it fails with error "Missing RCPT TO command"
|
||||
|
||||
Scenario: Send with empty FROM
|
||||
When SMTP client "1" sends the following message from "<>" to "bridgetest@[domain]":
|
||||
When SMTP client "1" sends the following message from "<>" to "recipient@example.com":
|
||||
"""
|
||||
To: Internal Bridge <bridgetest@[domain]>
|
||||
To: Internal Bridge <recipient@example.com>
|
||||
|
||||
this should fail
|
||||
"""
|
||||
Then it fails
|
||||
|
||||
Scenario: Send with empty TO
|
||||
When SMTP client "1" sends MAIL FROM "<user@[domain]>"
|
||||
When SMTP client "1" sends MAIL FROM "<[user:user]@[domain]>"
|
||||
Then it succeeds
|
||||
When SMTP client "1" sends RCPT TO "<>"
|
||||
Then it succeeds
|
||||
@ -59,14 +59,14 @@ Feature: SMTP initiation
|
||||
Then it fails with error "invalid recipient"
|
||||
|
||||
Scenario: Allow BODY parameter of MAIL FROM command
|
||||
When SMTP client "1" sends MAIL FROM "<user@[domain]> BODY=7BIT"
|
||||
When SMTP client "1" sends MAIL FROM "<[user:user]@[domain]> BODY=7BIT"
|
||||
Then it succeeds
|
||||
|
||||
Scenario: FROM not owned by user
|
||||
When SMTP client "1" sends the following message from "other@[domain]" to "bridgetest@[domain]":
|
||||
When SMTP client "1" sends the following message from "unowned@[domain]" to "recipient@example.com":
|
||||
"""
|
||||
From: Bridge Test <user@[domain]>
|
||||
To: Internal Bridge <bridgetest@[domain]>
|
||||
From: Bridge Test <[user:user]@[domain]>
|
||||
To: Internal Bridge <recipient@example.com>
|
||||
|
||||
this should fail
|
||||
"""
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
Feature: A user can connect an SMTP client to custom ports
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And the user changes the SMTP port to 1144
|
||||
|
||||
Scenario: Authenticates successfully on custom port
|
||||
When user "user" connects SMTP client "1" on port 1144
|
||||
When user "[user:user]" connects SMTP client "1" on port 1144
|
||||
Then SMTP client "1" can authenticate
|
||||
@ -1,28 +1,28 @@
|
||||
Feature: SMTP with bcc
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
Given there exists an account with username "bridgetest" and password "password"
|
||||
Given there exists an account with username "bcc" and password "password"
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
Given there exists an account with username "[user:to]" and password "password"
|
||||
Given there exists an account with username "[user:bcc]" and password "password"
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And the user logs in with username "bcc" 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 the user logs in with username "[user:bcc]" and password "password"
|
||||
And user "[user:user]" connects and authenticates SMTP client "1"
|
||||
|
||||
Scenario: Send message to address in to and bcc
|
||||
When SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain], bcc@[domain]":
|
||||
When SMTP client "1" sends the following message from "[user:user]@[domain]" to "[user:to]@[domain], [user:bcc]@[domain]":
|
||||
"""
|
||||
Subject: hello
|
||||
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 | bcc | subject | unread |
|
||||
| user@[domain] | bridgetest@[domain] | bcc@[domain] | hello | false |
|
||||
| [user:user]@[domain] | [user:to]@[domain] | [user:bcc]@[domain] | hello | false |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -30,14 +30,14 @@ Feature: SMTP with bcc
|
||||
"Subject": "hello",
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "bridgetest@[domain]",
|
||||
"Address": "[user:to]@[domain]",
|
||||
"Name": "Internal Bridge"
|
||||
}
|
||||
],
|
||||
"CCList": [],
|
||||
"BCCList": [
|
||||
{
|
||||
"Address": "bcc@[domain]"
|
||||
"Address": "[user:bcc]@[domain]"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -46,19 +46,19 @@ Feature: SMTP with bcc
|
||||
|
||||
|
||||
Scenario: Send message only to bcc
|
||||
When SMTP client "1" sends the following message from "user@[domain]" to "bcc@[domain]":
|
||||
When SMTP client "1" sends the following message from "[user:user]@[domain]" to "[user:bcc]@[domain]":
|
||||
"""
|
||||
Subject: hello
|
||||
From: Bridge Test <user@[domain]>
|
||||
From: Bridge Test <[user:user]@[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 | bcc | subject |
|
||||
| user@[domain] | | bcc@[domain] | hello |
|
||||
| [user:user]@[domain] | | [user:bcc]@[domain] | hello |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -68,13 +68,13 @@ Feature: SMTP with bcc
|
||||
"CCList": [],
|
||||
"BCCList": [
|
||||
{
|
||||
"Address": "bcc@[domain]"
|
||||
"Address": "[user:bcc]@[domain]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
"""
|
||||
When user "bcc" connects and authenticates IMAP client "2"
|
||||
When user "[user:bcc]" connects and authenticates IMAP client "2"
|
||||
Then IMAP client "2" eventually sees the following messages in "Inbox":
|
||||
| from | to | bcc | subject | unread |
|
||||
| user@[domain] | | | hello | true |
|
||||
| [user:user]@[domain] | | | hello | true |
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
Feature: SMTP sending embedded message
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And there exists an account with username "bridgetest" 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 bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And the user logs in with username "bridgetest" 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 the user logs in with username "[user:to]" and password "password"
|
||||
And user "[user:user]" connects and authenticates SMTP client "1"
|
||||
|
||||
Scenario: Send it
|
||||
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: Embedded message
|
||||
Content-Type: multipart/mixed; boundary="boundary"
|
||||
|
||||
@ -27,7 +27,7 @@ Feature: SMTP sending embedded message
|
||||
Content-Disposition: attachment; filename="embedded.eml"
|
||||
|
||||
From: Bar <bar@example.com>
|
||||
To: Bridge Test <bridgetest@pm.test>
|
||||
To: Bridge Test <[user:to]@pm.test>
|
||||
Subject: (No Subject)
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
@ -39,11 +39,11 @@ Feature: SMTP sending embedded message
|
||||
|
||||
"""
|
||||
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] | Embedded message |
|
||||
When user "bridgetest" connects and authenticates IMAP client "2"
|
||||
| [user:user]@[domain] | [user:to]@[domain] | Embedded message |
|
||||
When user "[user:to]" connects and authenticates IMAP client "2"
|
||||
Then IMAP client "2" eventually sees the following messages in "Inbox":
|
||||
| from | to | subject | attachments | unread |
|
||||
| user@[domain] | bridgetest@[domain] | Embedded message | embedded.eml | true |
|
||||
| [user:user]@[domain] | [user:to]@[domain] | Embedded message | embedded.eml | true |
|
||||
@ -1,16 +1,16 @@
|
||||
Feature: SMTP wrong messages
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And there exists an account with username "bridgetest" 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 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: Message with attachment and wrong boundaries
|
||||
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: With attachment (wrong boundaries)
|
||||
Content-Type: multipart/related; boundary=bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
|
||||
@ -44,10 +44,10 @@ Feature: SMTP wrong messages
|
||||
Then it fails
|
||||
|
||||
Scenario: Invalid from
|
||||
When SMTP client "1" sends the following message from "bridgetest@pm.test" to "bridgetest@[domain]":
|
||||
When SMTP client "1" sends the following message from "unowned@[domain]" to "[user:to]@[domain]":
|
||||
"""
|
||||
From: Bridge Test <bridgetest@pm.test>
|
||||
To: Internal Bridge <bridgetest@[domain]>
|
||||
From: Bridge Test <unowned@[domain]>
|
||||
To: Internal Bridge <[user:to]@[domain]>
|
||||
|
||||
hello
|
||||
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
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"
|
||||
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 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: HTML 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: HTML text external
|
||||
Content-Disposition: inline
|
||||
@ -21,10 +21,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 | HTML text external |
|
||||
| [user:user]@[domain] | pm.bridge.qa@gmail.com | HTML text external |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -47,9 +47,9 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
|
||||
Scenario: HTML message with inline image 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: Html Inline External
|
||||
Content-Disposition: inline
|
||||
@ -97,10 +97,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 | Html Inline External |
|
||||
| [user:user]@[domain] | pm.bridge.qa@gmail.com | Html Inline External |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -123,10 +123,10 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
|
||||
Scenario: HTML message with alternative inline 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: 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
|
||||
@ -187,10 +187,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] | Html Inline Alternative Internal |
|
||||
| [user:user]@[domain] | [user:to]@[domain] | Html Inline Alternative Internal |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -201,7 +201,7 @@ Feature: SMTP sending of plain messages
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "bridgetest@[domain]",
|
||||
"Address": "[user:to]@[domain]",
|
||||
"Name": "Internal Bridge"
|
||||
}
|
||||
],
|
||||
@ -213,9 +213,9 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
|
||||
Scenario: HTML message with alternative inline 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: Html Inline Alternative External
|
||||
Content-Disposition: inline
|
||||
@ -277,10 +277,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 | Html Inline Alternative External |
|
||||
| [user:user]@[domain] | pm.bridge.qa@gmail.com | Html Inline Alternative External |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -303,9 +303,9 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
|
||||
Scenario: HTML message with extremely long line (greater than default 2000 line limit) 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: HTML text external
|
||||
Content-Disposition: inline
|
||||
@ -317,10 +317,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 | HTML text external |
|
||||
| [user:user]@[domain] | pm.bridge.qa@gmail.com | HTML text external |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
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"
|
||||
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 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: HTML message with attachment 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: HTML with attachment internal
|
||||
Content-Type: multipart/related; boundary=bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
|
||||
@ -41,10 +41,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] | HTML with attachment internal |
|
||||
| [user:user]@[domain] | [user:to]@[domain] | HTML with attachment internal |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -55,7 +55,7 @@ Feature: SMTP sending of plain messages
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "bridgetest@[domain]",
|
||||
"Address": "[user:to]@[domain]",
|
||||
"Name": "Internal Bridge"
|
||||
}
|
||||
],
|
||||
@ -67,9 +67,9 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
|
||||
Scenario: HTML message with attachment 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: HTML with attachment external PGP
|
||||
Content-Type: multipart/mixed; boundary=bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
@ -101,10 +101,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 | HTML with attachment external PGP |
|
||||
| [user:user]@[domain] | pm.bridge.qa@gmail.com | HTML with attachment external PGP |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -127,9 +127,9 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
|
||||
Scenario: Alternative plain and HTML message with rfc822 attachment
|
||||
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: Alternative plain and HTML with rfc822 attachment
|
||||
Content-Type: multipart/mixed; boundary=main-parts
|
||||
@ -190,10 +190,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 | Alternative plain and HTML with rfc822 attachment |
|
||||
| [user:user]@[domain] | pm.bridge.qa@gmail.com | Alternative plain and HTML with rfc822 attachment |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
Feature: SMTP messages containing inlines
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And there exists an account with username "bridgetest" 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 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: A message with inline attachment 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 with inline
|
||||
Content-Type: multipart/related; boundary=bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
|
||||
@ -40,10 +40,10 @@ Feature: SMTP messages containing inlines
|
||||
|
||||
"""
|
||||
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 with inline |
|
||||
| [user:user]@[domain] | [user:to]@[domain] | Plain with inline |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -54,7 +54,7 @@ Feature: SMTP messages containing inlines
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "bridgetest@[domain]",
|
||||
"Address": "[user:to]@[domain]",
|
||||
"Name": "Internal Bridge"
|
||||
}
|
||||
],
|
||||
@ -66,10 +66,10 @@ Feature: SMTP messages containing inlines
|
||||
"""
|
||||
|
||||
Scenario: A message with inline attachment without content ID 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 with inline
|
||||
Content-Type: multipart/related; boundary=bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
|
||||
@ -98,10 +98,10 @@ Feature: SMTP messages containing inlines
|
||||
|
||||
"""
|
||||
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 with inline |
|
||||
| [user:user]@[domain] | [user:to]@[domain] | Plain with inline |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -112,7 +112,7 @@ Feature: SMTP messages containing inlines
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "bridgetest@[domain]",
|
||||
"Address": "[user:to]@[domain]",
|
||||
"Name": "Internal Bridge"
|
||||
}
|
||||
],
|
||||
@ -124,10 +124,10 @@ Feature: SMTP messages containing inlines
|
||||
"""
|
||||
|
||||
Scenario: A message with bad disposition 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 with inline
|
||||
Content-Type: multipart/related; boundary=bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
|
||||
@ -156,10 +156,10 @@ Feature: SMTP messages containing inlines
|
||||
|
||||
"""
|
||||
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 with inline |
|
||||
| [user:user]@[domain] | [user:to]@[domain] | Plain with inline |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -170,7 +170,7 @@ Feature: SMTP messages containing inlines
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "bridgetest@[domain]",
|
||||
"Address": "[user:to]@[domain]",
|
||||
"Name": "Internal Bridge"
|
||||
}
|
||||
],
|
||||
|
||||
@ -1,25 +1,25 @@
|
||||
Feature: SMTP sending with mixed case address
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And there exists an account with username "bridgetest" 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 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: Mixed sender case in sender address
|
||||
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 <{toUpper:[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] | |
|
||||
| [user:user]@[domain] | [user:to]@[domain] | |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -27,11 +27,11 @@ Feature: SMTP sending with mixed case address
|
||||
"Subject": "",
|
||||
"Sender": {
|
||||
"Name": "Bridge Test",
|
||||
"Address": "user@[domain]"
|
||||
"Address": "[user:user]@[domain]"
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "bridgetest@[domain]",
|
||||
"Address": "[user:to]@[domain]",
|
||||
"Name": "Internal Bridge"
|
||||
}
|
||||
],
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
Feature: SMTP sending two messages
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And there exists an account with username "other" and password "other"
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And there exists an account with username "[user:recp]" and password "password"
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And the user logs in with username "other" and password "other"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And the user logs in with username "[user:recp]" and password "password"
|
||||
|
||||
Scenario: Send from one account to the other
|
||||
When user "user" connects and authenticates SMTP client "1"
|
||||
And SMTP client "1" sends the following message from "user@[domain]" to "other@[domain]":
|
||||
When user "[user:user]" connects and authenticates SMTP client "1"
|
||||
And SMTP client "1" sends the following message from "[user:user]@[domain]" to "[user:recp]@[domain]":
|
||||
"""
|
||||
From: Bridge Test <user@[domain]>
|
||||
To: Internal Bridge <other@[domain]>
|
||||
From: Bridge Test <[user:user]@[domain]>
|
||||
To: Internal Bridge <[user:recp]@[domain]>
|
||||
Subject: One account to the other
|
||||
|
||||
hello
|
||||
@ -25,12 +25,12 @@ Feature: SMTP sending two messages
|
||||
"Subject": "One account to the other",
|
||||
"Sender": {
|
||||
"Name": "Bridge Test",
|
||||
"Address": "user@[domain]"
|
||||
"Address": "[user:user]@[domain]"
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Name": "Internal Bridge",
|
||||
"Address": "other@[domain]"
|
||||
"Address": "[user:recp]@[domain]"
|
||||
}
|
||||
],
|
||||
"CCList": [],
|
||||
@ -45,7 +45,7 @@ Feature: SMTP sending two messages
|
||||
"Packages": [
|
||||
{
|
||||
"Addresses": {
|
||||
"other@[domain]": {
|
||||
"[user:recp]@[domain]": {
|
||||
"Type": 1
|
||||
}
|
||||
},
|
||||
@ -55,17 +55,17 @@ Feature: SMTP sending two messages
|
||||
]
|
||||
}
|
||||
"""
|
||||
When user "other" connects and authenticates IMAP client "1"
|
||||
When user "[user:recp]" connects and authenticates IMAP client "1"
|
||||
Then IMAP client "1" eventually sees the following messages in "Inbox":
|
||||
| from | to | subject | body |
|
||||
| user@[domain] | other@[domain] | One account to the other | hello |
|
||||
| [user:user]@[domain] | [user:recp]@[domain] | One account to the other | hello |
|
||||
|
||||
Scenario: Send from one account to the other with attachments
|
||||
When user "user" connects and authenticates SMTP client "1"
|
||||
And SMTP client "1" sends the following message from "user@[domain]" to "other@[domain]":
|
||||
When user "[user:user]" connects and authenticates SMTP client "1"
|
||||
And SMTP client "1" sends the following message from "[user:user]@[domain]" to "[user:recp]@[domain]":
|
||||
"""
|
||||
From: Bridge Test <user@[domain]>
|
||||
To: Internal Bridge <other@[domain]>
|
||||
From: Bridge Test <[user:user]@[domain]>
|
||||
To: Internal Bridge <[user:recp]@[domain]>
|
||||
Subject: Plain with attachment internal
|
||||
Content-Type: multipart/related; boundary=bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
|
||||
@ -106,7 +106,7 @@ Feature: SMTP sending two messages
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "other@[domain]",
|
||||
"Address": "[user:recp]@[domain]",
|
||||
"Name": "Internal Bridge"
|
||||
}
|
||||
],
|
||||
@ -122,7 +122,7 @@ Feature: SMTP sending two messages
|
||||
"Packages": [
|
||||
{
|
||||
"Addresses": {
|
||||
"other@[domain]": {
|
||||
"[user:recp]@[domain]": {
|
||||
"Type": 1
|
||||
}
|
||||
},
|
||||
@ -132,11 +132,11 @@ Feature: SMTP sending two messages
|
||||
]
|
||||
}
|
||||
"""
|
||||
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 | body | attachments | unread |
|
||||
| user@[domain] | other@[domain] | Plain with attachment internal | This is the body | outline-light-instagram-48.png | false |
|
||||
When user "other" connects and authenticates IMAP client "2"
|
||||
| [user:user]@[domain] | [user:recp]@[domain] | Plain with attachment internal | This is the body | outline-light-instagram-48.png | false |
|
||||
When user "[user:recp]" connects and authenticates IMAP client "2"
|
||||
Then IMAP client "2" eventually sees the following messages in "Inbox":
|
||||
| from | to | subject | body | attachments | unread |
|
||||
| user@[domain] | other@[domain] | Plain with attachment internal | This is the body | outline-light-instagram-48.png | true |
|
||||
| [user:user]@[domain] | [user:recp]@[domain] | Plain with attachment internal | This is the body | outline-light-instagram-48.png | true |
|
||||
@ -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] | |
|
||||
| [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 | |
|
||||
| [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 |
|
||||
| [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 |
|
||||
| [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 |
|
||||
| [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 |
|
||||
| [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 |
|
||||
| [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 |
|
||||
| [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
|
||||
}
|
||||
},
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
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"
|
||||
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 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: Basic message with attachment 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 with attachment
|
||||
Content-Type: multipart/related; boundary=bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
|
||||
@ -41,10 +41,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 with attachment |
|
||||
| [user:user]@[domain] | [user:to]@[domain] | Plain with attachment |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -55,7 +55,7 @@ Feature: SMTP sending of plain messages
|
||||
},
|
||||
"ToList": [
|
||||
{
|
||||
"Address": "bridgetest@[domain]",
|
||||
"Address": "[user:to]@[domain]",
|
||||
"Name": "Internal Bridge"
|
||||
}
|
||||
],
|
||||
@ -67,9 +67,9 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
|
||||
Scenario: Plain message with attachment 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 with attachment external
|
||||
Content-Type: multipart/related; boundary=bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606
|
||||
@ -101,10 +101,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 with attachment external |
|
||||
| [user:user]@[domain] | pm.bridge.qa@gmail.com | Plain with attachment external |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
@ -127,9 +127,9 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
|
||||
Scenario: Plain message with attachment to two external accounts
|
||||
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 1 <pm.bridge.qa@gmail.com>
|
||||
CC: External Bridge 2 <bridgeqa@seznam.cz>
|
||||
Subject: Plain with attachment external PGP and external CC
|
||||
@ -162,10 +162,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] | pm.bridge.qa@gmail.com | bridgeqa@seznam.cz | Plain with attachment external PGP and external CC |
|
||||
| [user:user]@[domain] | pm.bridge.qa@gmail.com | bridgeqa@seznam.cz | Plain with attachment external PGP and external CC |
|
||||
And the body in the "POST" request to "/mail/v4/messages" is:
|
||||
"""
|
||||
{
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
Feature: SMTP sending the same message twice
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And there exists an account with username "bridgetest" 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 bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And the user logs in with username "bridgetest" and password "password"
|
||||
And user "user" connects and authenticates SMTP client "1"
|
||||
And SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain]":
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And the user logs in with username "[user:to]" and password "password"
|
||||
And user "[user:user]" connects and authenticates SMTP client "1"
|
||||
And 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: Hello
|
||||
|
||||
World
|
||||
@ -17,42 +17,42 @@ Feature: SMTP sending the same message twice
|
||||
And it succeeds
|
||||
|
||||
Scenario: The exact same message is not sent twice
|
||||
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: Hello
|
||||
|
||||
World
|
||||
"""
|
||||
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 | body |
|
||||
| user@[domain] | bridgetest@[domain] | Hello | World |
|
||||
When user "bridgetest" connects and authenticates IMAP client "2"
|
||||
| [user:user]@[domain] | [user:to]@[domain] | Hello | World |
|
||||
When user "[user:to]" connects and authenticates IMAP client "2"
|
||||
Then IMAP client "2" eventually sees the following messages in "Inbox":
|
||||
| from | to | subject | body |
|
||||
| user@[domain] | bridgetest@[domain] | Hello | World |
|
||||
| [user:user]@[domain] | [user:to]@[domain] | Hello | World |
|
||||
|
||||
|
||||
Scenario: Slight change means different message and is sent twice
|
||||
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: Hello.
|
||||
|
||||
World
|
||||
"""
|
||||
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 | body |
|
||||
| user@[domain] | bridgetest@[domain] | Hello | World |
|
||||
| user@[domain] | bridgetest@[domain] | Hello. | World |
|
||||
When user "bridgetest" connects and authenticates IMAP client "2"
|
||||
| [user:user]@[domain] | [user:to]@[domain] | Hello | World |
|
||||
| [user:user]@[domain] | [user:to]@[domain] | Hello. | World |
|
||||
When user "[user:to]" connects and authenticates IMAP client "2"
|
||||
Then IMAP client "2" eventually sees the following messages in "Inbox":
|
||||
| from | to | subject | body |
|
||||
| user@[domain] | bridgetest@[domain] | Hello | World |
|
||||
| user@[domain] | bridgetest@[domain] | Hello. | World |
|
||||
| [user:user]@[domain] | [user:to]@[domain] | Hello | World |
|
||||
| [user:user]@[domain] | [user:to]@[domain] | Hello. | World |
|
||||
@ -1,17 +1,17 @@
|
||||
Feature: SMTP sending with APPENDing to Sent
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And there exists an account with username "bridgetest" 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 bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" connects and authenticates SMTP client "1"
|
||||
And user "user" connects and authenticates IMAP client "1"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" connects and authenticates SMTP client "1"
|
||||
And user "[user:user]" connects and authenticates IMAP client "1"
|
||||
|
||||
Scenario: Send message and append to Sent
|
||||
# First do sending.
|
||||
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]":
|
||||
"""
|
||||
To: Internal Bridge <bridgetest@[domain]>
|
||||
To: Internal Bridge <[user:to]@[domain]>
|
||||
Subject: Manual send and append
|
||||
Message-ID: bridgemessage42
|
||||
|
||||
@ -30,12 +30,12 @@ Feature: SMTP sending with APPENDing to Sent
|
||||
"""
|
||||
And IMAP client "1" eventually sees the following messages in "Sent":
|
||||
| to | subject | body | message-id |
|
||||
| bridgetest@[domain] | Manual send and append | hello | <bridgemessage42> |
|
||||
| [user:to]@[domain] | Manual send and append | hello | <bridgemessage42> |
|
||||
|
||||
# Then simulate manual append to Sent mailbox - message should be detected as a duplicate.
|
||||
When IMAP client "1" appends the following message to "Sent":
|
||||
"""
|
||||
To: Internal Bridge <bridgetest@[domain]>
|
||||
To: Internal Bridge <[user:to]@[domain]>
|
||||
Subject: Manual send and append
|
||||
Message-ID: bridgemessage42
|
||||
|
||||
@ -45,4 +45,4 @@ Feature: SMTP sending with APPENDing to Sent
|
||||
Then it succeeds
|
||||
And IMAP client "1" eventually sees the following messages in "Sent":
|
||||
| to | subject | body | message-id |
|
||||
| bridgetest@[domain] | Manual send and append | hello | <bridgemessage42> |
|
||||
| [user:to]@[domain] | Manual send and append | hello | <bridgemessage42> |
|
||||
@ -1,29 +1,29 @@
|
||||
Feature: SMTP sending two messages
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And there exists an account with username "user-multi" and password "password"
|
||||
And the account "user-multi" has additional address "user-multi-alias@[domain]"
|
||||
And there exists an account with username "bridgetest" and password "password"
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And there exists an account with username "[user:multi]" and password "password"
|
||||
And the account "[user:multi]" has additional address "[user:multi-alias]@[domain]"
|
||||
And there exists an account with username "[user:to]" and password "password"
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And the user logs in with username "user-multi" and password "password"
|
||||
And the user sets the address mode of user "user-multi" to "split"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And the user logs in with username "[user:multi]" and password "password"
|
||||
And the user sets the address mode of user "[user:multi]" to "split"
|
||||
|
||||
Scenario: Send two messages in one connection
|
||||
When user "user" connects and authenticates SMTP client "1"
|
||||
And SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain]":
|
||||
When user "[user:user]" connects and authenticates SMTP client "1"
|
||||
And 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 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]>
|
||||
|
||||
world
|
||||
|
||||
@ -31,21 +31,21 @@ Feature: SMTP sending two messages
|
||||
Then it succeeds
|
||||
|
||||
Scenario: Send with two addresses of the same user in split mode
|
||||
When user "user-multi" connects and authenticates SMTP client "1" with address "user-multi@[domain]"
|
||||
And user "user-multi" connects and authenticates SMTP client "2" with address "user-multi-alias@[domain]"
|
||||
And SMTP client "1" sends the following message from "user-multi@[domain]" to "bridgetest@[domain]>":
|
||||
When user "[user:multi]" connects and authenticates SMTP client "1" with address "[user:multi]@[domain]"
|
||||
And user "[user:multi]" connects and authenticates SMTP client "2" with address "[user:multi-alias]@[domain]"
|
||||
And SMTP client "1" sends the following message from "[user:multi]@[domain]" to "[user:to]@[domain]>":
|
||||
"""
|
||||
From: Bridge Test <user-multi@[domain]>
|
||||
To: Internal Bridge <bridgetest@[domain]>
|
||||
From: Bridge Test <[user:multi]@[domain]>
|
||||
To: Internal Bridge <[user:to]@[domain]>
|
||||
|
||||
hello
|
||||
|
||||
"""
|
||||
Then it succeeds
|
||||
When SMTP client "2" sends the following message from "user-multi@[domain]" to "bridgetest@[domain]>":
|
||||
When SMTP client "2" sends the following message from "[user:multi]@[domain]" to "[user:to]@[domain]>":
|
||||
"""
|
||||
From: Bridge Test <user-multi@[domain]>
|
||||
To: Internal Bridge <bridgetest@[domain]>
|
||||
From: Bridge Test <[user:multi]@[domain]>
|
||||
To: Internal Bridge <[user:to]@[domain]>
|
||||
|
||||
world
|
||||
|
||||
@ -53,21 +53,21 @@ Feature: SMTP sending two messages
|
||||
Then it succeeds
|
||||
|
||||
Scenario: Send with two separate users
|
||||
When user "user" connects and authenticates SMTP client "1"
|
||||
And user "user-multi" connects and authenticates SMTP client "2"
|
||||
When SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain]>":
|
||||
When user "[user:user]" connects and authenticates SMTP client "1"
|
||||
And user "[user:multi]" connects and authenticates SMTP client "2"
|
||||
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 SMTP client "2" sends the following message from "user-multi@[domain]" to "bridgetest@[domain]>":
|
||||
When SMTP client "2" sends the following message from "[user:multi]@[domain]" to "[user:to]@[domain]>":
|
||||
"""
|
||||
From: Bridge Test <user-multi@[domain]>
|
||||
To: Internal Bridge <bridgetest@[domain]>
|
||||
From: Bridge Test <[user:multi]@[domain]>
|
||||
To: Internal Bridge <[user:to]@[domain]>
|
||||
|
||||
world
|
||||
|
||||
|
||||
@ -1,25 +1,25 @@
|
||||
Feature: Address mode
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And the account "user" has additional address "alias@[domain]"
|
||||
And the account "user" has the following custom mailboxes:
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And the account "[user:user]" has additional address "[alias:alias]@[domain]"
|
||||
And the account "[user:user]" has the following custom mailboxes:
|
||||
| name | type |
|
||||
| one | folder |
|
||||
| two | folder |
|
||||
And the address "user@[domain]" of account "user" has the following messages in "one":
|
||||
And the address "[user:user]@[domain]" of account "[user:user]" has the following messages in "one":
|
||||
| from | to | subject | unread |
|
||||
| a@[domain] | a@[domain] | one | true |
|
||||
| b@[domain] | b@[domain] | two | false |
|
||||
And the address "alias@[domain]" of account "user" has the following messages in "two":
|
||||
And the address "[alias:alias]@[domain]" of account "[user:user]" has the following messages in "two":
|
||||
| from | to | subject | unread |
|
||||
| c@[domain] | c@[domain] | three | true |
|
||||
| d@[domain] | d@[domain] | four | false |
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
|
||||
Scenario: The user is in combined mode
|
||||
When user "user" connects and authenticates IMAP client "1" with address "user@[domain]"
|
||||
When user "[user:user]" connects and authenticates IMAP client "1" with address "[user:user]@[domain]"
|
||||
Then IMAP client "1" sees the following messages in "Folders/one":
|
||||
| from | to | subject | unread |
|
||||
| a@[domain] | a@[domain] | one | true |
|
||||
@ -34,7 +34,7 @@ Feature: Address mode
|
||||
| b@[domain] | b@[domain] | two | false |
|
||||
| c@[domain] | c@[domain] | three | true |
|
||||
| d@[domain] | d@[domain] | four | false |
|
||||
When user "user" connects and authenticates IMAP client "2" with address "alias@[domain]"
|
||||
When user "[user:user]" connects and authenticates IMAP client "2" with address "[alias:alias]@[domain]"
|
||||
Then IMAP client "2" sees the following messages in "Folders/one":
|
||||
| from | to | subject | unread |
|
||||
| a@[domain] | a@[domain] | one | true |
|
||||
@ -51,9 +51,9 @@ Feature: Address mode
|
||||
| d@[domain] | d@[domain] | four | false |
|
||||
|
||||
Scenario: The user is in split mode
|
||||
Given the user sets the address mode of user "user" to "split"
|
||||
And user "user" finishes syncing
|
||||
When user "user" connects and authenticates IMAP client "1" with address "user@[domain]"
|
||||
Given the user sets the address mode of user "[user:user]" to "split"
|
||||
And user "[user:user]" finishes syncing
|
||||
When user "[user:user]" connects and authenticates IMAP client "1" with address "[user:user]@[domain]"
|
||||
Then IMAP client "1" sees the following messages in "Folders/one":
|
||||
| from | to | subject | unread |
|
||||
| a@[domain] | a@[domain] | one | true |
|
||||
@ -63,7 +63,7 @@ Feature: Address mode
|
||||
| from | to | subject | unread |
|
||||
| a@[domain] | a@[domain] | one | true |
|
||||
| b@[domain] | b@[domain] | two | false |
|
||||
When user "user" connects and authenticates IMAP client "2" with address "alias@[domain]"
|
||||
When user "[user:user]" connects and authenticates IMAP client "2" with address "[alias:alias]@[domain]"
|
||||
Then IMAP client "2" sees 0 messages in "Folders/one"
|
||||
And IMAP client "2" sees the following messages in "Folders/two":
|
||||
| from | to | subject | unread |
|
||||
@ -75,18 +75,18 @@ Feature: Address mode
|
||||
| d@[domain] | d@[domain] | four | false |
|
||||
|
||||
Scenario: The user switches from combined to split mode and back
|
||||
Given the user sets the address mode of user "user" to "split"
|
||||
And user "user" finishes syncing
|
||||
And the user sets the address mode of user "user" to "combined"
|
||||
And user "user" finishes syncing
|
||||
When user "user" connects and authenticates IMAP client "1" with address "user@[domain]"
|
||||
Given the user sets the address mode of user "[user:user]" to "split"
|
||||
And user "[user:user]" finishes syncing
|
||||
And the user sets the address mode of user "[user:user]" to "combined"
|
||||
And user "[user:user]" finishes syncing
|
||||
When user "[user:user]" connects and authenticates IMAP client "1" with address "[user:user]@[domain]"
|
||||
Then IMAP client "1" sees the following messages in "All Mail":
|
||||
| from | to | subject | unread |
|
||||
| a@[domain] | a@[domain] | one | true |
|
||||
| b@[domain] | b@[domain] | two | false |
|
||||
| c@[domain] | c@[domain] | three | true |
|
||||
| d@[domain] | d@[domain] | four | false |
|
||||
When user "user" connects and authenticates IMAP client "2" with address "alias@[domain]"
|
||||
When user "[user:user]" connects and authenticates IMAP client "2" with address "[alias:alias]@[domain]"
|
||||
Then IMAP client "2" sees the following messages in "All Mail":
|
||||
| from | to | subject | unread |
|
||||
| a@[domain] | a@[domain] | one | true |
|
||||
@ -95,23 +95,23 @@ Feature: Address mode
|
||||
| d@[domain] | d@[domain] | four | false |
|
||||
|
||||
Scenario: The user adds an address while in combined mode
|
||||
When user "user" connects and authenticates IMAP client "1" with address "user@[domain]"
|
||||
When user "[user:user]" connects and authenticates IMAP client "1" with address "[user:user]@[domain]"
|
||||
Then IMAP client "1" sees the following messages in "All Mail":
|
||||
| from | to | subject | unread |
|
||||
| a@[domain] | a@[domain] | one | true |
|
||||
| b@[domain] | b@[domain] | two | false |
|
||||
| c@[domain] | c@[domain] | three | true |
|
||||
| d@[domain] | d@[domain] | four | false |
|
||||
When user "user" connects and authenticates IMAP client "2" with address "alias@[domain]"
|
||||
When user "[user:user]" connects and authenticates IMAP client "2" with address "[alias:alias]@[domain]"
|
||||
Then IMAP client "2" sees the following messages in "All Mail":
|
||||
| from | to | subject | unread |
|
||||
| a@[domain] | a@[domain] | one | true |
|
||||
| b@[domain] | b@[domain] | two | false |
|
||||
| c@[domain] | c@[domain] | three | true |
|
||||
| d@[domain] | d@[domain] | four | false |
|
||||
Given the account "user" has additional address "other@[domain]"
|
||||
And bridge sends an address created event for user "user"
|
||||
When user "user" connects and authenticates IMAP client "3" with address "other@[domain]"
|
||||
Given the account "[user:user]" has additional address "other@[domain]"
|
||||
And bridge sends an address created event for user "[user:user]"
|
||||
When user "[user:user]" connects and authenticates IMAP client "3" with address "other@[domain]"
|
||||
Then IMAP client "3" sees the following messages in "All Mail":
|
||||
| from | to | subject | unread |
|
||||
| a@[domain] | a@[domain] | one | true |
|
||||
@ -120,60 +120,60 @@ Feature: Address mode
|
||||
| d@[domain] | d@[domain] | four | false |
|
||||
|
||||
Scenario: The user adds an address while in split mode
|
||||
Given the user sets the address mode of user "user" to "split"
|
||||
And user "user" finishes syncing
|
||||
When user "user" connects and authenticates IMAP client "1" with address "user@[domain]"
|
||||
Given the user sets the address mode of user "[user:user]" to "split"
|
||||
And user "[user:user]" finishes syncing
|
||||
When user "[user:user]" connects and authenticates IMAP client "1" with address "[user:user]@[domain]"
|
||||
And IMAP client "1" sees the following messages in "All Mail":
|
||||
| from | to | subject | unread |
|
||||
| a@[domain] | a@[domain] | one | true |
|
||||
| b@[domain] | b@[domain] | two | false |
|
||||
When user "user" connects and authenticates IMAP client "2" with address "alias@[domain]"
|
||||
When user "[user:user]" connects and authenticates IMAP client "2" with address "[alias:alias]@[domain]"
|
||||
And IMAP client "2" sees the following messages in "All Mail":
|
||||
| from | to | subject | unread |
|
||||
| c@[domain] | c@[domain] | three | true |
|
||||
| d@[domain] | d@[domain] | four | false |
|
||||
Given the account "user" has additional address "other@[domain]"
|
||||
And bridge sends an address created event for user "user"
|
||||
When user "user" connects and authenticates IMAP client "3" with address "other@[domain]"
|
||||
Given the account "[user:user]" has additional address "other@[domain]"
|
||||
And bridge sends an address created event for user "[user:user]"
|
||||
When user "[user:user]" connects and authenticates IMAP client "3" with address "other@[domain]"
|
||||
Then IMAP client "3" eventually sees 0 messages in "All Mail"
|
||||
|
||||
Scenario: The user deletes an address while in combined mode
|
||||
When user "user" connects and authenticates IMAP client "1" with address "user@[domain]"
|
||||
When user "[user:user]" connects and authenticates IMAP client "1" with address "[user:user]@[domain]"
|
||||
Then IMAP client "1" sees the following messages in "All Mail":
|
||||
| from | to | subject | unread |
|
||||
| a@[domain] | a@[domain] | one | true |
|
||||
| b@[domain] | b@[domain] | two | false |
|
||||
| c@[domain] | c@[domain] | three | true |
|
||||
| d@[domain] | d@[domain] | four | false |
|
||||
When user "user" connects and authenticates IMAP client "2" with address "alias@[domain]"
|
||||
When user "[user:user]" connects and authenticates IMAP client "2" with address "[alias:alias]@[domain]"
|
||||
Then IMAP client "2" sees the following messages in "All Mail":
|
||||
| from | to | subject | unread |
|
||||
| a@[domain] | a@[domain] | one | true |
|
||||
| b@[domain] | b@[domain] | two | false |
|
||||
| c@[domain] | c@[domain] | three | true |
|
||||
| d@[domain] | d@[domain] | four | false |
|
||||
Given the account "user" no longer has additional address "alias@[domain]"
|
||||
And bridge sends an address deleted event for user "user"
|
||||
When user "user" connects IMAP client "3"
|
||||
Then IMAP client "3" cannot authenticate with address "alias@[domain]"
|
||||
Given the account "[user:user]" no longer has additional address "[alias:alias]@[domain]"
|
||||
And bridge sends an address deleted event for user "[user:user]"
|
||||
When user "[user:user]" connects IMAP client "3"
|
||||
Then IMAP client "3" cannot authenticate with address "[alias:alias]@[domain]"
|
||||
|
||||
Scenario: The user deletes an address while in split mode
|
||||
Given the user sets the address mode of user "user" to "split"
|
||||
And user "user" finishes syncing
|
||||
When user "user" connects and authenticates IMAP client "1" with address "user@[domain]"
|
||||
Given the user sets the address mode of user "[user:user]" to "split"
|
||||
And user "[user:user]" finishes syncing
|
||||
When user "[user:user]" connects and authenticates IMAP client "1" with address "[user:user]@[domain]"
|
||||
And IMAP client "1" sees the following messages in "All Mail":
|
||||
| from | to | subject | unread |
|
||||
| a@[domain] | a@[domain] | one | true |
|
||||
| b@[domain] | b@[domain] | two | false |
|
||||
When user "user" connects and authenticates IMAP client "2" with address "alias@[domain]"
|
||||
When user "[user:user]" connects and authenticates IMAP client "2" with address "[alias:alias]@[domain]"
|
||||
And IMAP client "2" sees the following messages in "All Mail":
|
||||
| from | to | subject | unread |
|
||||
| c@[domain] | c@[domain] | three | true |
|
||||
| d@[domain] | d@[domain] | four | false |
|
||||
Given the account "user" no longer has additional address "alias@[domain]"
|
||||
And bridge sends an address deleted event for user "user"
|
||||
When user "user" connects IMAP client "3"
|
||||
Then IMAP client "3" cannot authenticate with address "alias@[domain]"
|
||||
Given the account "[user:user]" no longer has additional address "[alias:alias]@[domain]"
|
||||
And bridge sends an address deleted event for user "[user:user]"
|
||||
When user "[user:user]" connects IMAP client "3"
|
||||
Then IMAP client "3" cannot authenticate with address "[alias:alias]@[domain]"
|
||||
|
||||
Scenario: The user makes an alias the primary address while in combined mode
|
||||
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
Feature: A user can be deleted
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
|
||||
Scenario: Delete a connected user
|
||||
When user "user" is deleted
|
||||
Then user "user" is not listed
|
||||
When user "[user:user]" is deleted
|
||||
Then user "[user:user]" is not listed
|
||||
|
||||
Scenario: Delete a disconnected user
|
||||
Given user "user" logs out
|
||||
When user "user" is deleted
|
||||
Then user "user" is not listed
|
||||
Given user "[user:user]" logs out
|
||||
When user "[user:user]" is deleted
|
||||
Then user "[user:user]" is not listed
|
||||
@ -1,15 +1,15 @@
|
||||
Feature: A logged out user can login again
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
|
||||
Scenario: Login to disconnected account
|
||||
When user "user" logs out
|
||||
When user "[user:user]" logs out
|
||||
And bridge restarts
|
||||
And the user logs in with username "user" and password "password"
|
||||
Then user "user" is listed and connected
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
Then user "[user:user]" is listed and connected
|
||||
|
||||
Scenario: Cannot login to removed account
|
||||
When user "user" is deleted
|
||||
Then user "user" is not listed
|
||||
When user "[user:user]" is deleted
|
||||
Then user "[user:user]" is not listed
|
||||
@ -1,16 +1,16 @@
|
||||
Feature: A logged in user is logged out when its auth is revoked.
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And bridge starts
|
||||
And the user logs in with username "user" and password "password"
|
||||
And the user logs in with username "[user:user]" and password "password"
|
||||
|
||||
Scenario: The auth is revoked while bridge is running
|
||||
When the auth of user "user" is revoked
|
||||
Then bridge sends a deauth event for user "user"
|
||||
And user "user" is listed but not connected
|
||||
When the auth of user "[user:user]" is revoked
|
||||
Then bridge sends a deauth event for user "[user:user]"
|
||||
And user "[user:user]" is listed but not connected
|
||||
|
||||
Scenario: The auth is revoked while bridge is not running
|
||||
Given bridge stops
|
||||
And the auth of user "user" is revoked
|
||||
And the auth of user "[user:user]" is revoked
|
||||
When bridge starts
|
||||
Then user "user" is listed but not connected
|
||||
Then user "[user:user]" is listed but not connected
|
||||
@ -1,26 +1,26 @@
|
||||
Feature: Bridge can fully sync an account
|
||||
Background:
|
||||
Given there exists an account with username "user" and password "password"
|
||||
And the account "user" has the following custom mailboxes:
|
||||
Given there exists an account with username "[user:user]" and password "password"
|
||||
And the account "[user:user]" has the following custom mailboxes:
|
||||
| name | type |
|
||||
| one | folder |
|
||||
| two | folder |
|
||||
| three | label |
|
||||
And the address "user@[domain]" of account "user" has the following messages in "one":
|
||||
And the address "[user:user]@[domain]" of account "[user:user]" has the following messages in "one":
|
||||
| from | to | subject | unread |
|
||||
| a@[domain] | a@[domain] | one | true |
|
||||
| b@[domain] | b@[domain] | two | false |
|
||||
And the address "user@[domain]" of account "user" has the following messages in "two":
|
||||
And the address "[user:user]@[domain]" of account "[user:user]" has the following messages in "two":
|
||||
| from | to | subject | unread |
|
||||
| a@[domain] | a@[domain] | one | true |
|
||||
| b@[domain] | b@[domain] | two | false |
|
||||
And bridge starts
|
||||
|
||||
Scenario: The account is synced when the user logs in and persists across bridge restarts
|
||||
When the user logs in with username "user" and password "password"
|
||||
Then bridge sends sync started and finished events for user "user"
|
||||
When the user logs in with username "[user:user]" and password "password"
|
||||
Then bridge sends sync started and finished events for user "[user:user]"
|
||||
When bridge restarts
|
||||
And user "user" connects and authenticates IMAP client "1"
|
||||
And user "[user:user]" connects and authenticates IMAP client "1"
|
||||
Then IMAP client "1" sees the following mailbox info:
|
||||
| name | total | unread |
|
||||
| INBOX | 0 | 0 |
|
||||
@ -38,12 +38,12 @@ Feature: Bridge can fully sync an account
|
||||
| Labels/three | 0 | 0 |
|
||||
|
||||
Scenario: If the gluon files are deleted, the account is synced again
|
||||
Given the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
Given the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
And bridge stops
|
||||
And the user deletes the gluon files
|
||||
And bridge starts
|
||||
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 mailbox info:
|
||||
| name | total | unread |
|
||||
| INBOX | 0 | 0 |
|
||||
@ -61,10 +61,10 @@ Feature: Bridge can fully sync an account
|
||||
| Labels/three | 0 | 0 |
|
||||
|
||||
Scenario: If an address has no keys, it does not break other addresses
|
||||
Given the account "user" has additional address "alias@[domain]" without keys
|
||||
When the user logs in with username "user" and password "password"
|
||||
And user "user" finishes syncing
|
||||
When user "user" connects and authenticates IMAP client "1"
|
||||
Given the account "[user:user]" has additional address "[alias:alias]@[domain]" without keys
|
||||
When the user logs in with username "[user:user]" and password "password"
|
||||
And user "[user:user]" finishes syncing
|
||||
When user "[user:user]" connects and authenticates IMAP client "1"
|
||||
Then IMAP client "1" eventually sees the following messages in "Folders/one":
|
||||
| from | to | subject | unread |
|
||||
| a@[domain] | a@[domain] | one | true |
|
||||
|
||||
@ -32,8 +32,8 @@ func init() {
|
||||
// Use the fast cert generation for tests.
|
||||
certs.GenerateCert = FastGenerateCert
|
||||
|
||||
// Set the event period to 100 milliseconds for more responsive tests.
|
||||
user.EventPeriod = 100 * time.Millisecond
|
||||
// Set the event period to 1 second for more responsive tests.
|
||||
user.EventPeriod = time.Second
|
||||
|
||||
// Don't use jitter during tests.
|
||||
user.EventJitter = 0
|
||||
|
||||
@ -123,7 +123,7 @@ func (s *scenario) theAccountHasAdditionalAddressWithoutKeys(username, address s
|
||||
userID := s.t.getUserID(username)
|
||||
|
||||
// Decrypt the user's encrypted ID for use with quark.
|
||||
userDecID, err := s.t.runQuarkCmd(context.Background(), "--decrypt", "encryption:id", userID)
|
||||
userDecID, err := s.t.runQuarkCmd(context.Background(), "encryption:id", "--decrypt", userID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -180,6 +180,7 @@ func (s *scenario) theAccountHasCustomFolders(username string, count int) error
|
||||
if _, err := client.CreateLabel(ctx, proton.CreateLabelReq{
|
||||
Name: uuid.NewString(),
|
||||
Type: proton.LabelTypeFolder,
|
||||
Color: "#f66",
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
@ -198,6 +199,7 @@ func (s *scenario) theAccountHasCustomLabels(username string, count int) error {
|
||||
if _, err := client.CreateLabel(ctx, proton.CreateLabelReq{
|
||||
Name: uuid.NewString(),
|
||||
Type: proton.LabelTypeLabel,
|
||||
Color: "#f66",
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
@ -236,6 +238,7 @@ func (s *scenario) theAccountHasTheFollowingCustomMailboxes(username string, tab
|
||||
if _, err := client.CreateLabel(ctx, proton.CreateLabelReq{
|
||||
Name: wantMailbox.Name,
|
||||
Type: labelType,
|
||||
Color: "#f66",
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user