diff --git a/tests/api_test.go b/tests/api_test.go index 1920062e..a4991acb 100644 --- a/tests/api_test.go +++ b/tests/api_test.go @@ -26,6 +26,7 @@ type API interface { SetMinAppVersion(*semver.Version) GetHostURL() string + GetDomain() string AddCallWatcher(func(server.Call), ...string) RemoveAddressKey(userID, addrID, keyID string) error diff --git a/tests/bdd_test.go b/tests/bdd_test.go index e1281352..088e7a03 100644 --- a/tests/bdd_test.go +++ b/tests/bdd_test.go @@ -20,7 +20,6 @@ package tests import ( "context" "os" - "runtime" "strings" "testing" @@ -66,13 +65,9 @@ func TestFeatures(testingT *testing.T) { }) ctx.StepContext().Before(func(ctx context.Context, st *godog.Step) (context.Context, error) { - // Replace [GOOS] with the current OS. - // Note: should add a generic replacement function on the test context to handle more cases! - st.Text = strings.ReplaceAll(st.Text, "[GOOS]", runtime.GOOS) - logrus.Debugf("Running step: %s", st.Text) - s.t.beforeStep() + s.t.beforeStep(st) return ctx, nil }) @@ -113,7 +108,7 @@ func TestFeatures(testingT *testing.T) { ctx.Step(`^the user has disabled automatic updates$`, s.theUserHasDisabledAutomaticUpdates) ctx.Step(`^the user changes the IMAP port to (\d+)$`, s.theUserChangesTheIMAPPortTo) ctx.Step(`^the user changes the SMTP port to (\d+)$`, s.theUserChangesTheSMTPPortTo) - ctx.Step(`^the user sets the address mode of "([^"]*)" to "([^"]*)"$`, s.theUserSetsTheAddressModeOfTo) + ctx.Step(`^the user sets the address mode of user "([^"]*)" to "([^"]*)"$`, s.theUserSetsTheAddressModeOfUserTo) ctx.Step(`^the user changes the gluon path$`, s.theUserChangesTheGluonPath) ctx.Step(`^the user deletes the gluon files$`, s.theUserDeletesTheGluonFiles) ctx.Step(`^the user reports a bug$`, s.theUserReportsABug) diff --git a/tests/bridge_test.go b/tests/bridge_test.go index 720d8d25..a983df85 100644 --- a/tests/bridge_test.go +++ b/tests/bridge_test.go @@ -65,7 +65,7 @@ func (s *scenario) theUserChangesTheSMTPPortTo(port int) error { return s.t.bridge.SetSMTPPort(port) } -func (s *scenario) theUserSetsTheAddressModeOfTo(user, mode string) error { +func (s *scenario) theUserSetsTheAddressModeOfUserTo(user, mode string) error { switch mode { case "split": return s.t.bridge.SetAddressMode(context.Background(), s.t.getUserID(user), vault.SplitMode) diff --git a/tests/ctx_test.go b/tests/ctx_test.go index aef37f69..606c6401 100644 --- a/tests/ctx_test.go +++ b/tests/ctx_test.go @@ -22,6 +22,8 @@ import ( "fmt" "net/smtp" "regexp" + "runtime" + "strings" "sync" "testing" @@ -33,6 +35,7 @@ import ( frontend "github.com/ProtonMail/proton-bridge/v3/internal/frontend/grpc" "github.com/ProtonMail/proton-bridge/v3/internal/locations" "github.com/bradenaw/juniper/xslices" + "github.com/cucumber/godog" "github.com/emersion/go-imap/client" "github.com/sirupsen/logrus" "golang.org/x/exp/maps" @@ -127,7 +130,33 @@ func newTestCtx(tb testing.TB) *testCtx { return t } -func (t *testCtx) beforeStep() { +func (t *testCtx) replace(value string) string { + // Replace [GOOS] with the current OS. + value = strings.ReplaceAll(value, "[GOOS]", runtime.GOOS) + + // Replace [domain] with the domain of the test server. + value = strings.ReplaceAll(value, "[domain]", t.api.GetDomain()) + + return value +} + +func (t *testCtx) beforeStep(st *godog.Step) { + st.Text = t.replace(st.Text) + + if argument := st.Argument; argument != nil { + if table := argument.DataTable; table != nil { + for _, row := range table.Rows { + for _, cell := range row.Cells { + cell.Value = t.replace(cell.Value) + } + } + } + + if doc := argument.DocString; doc != nil { + doc.Content = t.replace(doc.Content) + } + } + t.callsLock.Lock() defer t.callsLock.Unlock() @@ -136,6 +165,7 @@ func (t *testCtx) beforeStep() { t.calls = append(t.calls, nil) t.errors = append(t.errors, nil) + } func (t *testCtx) getName(wantUserID string) string { diff --git a/tests/features/imap/auth.feature b/tests/features/imap/auth.feature index fb2dc6a2..1e741d21 100644 --- a/tests/features/imap/auth.feature +++ b/tests/features/imap/auth.feature @@ -1,30 +1,30 @@ Feature: A user can authenticate an IMAP client Background: - Given there exists an account with username "user@pm.me" and password "password" + Given there exists an account with username "user" and password "password" And bridge starts - And the user logs in with username "user@pm.me" and password "password" + And the user logs in with username "user" and password "password" Scenario: IMAP client can authenticate successfully - When user "user@pm.me" connects IMAP client "1" + When user "user" connects IMAP client "1" Then IMAP client "1" can authenticate Scenario: IMAP client can authenticate successfully with different case - When user "user@pm.me" connects IMAP client "1" - Then IMAP client "1" can authenticate with address "USER@PM.ME" + When user "user" connects IMAP client "1" + Then IMAP client "1" can authenticate with address "USER@[domain]" Scenario: IMAP client can authenticate successfully - When user "user@pm.me" connects IMAP client "1" + When user "user" connects IMAP client "1" Then IMAP client "1" can authenticate Scenario: IMAP client cannot authenticate with bad username - When user "user@pm.me" connects IMAP client "1" + When 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@pm.me" connects IMAP client "1" + When 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@pm.me" logs out - And user "user@pm.me" connects IMAP client "1" + When user "user" logs out + And user "user" connects IMAP client "1" Then IMAP client "1" cannot authenticate diff --git a/tests/features/imap/id.feature b/tests/features/imap/id.feature index ff158718..12730e70 100644 --- a/tests/features/imap/id.feature +++ b/tests/features/imap/id.feature @@ -1,20 +1,20 @@ Feature: The IMAP ID is propagated to bridge Background: - Given there exists an account with username "user@pm.me" and password "password" + Given there exists an account with username "user" and password "password" And bridge starts - And the user logs in with username "user@pm.me" and password "password" + And the user logs in with username "user" and password "password" Scenario: Initial user agent before an IMAP client announces its ID - When user "user@pm.me" connects IMAP client "1" + When 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@pm.me" connects IMAP client "1" + When 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@pm.me" connects IMAP client "1" + When 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])" \ No newline at end of file diff --git a/tests/features/imap/mailbox/create.feature b/tests/features/imap/mailbox/create.feature index 82019a1c..43744235 100644 --- a/tests/features/imap/mailbox/create.feature +++ b/tests/features/imap/mailbox/create.feature @@ -1,16 +1,16 @@ Feature: IMAP create mailbox Background: - Given there exists an account with username "user@pm.me" and password "password" - And the account "user@pm.me" has the following custom mailboxes: + Given there exists an account with username "user" and password "password" + And the account "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@pm.me" and password "password" - And user "user@pm.me" finishes syncing - And user "user@pm.me" connects and authenticates IMAP client "1" + 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" Scenario: Create folder When IMAP client "1" creates "Folders/mbox" @@ -38,23 +38,23 @@ Feature: IMAP create mailbox When IMAP client "1" creates "Labels/l3" Then it succeeds Then IMAP client "1" sees the following mailbox info: - | name | - | INBOX | - | Drafts | - | Sent | - | Starred | - | Archive | - | Spam | - | Trash | - | All Mail | - | Folders | - | Folders/f1 | - | Folders/f2 | - | Folders/f3 | - | Labels | - | Labels/l1 | - | Labels/l2 | - | Labels/l3 | + | name | + | INBOX | + | Drafts | + | Sent | + | Starred | + | Archive | + | Spam | + | Trash | + | All Mail | + | Folders | + | Folders/f1 | + | Folders/f2 | + | Folders/f3 | + | Labels | + | Labels/l1 | + | Labels/l2 | + | Labels/l3 | Scenario: Creating subfolders is possible and they persist after resync When IMAP client "1" creates "Folders/f1/f11" @@ -85,10 +85,10 @@ Feature: IMAP create mailbox | Labels | | Labels/l1 | | Labels/l2 | - When user "user@pm.me" is deleted - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" finishes syncing - And user "user@pm.me" connects and authenticates IMAP client "2" + 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" 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@pm.me" is deleted - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" finishes syncing - And user "user@pm.me" connects and authenticates IMAP client "2" + 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" Then IMAP client "2" sees the following mailbox info: | name | | INBOX | diff --git a/tests/features/imap/mailbox/delete.feature b/tests/features/imap/mailbox/delete.feature index 6d93901e..7b3efc7b 100644 --- a/tests/features/imap/mailbox/delete.feature +++ b/tests/features/imap/mailbox/delete.feature @@ -1,15 +1,15 @@ Feature: IMAP delete mailbox Background: - Given there exists an account with username "user@pm.me" and password "password" - And the account "user@pm.me" has the following custom mailboxes: + Given there exists an account with username "user" and password "password" + And the account "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@pm.me" and password "password" - And user "user@pm.me" finishes syncing - And user "user@pm.me" connects and authenticates IMAP client "1" + 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" Scenario: Delete folder When IMAP client "1" deletes "Folders/one" diff --git a/tests/features/imap/mailbox/hide_all_mail.feature b/tests/features/imap/mailbox/hide_all_mail.feature index aaba42b6..611d030b 100644 --- a/tests/features/imap/mailbox/hide_all_mail.feature +++ b/tests/features/imap/mailbox/hide_all_mail.feature @@ -1,46 +1,46 @@ Feature: IMAP Hide All Mail Background: - Given there exists an account with username "user@pm.me" and password "password" + Given there exists an account with username "user" and password "password" And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" finishes syncing - And user "user@pm.me" connects and authenticates IMAP client "1" + 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" Scenario: Hide All Mail Mailbox Given IMAP client "1" sees the following mailbox info: - | name | - | INBOX | - | Drafts | - | Sent | - | Starred | - | Archive | - | Spam | - | Trash | - | All Mail | - | Folders | - | Labels | + | name | + | INBOX | + | Drafts | + | Sent | + | Starred | + | Archive | + | Spam | + | Trash | + | All Mail | + | Folders | + | Labels | When the user hides All Mail Then IMAP client "1" sees the following mailbox info: - | name | - | INBOX | - | Drafts | - | Sent | - | Starred | - | Archive | - | Spam | - | Trash | - | Folders | - | Labels | + | name | + | INBOX | + | Drafts | + | Sent | + | Starred | + | Archive | + | Spam | + | Trash | + | Folders | + | Labels | When the user shows All Mail Then IMAP client "1" sees the following mailbox info: - | name | - | INBOX | - | Drafts | - | Sent | - | Starred | - | Archive | - | Spam | - | Trash | - | All Mail | - | Folders | - | Labels | + | name | + | INBOX | + | Drafts | + | Sent | + | Starred | + | Archive | + | Spam | + | Trash | + | All Mail | + | Folders | + | Labels | diff --git a/tests/features/imap/mailbox/info.feature b/tests/features/imap/mailbox/info.feature index 6ab1b700..9cfc000d 100644 --- a/tests/features/imap/mailbox/info.feature +++ b/tests/features/imap/mailbox/info.feature @@ -1,19 +1,19 @@ Feature: IMAP get mailbox info Background: - Given there exists an account with username "user@pm.me" and password "password" - And the account "user@pm.me" has the following custom mailboxes: - | name | type | - | one | folder | - And the address "user@pm.me" of account "user@pm.me" has the following messages in "one": - | from | to | subject | unread | - | a@pm.me | a@pm.me | one | true | - | b@pm.me | b@pm.me | two | false | + Given there exists an account with username "user" and password "password" + And the account "user" has the following custom mailboxes: + | name | type | + | one | folder | + And the address "user@[domain]" of account "user" has the following messages in "one": + | from | to | subject | unread | + | a@[domain] | a@[domain] | one | true | + | b@[domain] | b@[domain] | two | false | And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" finishes syncing + And the user logs in with username "user" and password "password" + And user "user" finishes syncing Scenario: Mailbox status reports correct name, total and unread - When user "user@pm.me" connects and authenticates IMAP client "1" + When 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 | \ No newline at end of file + | name | total | unread | + | Folders/one | 2 | 1 | \ No newline at end of file diff --git a/tests/features/imap/mailbox/list.feature b/tests/features/imap/mailbox/list.feature index 11b52bc1..efdbada5 100644 --- a/tests/features/imap/mailbox/list.feature +++ b/tests/features/imap/mailbox/list.feature @@ -1,14 +1,14 @@ Feature: IMAP list mailboxes Scenario: List mailboxes - Given there exists an account with username "user@pm.me" and password "password" - And the account "user@pm.me" has the following custom mailboxes: + Given there exists an account with username "user" and password "password" + And the account "user" has the following custom mailboxes: | name | type | | mbox1 | folder | | mbox2 | label | When bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" finishes syncing - And user "user@pm.me" connects and authenticates IMAP client "1" + 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" 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@pm.me" and password "password" - And the account "user@pm.me" has 20 custom folders - And the account "user@pm.me" has 60 custom labels + 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 When bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" finishes syncing - When user "user@pm.me" connects and authenticates IMAP client "1" - And user "user@pm.me" connects and authenticates IMAP client "2" + 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" 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" diff --git a/tests/features/imap/mailbox/rename.feature b/tests/features/imap/mailbox/rename.feature index c30b0bde..9130aa70 100644 --- a/tests/features/imap/mailbox/rename.feature +++ b/tests/features/imap/mailbox/rename.feature @@ -1,14 +1,14 @@ Feature: IMAP get mailbox info Background: - Given there exists an account with username "user@pm.me" and password "password" - And the account "user@pm.me" has the following custom mailboxes: + Given there exists an account with username "user" and password "password" + And the account "user" has the following custom mailboxes: | name | type | | f1 | folder | | l1 | label | And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" finishes syncing - And user "user@pm.me" connects and authenticates IMAP client "1" + 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" Scenario: Rename folder When IMAP client "1" renames "Folders/f1" to "Folders/f2" diff --git a/tests/features/imap/mailbox/select.feature b/tests/features/imap/mailbox/select.feature index f1bd2731..cf8fed70 100644 --- a/tests/features/imap/mailbox/select.feature +++ b/tests/features/imap/mailbox/select.feature @@ -1,14 +1,14 @@ Feature: IMAP select mailbox Background: - Given there exists an account with username "user@pm.me" and password "password" - And the account "user@pm.me" has the following custom mailboxes: + Given there exists an account with username "user" and password "password" + And the account "user" has the following custom mailboxes: | name | type | | mbox | folder | | label | label | And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" finishes syncing - And user "user@pm.me" connects and authenticates IMAP client "1" + 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" Scenario: Select inbox When IMAP client "1" selects "INBOX" diff --git a/tests/features/imap/message/copy.feature b/tests/features/imap/message/copy.feature index b6eeff4a..6a61a245 100644 --- a/tests/features/imap/message/copy.feature +++ b/tests/features/imap/message/copy.feature @@ -1,61 +1,61 @@ Feature: IMAP copy messages Background: - Given there exists an account with username "user@pm.me" and password "password" - And the account "user@pm.me" has the following custom mailboxes: + Given there exists an account with username "user" and password "password" + And the account "user" has the following custom mailboxes: | name | type | | mbox | folder | | label | label | - And the address "user@pm.me" of account "user@pm.me" has the following messages in "Inbox": - | from | to | subject | unread | - | john.doe@mail.com | user@pm.me | foo | false | - | jane.doe@mail.com | name@pm.me | bar | true | + And the address "user@[domain]" of account "user" has the following messages in "Inbox": + | from | to | subject | unread | + | john.doe@mail.com | user@[domain] | foo | false | + | jane.doe@mail.com | name@[domain] | bar | true | And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" finishes syncing - And user "user@pm.me" connects and authenticates IMAP client "1" + 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" 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@pm.me | foo | false | - | jane.doe@mail.com | name@pm.me | bar | true | + | from | to | subject | unread | + | john.doe@mail.com | 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@pm.me | foo | false | + | from | to | subject | unread | + | john.doe@mail.com | 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@pm.me | foo | false | - | jane.doe@mail.com | name@pm.me | bar | true | + | from | to | subject | unread | + | john.doe@mail.com | 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@pm.me | foo | false | - | jane.doe@mail.com | name@pm.me | bar | true | + | from | to | subject | unread | + | john.doe@mail.com | user@[domain] | foo | false | + | jane.doe@mail.com | name@[domain] | bar | true | Scenario: Copy message to folder does move When IMAP client "1" copies the message with subject "foo" from "INBOX" to "Folders/mbox" Then IMAP client "1" eventually sees the following messages in "INBOX": - | from | to | subject | unread | - | jane.doe@mail.com | name@pm.me | bar | true | + | from | to | subject | unread | + | 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@pm.me | foo | false | + | from | to | subject | unread | + | john.doe@mail.com | 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@pm.me | foo | false | - | jane.doe@mail.com | name@pm.me | bar | true | + | from | to | subject | unread | + | john.doe@mail.com | user@[domain] | foo | false | + | jane.doe@mail.com | name@[domain] | bar | true | And IMAP client "1" eventually sees 0 messages in "INBOX" Scenario: Copy message from Inbox to Sent is not possible 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@pm.me | foo | false | - | jane.doe@mail.com | name@pm.me | bar | true | + | from | to | subject | unread | + | john.doe@mail.com | user@[domain] | foo | false | + | jane.doe@mail.com | name@[domain] | bar | true | And IMAP client "1" eventually sees 0 messages in "Sent" \ No newline at end of file diff --git a/tests/features/imap/message/create.feature b/tests/features/imap/message/create.feature index fee5fb7e..3c415092 100644 --- a/tests/features/imap/message/create.feature +++ b/tests/features/imap/message/create.feature @@ -1,81 +1,81 @@ Feature: IMAP create messages Background: - Given there exists an account with username "user@pm.me" and password "password" - And the account "user@pm.me" has additional address "alias@pm.me" + Given there exists an account with username "user" and password "password" + And the account "user" has additional address "alias@[domain]" And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" finishes syncing - And user "user@pm.me" connects and authenticates IMAP client "1" + 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" 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@pm.me | foo | bar | + | from | to | subject | body | + | john.doe@email.com | 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@pm.me | foo | bar | + | from | to | subject | body | + | john.doe@email.com | user@[domain] | foo | bar | And IMAP client "1" sees the following messages in "All Mail": - | from | to | subject | body | - | john.doe@email.com | user@pm.me | foo | bar | + | from | to | subject | body | + | john.doe@email.com | user@[domain] | foo | bar | Scenario: Creates draft When IMAP client "1" appends the following messages to "Drafts": - | from | to | subject | body | - | user@pm.me | john.doe@email.com | foo | bar | + | from | to | subject | body | + | 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@pm.me | john.doe@email.com | foo | bar | + | from | to | subject | body | + | 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@pm.me | john.doe@email.com | foo | bar | + | from | to | subject | body | + | 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@pm.me | john.doe@email.com | foo | bar | + | from | to | subject | body | + | 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@pm.me | john.doe@email.com | foo | bar | + | from | to | subject | body | + | user@[domain] | john.doe@email.com | foo | bar | And IMAP client "1" sees the following messages in "All Mail": - | from | to | subject | body | - | user@pm.me | john.doe@email.com | foo | bar | + | from | to | subject | body | + | 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@pm.me | john.doe@email.com | foo | bar | + | from | to | subject | body | + | 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@pm.me | john.doe@email.com | foo | bar | + | from | to | subject | body | + | alias@[domain] | john.doe@email.com | foo | bar | And IMAP client "1" sees the following messages in "All Mail": - | from | to | subject | body | - | alias@pm.me | john.doe@email.com | foo | bar | + | from | to | subject | body | + | 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": - | from | to | subject | body | - | john.doe@email.com | john.doe2@pm.me | foo | bar | + | from | to | subject | body | + | john.doe@email.com | john.doe2@[domain] | foo | bar | Then it succeeds And IMAP client "1" sees the following messages in "INBOX": - | from | to | subject | body | - | john.doe@email.com | john.doe2@pm.me | foo | bar | + | from | to | subject | body | + | john.doe@email.com | john.doe2@[domain] | foo | bar | And IMAP client "1" sees the following messages in "All Mail": - | from | to | subject | body | - | john.doe@email.com | john.doe2@pm.me | foo | bar | + | from | to | subject | body | + | john.doe@email.com | john.doe2@[domain] | foo | bar | Scenario: Imports an unrelated message to sent When IMAP client "1" appends the following messages to "Sent": - | from | to | subject | body | - | john.doe@email.com | john.doe2@pm.me | foo | bar | + | from | to | subject | body | + | john.doe@email.com | john.doe2@[domain] | foo | bar | Then it succeeds And IMAP client "1" sees the following messages in "Sent": - | from | to | subject | body | - | john.doe@email.com | john.doe2@pm.me | foo | bar | + | from | to | subject | body | + | john.doe@email.com | john.doe2@[domain] | foo | bar | And IMAP client "1" sees the following messages in "All Mail": - | from | to | subject | body | - | john.doe@email.com | john.doe2@pm.me | foo | bar | + | from | to | subject | body | + | john.doe@email.com | john.doe2@[domain] | foo | bar | diff --git a/tests/features/imap/message/delete.feature b/tests/features/imap/message/delete.feature index 11df8b0d..f1c6b23b 100644 --- a/tests/features/imap/message/delete.feature +++ b/tests/features/imap/message/delete.feature @@ -1,15 +1,15 @@ Feature: IMAP remove messages from mailbox Background: - Given there exists an account with username "user@pm.me" and password "password" - And the account "user@pm.me" has the following custom mailboxes: + Given there exists an account with username "user" and password "password" + And the account "user" has the following custom mailboxes: | name | type | | mbox | folder | | label | label | - And the address "user@pm.me" of account "user@pm.me" has 10 messages in "mbox" + And the address "user@[domain]" of account "user" has 10 messages in "mbox" And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" finishes syncing - And user "user@pm.me" connects and authenticates IMAP client "1" + 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" Scenario: Mark message as deleted and EXPUNGE When IMAP client "1" selects "Folders/mbox" @@ -35,8 +35,8 @@ Feature: IMAP remove messages from mailbox And it succeeds Then IMAP client "1" sees 2 messages in "Folders/mbox" - Scenario: Not possible to delete from All Mail and expunge does nothing - When IMAP client "1" selects "All Mail" - And IMAP client "1" marks message 2 as deleted - And IMAP client "1" expunges - Then it fails \ No newline at end of file + Scenario: Not possible to delete from All Mail and expunge does nothing + When IMAP client "1" selects "All Mail" + And IMAP client "1" marks message 2 as deleted + And IMAP client "1" expunges + Then it fails \ No newline at end of file diff --git a/tests/features/imap/message/delete_from_trash.feature b/tests/features/imap/message/delete_from_trash.feature index 43d79265..cad6fc48 100644 --- a/tests/features/imap/message/delete_from_trash.feature +++ b/tests/features/imap/message/delete_from_trash.feature @@ -1,20 +1,20 @@ Feature: IMAP remove messages from Trash Background: - Given there exists an account with username "user@pm.me" and password "password" - And the account "user@pm.me" has the following custom mailboxes: + Given there exists an account with username "user" and password "password" + And the account "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@pm.me" of account "user@pm.me" has the following messages in "Trash": - | from | to | subject | body | - | john.doe@mail.com | user@pm.me | foo | hello | - | jane.doe@mail.com | name@pm.me | bar | world | + Given the address "user@[domain]" of account "user" has the following messages in "Trash": + | from | to | subject | body | + | john.doe@mail.com | user@[domain] | foo | hello | + | jane.doe@mail.com | name@[domain] | bar | world | And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" finishes syncing - And user "user@pm.me" connects and authenticates IMAP client "1" + 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 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@pm.me" of account "user@pm.me" has the following messages in "Trash": - | from | to | subject | body | - | john.doe@mail.com | user@pm.me | foo | hello | - | jane.doe@mail.com | name@pm.me | bar | world | + Given the address "user@[domain]" of account "user" has the following messages in "Trash": + | from | to | subject | body | + | john.doe@mail.com | user@[domain] | foo | hello | + | jane.doe@mail.com | name@[domain] | bar | world | And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" finishes syncing - And user "user@pm.me" connects and authenticates IMAP client "1" + 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 IMAP client "1" selects "Trash" When IMAP client "1" marks the message with subject "foo" as deleted Then it succeeds diff --git a/tests/features/imap/message/drafts.feature b/tests/features/imap/message/drafts.feature index 721d84d8..be51a9ba 100644 --- a/tests/features/imap/message/drafts.feature +++ b/tests/features/imap/message/drafts.feature @@ -1,10 +1,10 @@ Feature: IMAP Draft messages Background: - Given there exists an account with username "user@pm.me" and password "password" + Given there exists an account with username "user" and password "password" And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" finishes syncing - And user "user@pm.me" connects and authenticates IMAP client "1" + 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 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@pm.me" of account "user@pm.me": + When the following fields were changed in draft 1 for address "user@[domain]" of account "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": diff --git a/tests/features/imap/message/import.feature b/tests/features/imap/message/import.feature index a2de4212..65595711 100644 --- a/tests/features/imap/message/import.feature +++ b/tests/features/imap/message/import.feature @@ -1,16 +1,16 @@ Feature: IMAP import messages Background: - Given there exists an account with username "user@pm.me" and password "password" + Given there exists an account with username "user" and password "password" And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" finishes syncing - And user "user@pm.me" connects and authenticates IMAP client "1" + 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" Scenario: Basic message import When IMAP client "1" appends the following message to "INBOX": """ From: Bridge Test - To: Internal Bridge + To: Internal Bridge 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 @@ -19,14 +19,14 @@ 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@protonmail.com | Basic text/plain message | Hello | + | from | to | subject | body | + | bridgetest@pm.test | bridgetest@[domain] | 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 - To: Internal Bridge + To: Internal Bridge Subject: Message with double charset in content type Content-Type: text/plain; charset=utf-8; charset=utf-8 Content-Disposition: inline @@ -36,8 +36,8 @@ 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@protonmail.com | Message with double charset in content type | Hello | + | from | to | subject | body | + | bridgetest@pm.test | bridgetest@[domain] | 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 @@ -123,10 +123,10 @@ Feature: IMAP import messages | lionel@richie.com | RE: Hello, is it me you looking for? | Nope. | Examples: - | mailbox | - | Drafts | - | Archive | - | Sent | + | mailbox | + | Drafts | + | Archive | + | Sent | Scenario: Import embedded message When IMAP client "1" appends the following message to "INBOX": diff --git a/tests/features/imap/message/move_without_support.feature b/tests/features/imap/message/move_without_support.feature index d29d919a..63b56b4a 100644 --- a/tests/features/imap/message/move_without_support.feature +++ b/tests/features/imap/message/move_without_support.feature @@ -1,21 +1,21 @@ Feature: IMAP move messages by append and delete (without MOVE support, e.g., Outlook) Background: - Given there exists an account with username "user@pm.me" and password "password" - And the account "user@pm.me" has the following custom mailboxes: - | name | type | - | mbox | folder | + Given there exists an account with username "user" and password "password" + And the account "user" has the following custom mailboxes: + | name | type | + | mbox | folder | And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" finishes syncing - And user "user@pm.me" connects and authenticates IMAP client "source" - And user "user@pm.me" connects and authenticates IMAP client "target" + 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" Scenario Outline: Move message from to by When IMAP client "source" appends the following message to "": """ Received: by 2002:0:0:0:0:0:0:0 with SMTP id 0123456789abcdef; Wed, 30 Dec 2020 01:23:45 0000 - From: sndr1@pm.me - To: rcvr1@pm.me + From: sndr1@[domain] + To: rcvr1@[domain] Subject: subj1 body1 @@ -24,8 +24,8 @@ Feature: IMAP move messages by append and delete (without MOVE support, e.g., Ou When IMAP client "source" appends the following message to "": """ Received: by 2002:0:0:0:0:0:0:0 with SMTP id 0123456789abcdef; Wed, 30 Dec 2020 01:23:45 0000 - From: sndr2@pm.me - To: rcvr2@pm.me + From: sndr2@[domain] + To: rcvr2@[domain] Subject: subj2 body2 @@ -36,12 +36,12 @@ Feature: IMAP move messages by append and delete (without MOVE support, e.g., Ou When IMAP clients "source" and "target" move message seq "2" of "user" to "" by And IMAP client "source" sees 1 messages in "" And IMAP client "source" sees the following messages in "": - | from | to | subject | - | sndr1@pm.me | rcvr1@pm.me | subj1 | + | from | to | subject | + | sndr1@[domain] | rcvr1@[domain] | subj1 | And IMAP client "target" sees 1 messages in "" And IMAP client "target" sees the following messages in "": - | from | to | subject | - | sndr2@pm.me | rcvr2@pm.me | subj2 | + | from | to | subject | + | sndr2@[domain] | rcvr2@[domain] | subj2 | Examples: | srcMailbox | dstMailbox | order | | Trash | INBOX | APPEND DELETE EXPUNGE | diff --git a/tests/features/imap/migration.feature b/tests/features/imap/migration.feature index 03763400..d2993891 100644 --- a/tests/features/imap/migration.feature +++ b/tests/features/imap/migration.feature @@ -1,17 +1,17 @@ Feature: Bridge can fully sync an account Background: - Given there exists an account with username "user@pm.me" and password "password" - And the account "user@pm.me" has 20 custom folders - And the account "user@pm.me" has 60 custom labels + 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 When bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" finishes syncing - When user "user@pm.me" connects and authenticates IMAP client "1" + 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" 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@pm.me" connects and authenticates IMAP client "2" + And 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" \ No newline at end of file diff --git a/tests/features/imap/ports.feature b/tests/features/imap/ports.feature index b9399a65..52e522e2 100644 --- a/tests/features/imap/ports.feature +++ b/tests/features/imap/ports.feature @@ -1,10 +1,10 @@ Feature: A user can connect an IMAP client to custom ports Background: - Given there exists an account with username "user@pm.me" and password "password" + Given there exists an account with username "user" and password "password" And bridge starts - And the user logs in with username "user@pm.me" and password "password" + And the user logs in with username "user" and password "password" And the user changes the IMAP port to 1144 Scenario: Authenticates successfully on custom port - When user "user@pm.me" connects IMAP client "1" on port 1144 + When user "user" connects IMAP client "1" on port 1144 Then IMAP client "1" can authenticate \ No newline at end of file diff --git a/tests/features/smtp/auth.feature b/tests/features/smtp/auth.feature index df186d5b..c9ac3fcc 100644 --- a/tests/features/smtp/auth.feature +++ b/tests/features/smtp/auth.feature @@ -1,22 +1,22 @@ Feature: A user can authenticate an SMTP client Background: - Given there exists an account with username "user@pm.me" and password "password" + Given there exists an account with username "user" and password "password" And bridge starts - And the user logs in with username "user@pm.me" and password "password" + And the user logs in with username "user" and password "password" Scenario: SMTP client can authenticate successfully - When user "user@pm.me" connects SMTP client "1" + When user "user" connects SMTP client "1" Then SMTP client "1" can authenticate Scenario: SMTP client cannot authenticate with wrong username - When user "user@pm.me" connects SMTP client "1" + When 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@pm.me" connects SMTP client "1" + When 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@pm.me" logs out - And user "user@pm.me" connects SMTP client "1" + When user "user" logs out + And user "user" connects SMTP client "1" Then SMTP client "1" cannot authenticate \ No newline at end of file diff --git a/tests/features/smtp/init.feature b/tests/features/smtp/init.feature index fd62e941..22f911e2 100644 --- a/tests/features/smtp/init.feature +++ b/tests/features/smtp/init.feature @@ -1,9 +1,9 @@ Feature: SMTP initiation Background: - Given there exists an account with username "user@pm.me" and password "password" + Given there exists an account with username "user" and password "password" And bridge starts - And the user logs in with username "user@pm.me" and password "password" - When user "user@pm.me" connects and authenticates SMTP client "1" + And the user logs in with username "user" and password "password" + When 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 "" + When SMTP client "1" sends MAIL FROM "" Then it succeeds - When SMTP client "1" sends RCPT TO "" + When SMTP client "1" sends RCPT TO "" 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 "" + When SMTP client "1" sends RCPT TO "" Then it fails with error "Missing MAIL FROM command" Scenario: Send without TO - When SMTP client "1" sends MAIL FROM "" + When SMTP client "1" sends MAIL FROM "" 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@protonmail.com": + When SMTP client "1" sends the following message from "<>" to "bridgetest@[domain]": """ - To: Internal Bridge + To: Internal Bridge this should fail """ Then it fails Scenario: Send with empty TO - When SMTP client "1" sends MAIL FROM "" + When SMTP client "1" sends MAIL FROM "" 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 " BODY=7BIT" + When SMTP client "1" sends MAIL FROM " BODY=7BIT" Then it succeeds Scenario: FROM not owned by user - When SMTP client "1" sends the following message from "other@pm.me" to "bridgetest@protonmail.com": + When SMTP client "1" sends the following message from "other@[domain]" to "bridgetest@[domain]": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge this should fail """ diff --git a/tests/features/smtp/ports.feature b/tests/features/smtp/ports.feature index e0c2ead0..736f80ab 100644 --- a/tests/features/smtp/ports.feature +++ b/tests/features/smtp/ports.feature @@ -1,10 +1,10 @@ Feature: A user can connect an SMTP client to custom ports Background: - Given there exists an account with username "user@pm.me" and password "password" + Given there exists an account with username "user" and password "password" And bridge starts - And the user logs in with username "user@pm.me" and password "password" + And the user logs in with username "user" and password "password" And the user changes the SMTP port to 1144 Scenario: Authenticates successfully on custom port - When user "user@pm.me" connects SMTP client "1" on port 1144 + When user "user" connects SMTP client "1" on port 1144 Then SMTP client "1" can authenticate \ No newline at end of file diff --git a/tests/features/smtp/send/bcc.feature b/tests/features/smtp/send/bcc.feature index 44fdef7f..4e383684 100644 --- a/tests/features/smtp/send/bcc.feature +++ b/tests/features/smtp/send/bcc.feature @@ -1,28 +1,28 @@ Feature: SMTP with bcc Background: - Given there exists an account with username "user@pm.me" and password "password" - Given there exists an account with username "bridgetest@protonmail.com" and password "password" - Given there exists an account with username "bcc@protonmail.com" and password "password" + 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" And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And the user logs in with username "bcc@protonmail.com" and password "password" - And user "user@pm.me" connects and authenticates SMTP client "1" + 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" Scenario: Send message to address in to and bcc - When SMTP client "1" sends the following message from "user@pm.me" to "bridgetest@protonmail.com, bcc@protonmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain], bcc@[domain]": """ Subject: hello - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge hello """ Then it succeeds - When user "user@pm.me" connects and authenticates IMAP client "1" + When 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@pm.me | bridgetest@protonmail.com | bcc@protonmail.com | hello | false | + | from | to | bcc | subject | unread | + | user@[domain] | bridgetest@[domain] | 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@protonmail.com", + "Address": "bridgetest@[domain]", "Name": "Internal Bridge" } ], "CCList": [], "BCCList": [ { - "Address": "bcc@protonmail.com" + "Address": "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@pm.me" to "bcc@protonmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "bcc@[domain]": """ Subject: hello - From: Bridge Test + From: Bridge Test hello """ Then it succeeds - When user "user@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | bcc | subject | - | user@pm.me | | bcc@protonmail.com | hello | + | from | to | bcc | subject | + | user@[domain] | | 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@protonmail.com" + "Address": "bcc@[domain]" } ] } } """ - When user "bcc@protonmail.com" connects and authenticates IMAP client "2" + When 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@pm.me | | | hello | true | + | from | to | bcc | subject | unread | + | user@[domain] | | | hello | true | diff --git a/tests/features/smtp/send/embedded_message.feature b/tests/features/smtp/send/embedded_message.feature index 0b1da8ee..b4b6f658 100644 --- a/tests/features/smtp/send/embedded_message.feature +++ b/tests/features/smtp/send/embedded_message.feature @@ -1,17 +1,17 @@ Feature: SMTP sending embedded message Background: - Given there exists an account with username "user@pm.me" and password "password" - And there exists an account with username "bridgetest@protonmail.com" and password "password" + Given there exists an account with username "user" and password "password" + And there exists an account with username "bridgetest" and password "password" And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And the user logs in with username "bridgetest@protonmail.com" and password "password" - And user "user@pm.me" connects and authenticates SMTP client "1" + 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" Scenario: Send it - When SMTP client "1" sends the following message from "user@pm.me" to "bridgetest@protonmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain]": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge Subject: Embedded message Content-Type: multipart/mixed; boundary="boundary" @@ -39,11 +39,11 @@ Feature: SMTP sending embedded message """ Then it succeeds - When user "user@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | bridgetest@protonmail.com | Embedded message | - When user "bridgetest@protonmail.com" connects and authenticates IMAP client "2" + | from | to | subject | + | user@[domain] | bridgetest@[domain] | Embedded message | + When user "bridgetest" connects and authenticates IMAP client "2" Then IMAP client "2" eventually sees the following messages in "Inbox": - | from | to | subject | attachments | unread | - | user@pm.me | bridgetest@protonmail.com | Embedded message | embedded.eml | true | \ No newline at end of file + | from | to | subject | attachments | unread | + | user@[domain] | bridgetest@[domain] | Embedded message | embedded.eml | true | \ No newline at end of file diff --git a/tests/features/smtp/send/failures.feature b/tests/features/smtp/send/failures.feature index ab1ce9ee..8bab481e 100644 --- a/tests/features/smtp/send/failures.feature +++ b/tests/features/smtp/send/failures.feature @@ -1,16 +1,16 @@ Feature: SMTP wrong messages Background: - Given there exists an account with username "user@pm.me" and password "password" - And there exists an account with username "bridgetest@protonmail.com" and password "password" + Given there exists an account with username "user" and password "password" + And there exists an account with username "bridgetest" and password "password" And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" connects and authenticates SMTP client "1" + And the user logs in with username "user" and password "password" + And 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@pm.me" to "bridgetest@protonmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain]": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge 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@protonmail.com": + When SMTP client "1" sends the following message from "bridgetest@pm.test" to "bridgetest@[domain]": """ From: Bridge Test - To: Internal Bridge + To: Internal Bridge hello diff --git a/tests/features/smtp/send/html.feature b/tests/features/smtp/send/html.feature index 06e3400d..ad5441e5 100644 --- a/tests/features/smtp/send/html.feature +++ b/tests/features/smtp/send/html.feature @@ -1,15 +1,15 @@ Feature: SMTP sending of plain messages Background: - Given there exists an account with username "user@pm.me" and password "password" - And there exists an account with username "bridgetest@protonmail.com" and password "password" + Given there exists an account with username "user" and password "password" + And there exists an account with username "bridgetest" and password "password" And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" connects and authenticates SMTP client "1" + And the user logs in with username "user" and password "password" + And user "user" connects and authenticates SMTP client "1" Scenario: HTML message to external account - When SMTP client "1" sends the following message from "user@pm.me" to "pm.bridge.qa@gmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "pm.bridge.qa@gmail.com": """ - From: Bridge Test + From: Bridge Test To: External Bridge Subject: HTML text external Content-Disposition: inline @@ -21,10 +21,10 @@ Feature: SMTP sending of plain messages """ Then it succeeds - When user "user@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | pm.bridge.qa@gmail.com | HTML text external | + | from | to | subject | + | 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@pm.me" to "pm.bridge.qa@gmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "pm.bridge.qa@gmail.com": """ - From: Bridge Test + From: Bridge Test To: External Bridge Subject: Html Inline External Content-Disposition: inline @@ -97,10 +97,10 @@ Feature: SMTP sending of plain messages """ Then it succeeds - When user "user@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | pm.bridge.qa@gmail.com | Html Inline External | + | from | to | subject | + | 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@pm.me" to "bridgetest@protonmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain]": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge 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@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | bridgetest@protonmail.com | Html Inline Alternative Internal | + | from | to | subject | + | user@[domain] | bridgetest@[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@protonmail.com", + "Address": "bridgetest@[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@pm.me" to "pm.bridge.qa@gmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "pm.bridge.qa@gmail.com": """ - From: Bridge Test + From: Bridge Test To: External Bridge Subject: Html Inline Alternative External Content-Disposition: inline @@ -277,10 +277,10 @@ Feature: SMTP sending of plain messages """ Then it succeeds - When user "user@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | pm.bridge.qa@gmail.com | Html Inline Alternative External | + | from | to | subject | + | 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@pm.me" to "pm.bridge.qa@gmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "pm.bridge.qa@gmail.com": """ - From: Bridge Test + From: Bridge Test To: External Bridge Subject: HTML text external Content-Disposition: inline @@ -317,10 +317,10 @@ Feature: SMTP sending of plain messages """ Then it succeeds - When user "user@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | pm.bridge.qa@gmail.com | HTML text external | + | from | to | subject | + | user@[domain] | pm.bridge.qa@gmail.com | HTML text external | And the body in the "POST" request to "/mail/v4/messages" is: """ { diff --git a/tests/features/smtp/send/html_att.feature b/tests/features/smtp/send/html_att.feature index 2599f30e..b95b65cd 100644 --- a/tests/features/smtp/send/html_att.feature +++ b/tests/features/smtp/send/html_att.feature @@ -1,16 +1,16 @@ Feature: SMTP sending of plain messages Background: - Given there exists an account with username "user@pm.me" and password "password" - And there exists an account with username "bridgetest@protonmail.com" and password "password" + Given there exists an account with username "user" and password "password" + And there exists an account with username "bridgetest" and password "password" And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" connects and authenticates SMTP client "1" + And the user logs in with username "user" and password "password" + And 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@pm.me" to "bridgetest@protonmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain]": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge 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@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | bridgetest@protonmail.com | HTML with attachment internal | + | from | to | subject | + | user@[domain] | bridgetest@[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@protonmail.com", + "Address": "bridgetest@[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@pm.me" to "pm.bridge.qa@gmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "pm.bridge.qa@gmail.com": """ - From: Bridge Test + From: Bridge Test To: External Bridge 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@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | pm.bridge.qa@gmail.com | HTML with attachment external PGP | + | from | to | subject | + | 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@pm.me" to "pm.bridge.qa@gmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "pm.bridge.qa@gmail.com": """ - From: Bridge Test + From: Bridge Test To: External Bridge Subject: Alternative plain and HTML with rfc822 attachment Content-Type: multipart/mixed; boundary=main-parts @@ -159,8 +159,8 @@ Feature: SMTP sending of plain messages Content-Disposition: attachment Received: from mx1.opensuse.org (mx1.infra.opensuse.org [192.168.47.95]) by - mailman3.infra.opensuse.org (Postfix) with ESMTP id 38BE2AC3 for - ; Sun, 11 Jul 2021 19:50:34 +0000 (UTC) + mailman3.infra.opensuse.org (Postfix) with ESMTP id 38BE2AC3 for + ; Sun, 11 Jul 2021 19:50:34 +0000 (UTC) From: "Bob " Sender: "Bob" To: "opensuse-factory" @@ -190,10 +190,10 @@ Feature: SMTP sending of plain messages """ Then it succeeds - When user "user@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | pm.bridge.qa@gmail.com | Alternative plain and HTML with rfc822 attachment | + | from | to | subject | + | 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: """ { diff --git a/tests/features/smtp/send/inline.feature b/tests/features/smtp/send/inline.feature index 5c0148bd..e8a84b6a 100644 --- a/tests/features/smtp/send/inline.feature +++ b/tests/features/smtp/send/inline.feature @@ -1,16 +1,16 @@ Feature: SMTP messages containing inlines Background: - Given there exists an account with username "user@pm.me" and password "password" - And there exists an account with username "bridgetest@protonmail.com" and password "password" + Given there exists an account with username "user" and password "password" + And there exists an account with username "bridgetest" and password "password" And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" connects and authenticates SMTP client "1" + And the user logs in with username "user" and password "password" + And 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@pm.me" to "bridgetest@protonmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain]": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge 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@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | bridgetest@protonmail.com | Plain with inline | + | from | to | subject | + | user@[domain] | bridgetest@[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@protonmail.com", + "Address": "bridgetest@[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@pm.me" to "bridgetest@protonmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain]": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge 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@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | bridgetest@protonmail.com | Plain with inline | + | from | to | subject | + | user@[domain] | bridgetest@[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@protonmail.com", + "Address": "bridgetest@[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@pm.me" to "bridgetest@protonmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain]": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge 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@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | bridgetest@protonmail.com | Plain with inline | + | from | to | subject | + | user@[domain] | bridgetest@[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@protonmail.com", + "Address": "bridgetest@[domain]", "Name": "Internal Bridge" } ], diff --git a/tests/features/smtp/send/mixed_case.feature b/tests/features/smtp/send/mixed_case.feature index 336fbfa2..ab9fe8cf 100644 --- a/tests/features/smtp/send/mixed_case.feature +++ b/tests/features/smtp/send/mixed_case.feature @@ -1,25 +1,25 @@ Feature: SMTP sending with mixed case address Background: - Given there exists an account with username "user@pm.me" and password "password" - And there exists an account with username "bridgetest@protonmail.com" and password "password" + Given there exists an account with username "user" and password "password" + And there exists an account with username "bridgetest" and password "password" And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" connects and authenticates SMTP client "1" + And the user logs in with username "user" and password "password" + And 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@pm.me" to "bridgetest@protonmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain]": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge hello """ Then it succeeds - When user "user@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | bridgetest@protonmail.com | | + | from | to | subject | + | user@[domain] | bridgetest@[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@pm.me" + "Address": "user@[domain]" }, "ToList": [ { - "Address": "bridgetest@protonmail.com", + "Address": "bridgetest@[domain]", "Name": "Internal Bridge" } ], diff --git a/tests/features/smtp/send/one_account_to_another.feature b/tests/features/smtp/send/one_account_to_another.feature index 44aaeac6..c0afd975 100644 --- a/tests/features/smtp/send/one_account_to_another.feature +++ b/tests/features/smtp/send/one_account_to_another.feature @@ -1,17 +1,17 @@ Feature: SMTP sending two messages Background: - Given there exists an account with username "user@pm.me" and password "password" - And there exists an account with username "other@pm.me" and password "other" + Given there exists an account with username "user" and password "password" + And there exists an account with username "other" and password "other" And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And the user logs in with username "other@pm.me" and password "other" + And the user logs in with username "user" and password "password" + And the user logs in with username "other" and password "other" Scenario: Send from one account to the other - When user "user@pm.me" connects and authenticates SMTP client "1" - And SMTP client "1" sends the following message from "user@pm.me" to "other@pm.me": + When user "user" connects and authenticates SMTP client "1" + And SMTP client "1" sends the following message from "user@[domain]" to "other@[domain]": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge 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@pm.me" + "Address": "user@[domain]" }, "ToList": [ { "Name": "Internal Bridge", - "Address": "other@pm.me" + "Address": "other@[domain]" } ], "CCList": [], @@ -42,30 +42,30 @@ Feature: SMTP sending two messages And the body in the "POST" request to "/mail/v4/messages/.*" is: """ { - "Packages":[ - { - "Addresses":{ - "other@pm.me":{ - "Type":1 - } - }, - "Type":1, - "MIMEType":"text/plain" - } + "Packages": [ + { + "Addresses": { + "other@[domain]": { + "Type": 1 + } + }, + "Type": 1, + "MIMEType": "text/plain" + } ] } """ - When user "other@pm.me" connects and authenticates IMAP client "1" + When user "other" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Inbox": - | from | to | subject | body | - | user@pm.me | other@pm.me | One account to the other | hello | + | from | to | subject | body | + | user@[domain] | other@[domain] | One account to the other | hello | Scenario: Send from one account to the other with attachments - When user "user@pm.me" connects and authenticates SMTP client "1" - And SMTP client "1" sends the following message from "user@pm.me" to "other@pm.me": + When user "user" connects and authenticates SMTP client "1" + And SMTP client "1" sends the following message from "user@[domain]" to "other@[domain]": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge Subject: Plain with attachment internal Content-Type: multipart/related; boundary=bc5bd30245232f31b6c976adcd59bb0069c9b13f986f9e40c2571bb80aa16606 @@ -106,7 +106,7 @@ Feature: SMTP sending two messages }, "ToList": [ { - "Address": "other@pm.me", + "Address": "other@[domain]", "Name": "Internal Bridge" } ], @@ -119,24 +119,24 @@ Feature: SMTP sending two messages And the body in the "POST" request to "/mail/v4/messages/.*" is: """ { - "Packages":[ - { - "Addresses":{ - "other@pm.me":{ - "Type":1 - } - }, - "Type":1, - "MIMEType":"text/plain" - } + "Packages": [ + { + "Addresses": { + "other@[domain]": { + "Type": 1 + } + }, + "Type": 1, + "MIMEType": "text/plain" + } ] } """ - When user "user@pm.me" connects and authenticates IMAP client "1" + When 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@pm.me | other@pm.me | Plain with attachment internal | This is the body | outline-light-instagram-48.png | false | - When user "other@pm.me" connects and authenticates IMAP client "2" + | 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" Then IMAP client "2" eventually sees the following messages in "Inbox": - | from | to | subject | body | attachments | unread | - | user@pm.me | other@pm.me | Plain with attachment internal | This is the body | outline-light-instagram-48.png | true | \ No newline at end of file + | from | to | subject | body | attachments | unread | + | user@[domain] | other@[domain] | Plain with attachment internal | This is the body | outline-light-instagram-48.png | true | \ No newline at end of file diff --git a/tests/features/smtp/send/plain.feature b/tests/features/smtp/send/plain.feature index bcc4f59f..a761bf3e 100644 --- a/tests/features/smtp/send/plain.feature +++ b/tests/features/smtp/send/plain.feature @@ -1,26 +1,26 @@ Feature: SMTP sending of plain messages Background: - Given there exists an account with username "user@pm.me" and password "password" - And there exists an account with username "bridgetest@protonmail.com" and password "password" - And there exists an account with username "bridgetest2@protonmail.com" and password "password" + 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" And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" connects and authenticates SMTP client "1" + And the user logs in with username "user" and password "password" + And 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@pm.me" to "bridgetest@protonmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain]": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge hello """ Then it succeeds - When user "user@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | bridgetest@protonmail.com | | + | from | to | subject | + | user@[domain] | bridgetest@[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@protonmail.com", + "Address": "bridgetest@[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@pm.me" to "pm.bridge.qa@gmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "pm.bridge.qa@gmail.com": """ - From: Bridge Test + From: Bridge Test To: External Bridge hello """ Then it succeeds - When user "user@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | pm.bridge.qa@gmail.com | | + | from | to | subject | + | 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@pm.me" to "bridgetest@protonmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain]": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge 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@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | bridgetest@protonmail.com | Plain text internal | + | from | to | subject | + | user@[domain] | bridgetest@[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@protonmail.com", + "Address": "bridgetest@[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@pm.me" to "pm.bridge.qa@gmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "pm.bridge.qa@gmail.com": """ - From: Bridge Test + From: Bridge Test To: External Bridge Subject: Plain text external Content-Disposition: inline @@ -128,10 +128,10 @@ Feature: SMTP sending of plain messages """ Then it succeeds - When user "user@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | pm.bridge.qa@gmail.com | Plain text external | + | from | to | subject | + | 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@pm.me" to "pm.bridge.qa@gmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "pm.bridge.qa@gmail.com": """ - From: Bridge Test + From: Bridge Test To: External Bridge 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@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | pm.bridge.qa@gmail.com | Plain text no charset external | + | from | to | subject | + | 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@pm.me" to "pm.bridge.qa@gmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "pm.bridge.qa@gmail.com": """ - From: Bridge Test + From: Bridge Test To: External Bridge 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@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | pm.bridge.qa@gmail.com | Plain text no charset external | + | from | to | subject | + | 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@pm.me" to "pm.bridge.qa@gmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "pm.bridge.qa@gmail.com": """ - From: Bridge Test + From: Bridge Test To: External Bridge 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@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | pm.bridge.qa@gmail.com | Plain, no charset, no content, external | + | from | to | subject | + | 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,24 +269,24 @@ Feature: SMTP sending of plain messages """ Scenario: RCPT does not contain all CC - When SMTP client "1" sends MAIL FROM "" - And SMTP client "1" sends RCPT TO "" + When SMTP client "1" sends MAIL FROM "" + And SMTP client "1" sends RCPT TO "" And SMTP client "1" sends DATA: """ - From: Bridge Test - To: Internal Bridge - CC: Internal Bridge 2 + From: Bridge Test + To: Internal Bridge + CC: Internal Bridge 2 Content-Type: text/plain Subject: RCPT-CC test This is CC missing in RCPT test. Have a nice day! -. + . """ Then it succeeds - When user "user@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | cc | subject | - | user@pm.me | bridgetest@protonmail.com | bridgetest2@protonmail.com | RCPT-CC test | + | from | to | cc | subject | + | user@[domain] | bridgetest@[domain] | bridgetest2@[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@protonmail.com", + "Address": "bridgetest@[domain]", "Name": "Internal Bridge" } ], "CCList": [ { - "Address": "bridgetest2@protonmail.com", + "Address": "bridgetest2@[domain]", "Name": "Internal Bridge 2" } ], @@ -314,19 +314,19 @@ Feature: SMTP sending of plain messages And the body in the "POST" request to "/mail/v4/messages/.*" is: """ { - "Packages":[ - { - "Addresses":{ - "bridgetest@protonmail.com":{ - "Type":1 - }, - "bridgetest2@protonmail.com":{ - "Type":1 - } + "Packages": [ + { + "Addresses": { + "bridgetest@[domain]": { + "Type": 1 }, - "Type":1, - "MIMEType":"text/plain" - } + "bridgetest2@[domain]": { + "Type": 1 + } + }, + "Type": 1, + "MIMEType": "text/plain" + } ] } """ \ No newline at end of file diff --git a/tests/features/smtp/send/plain_att.feature b/tests/features/smtp/send/plain_att.feature index 26b69312..ae0b99d3 100644 --- a/tests/features/smtp/send/plain_att.feature +++ b/tests/features/smtp/send/plain_att.feature @@ -1,16 +1,16 @@ Feature: SMTP sending of plain messages Background: - Given there exists an account with username "user@pm.me" and password "password" - And there exists an account with username "bridgetest@protonmail.com" and password "password" + Given there exists an account with username "user" and password "password" + And there exists an account with username "bridgetest" and password "password" And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" connects and authenticates SMTP client "1" + And the user logs in with username "user" and password "password" + And 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@pm.me" to "bridgetest@protonmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain]": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge 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@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | bridgetest@protonmail.com | Plain with attachment | + | from | to | subject | + | user@[domain] | bridgetest@[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@protonmail.com", + "Address": "bridgetest@[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@pm.me" to "pm.bridge.qa@gmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "pm.bridge.qa@gmail.com": """ - From: Bridge Test + From: Bridge Test To: External Bridge 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@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | - | user@pm.me | pm.bridge.qa@gmail.com | Plain with attachment external | + | from | to | subject | + | 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@pm.me" to "pm.bridge.qa@gmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "pm.bridge.qa@gmail.com": """ - From: Bridge Test + From: Bridge Test To: External Bridge 1 CC: External Bridge 2 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@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | cc | subject | - | user@pm.me | pm.bridge.qa@gmail.com | bridgeqa@seznam.cz | Plain with attachment external PGP and external CC | + | from | to | cc | subject | + | 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: """ { diff --git a/tests/features/smtp/send/same_message.feature b/tests/features/smtp/send/same_message.feature index 27a75051..8c79609c 100644 --- a/tests/features/smtp/send/same_message.feature +++ b/tests/features/smtp/send/same_message.feature @@ -1,15 +1,15 @@ Feature: SMTP sending the same message twice Background: - Given there exists an account with username "user@pm.me" and password "password" - And there exists an account with username "bridgetest@protonmail.com" and password "password" + Given there exists an account with username "user" and password "password" + And there exists an account with username "bridgetest" and password "password" And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And the user logs in with username "bridgetest@protonmail.com" and password "password" - And user "user@pm.me" connects and authenticates SMTP client "1" - And SMTP client "1" sends the following message from "user@pm.me" to "bridgetest@protonmail.com": + 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]": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge 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@pm.me" to "bridgetest@protonmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain]": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge Subject: Hello World """ Then it succeeds - When user "user@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | body | - | user@pm.me | bridgetest@protonmail.com | Hello | World | - When user "bridgetest@protonmail.com" connects and authenticates IMAP client "2" + | from | to | subject | body | + | user@[domain] | bridgetest@[domain] | Hello | World | + When user "bridgetest" connects and authenticates IMAP client "2" Then IMAP client "2" eventually sees the following messages in "Inbox": - | from | to | subject | body | - | user@pm.me | bridgetest@protonmail.com | Hello | World | + | from | to | subject | body | + | user@[domain] | bridgetest@[domain] | Hello | World | Scenario: Slight change means different message and is sent twice - When SMTP client "1" sends the following message from "user@pm.me" to "bridgetest@protonmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain]": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge Subject: Hello. World """ Then it succeeds - When user "user@pm.me" connects and authenticates IMAP client "1" + When user "user" connects and authenticates IMAP client "1" Then IMAP client "1" eventually sees the following messages in "Sent": - | from | to | subject | body | - | user@pm.me | bridgetest@protonmail.com | Hello | World | - | user@pm.me | bridgetest@protonmail.com | Hello. | World | - When user "bridgetest@protonmail.com" connects and authenticates IMAP client "2" + | 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" Then IMAP client "2" eventually sees the following messages in "Inbox": - | from | to | subject | body | - | user@pm.me | bridgetest@protonmail.com | Hello | World | - | user@pm.me | bridgetest@protonmail.com | Hello. | World | \ No newline at end of file + | from | to | subject | body | + | user@[domain] | bridgetest@[domain] | Hello | World | + | user@[domain] | bridgetest@[domain] | Hello. | World | \ No newline at end of file diff --git a/tests/features/smtp/send/send_append.feature b/tests/features/smtp/send/send_append.feature index 8775317b..84c1ac0d 100644 --- a/tests/features/smtp/send/send_append.feature +++ b/tests/features/smtp/send/send_append.feature @@ -1,17 +1,17 @@ Feature: SMTP sending with APPENDing to Sent Background: - Given there exists an account with username "user@pm.me" and password "password" - And there exists an account with username "bridgetest@protonmail.com" and password "password" + Given there exists an account with username "user" and password "password" + And there exists an account with username "bridgetest" and password "password" And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" connects and authenticates SMTP client "1" - And user "user@pm.me" connects and authenticates IMAP client "1" + 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" Scenario: Send message and append to Sent # First do sending. - When SMTP client "1" sends the following message from "user@pm.me" to "bridgetest@protonmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain]": """ - To: Internal Bridge + To: Internal Bridge Subject: Manual send and append Message-ID: bridgemessage42 @@ -29,13 +29,13 @@ Feature: SMTP sending with APPENDing to Sent } """ And IMAP client "1" eventually sees the following messages in "Sent": - | to | subject | body | message-id | - | bridgetest@protonmail.com | Manual send and append | hello | | + | to | subject | body | message-id | + | bridgetest@[domain] | Manual send and append | hello | | # 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 + To: Internal Bridge Subject: Manual send and append Message-ID: bridgemessage42 @@ -44,5 +44,5 @@ 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@protonmail.com | Manual send and append | hello | | \ No newline at end of file + | to | subject | body | message-id | + | bridgetest@[domain] | Manual send and append | hello | | \ No newline at end of file diff --git a/tests/features/smtp/send/two_messages.feature b/tests/features/smtp/send/two_messages.feature index d7384e11..bed10101 100644 --- a/tests/features/smtp/send/two_messages.feature +++ b/tests/features/smtp/send/two_messages.feature @@ -1,29 +1,29 @@ Feature: SMTP sending two messages Background: - Given there exists an account with username "user@pm.me" and password "password" - And there exists an account with username "user-multi@pm.me" and password "password" - And the account "user-multi@pm.me" has additional address "user-multi-alias@pm.me" - And there exists an account with username "bridgetest@protonmail.com" and password "password" + 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" And bridge starts - And the user logs in with username "user@pm.me" and password "password" - And the user logs in with username "user-multi@pm.me" and password "password" - And the user sets the address mode of "user-multi@pm.me" to "split" + 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" Scenario: Send two messages in one connection - When user "user@pm.me" connects and authenticates SMTP client "1" - And SMTP client "1" sends the following message from "user@pm.me" to "bridgetest@protonmail.com": + When user "user" connects and authenticates SMTP client "1" + And SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain]": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge hello """ Then it succeeds - When SMTP client "1" sends the following message from "user@pm.me" to "bridgetest@protonmail.com": + When SMTP client "1" sends the following message from "user@[domain]" to "bridgetest@[domain]": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge 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@pm.me" connects and authenticates SMTP client "1" with address "user-multi@pm.me" - And user "user-multi@pm.me" connects and authenticates SMTP client "2" with address "user-multi-alias@pm.me" - And SMTP client "1" sends the following message from "user-multi@pm.me" to "bridgetest@protonmail.com>": + 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]>": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge hello """ Then it succeeds - When SMTP client "2" sends the following message from "user-multi@pm.me" to "bridgetest@protonmail.com>": + When SMTP client "2" sends the following message from "user-multi@[domain]" to "bridgetest@[domain]>": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge world @@ -53,21 +53,21 @@ Feature: SMTP sending two messages Then it succeeds Scenario: Send with two separate users - When user "user@pm.me" connects and authenticates SMTP client "1" - And user "user-multi@pm.me" connects and authenticates SMTP client "2" - When SMTP client "1" sends the following message from "user@pm.me" to "bridgetest@protonmail.com>": + 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]>": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge hello """ Then it succeeds - When SMTP client "2" sends the following message from "user-multi@pm.me" to "bridgetest@protonmail.com>": + When SMTP client "2" sends the following message from "user-multi@[domain]" to "bridgetest@[domain]>": """ - From: Bridge Test - To: Internal Bridge + From: Bridge Test + To: Internal Bridge world diff --git a/tests/features/updates.feature b/tests/features/updates.feature index 288af91b..900c0313 100644 --- a/tests/features/updates.feature +++ b/tests/features/updates.feature @@ -21,9 +21,9 @@ Feature: Bridge checks for updates Then bridge sends a manual update event for version "2.4.0" Scenario: Update is required to continue using bridge - Given there exists an account with username "user@pm.me" and password "password" + Given there exists an account with username "user" and password "password" And bridge is version "2.3.0" and the latest available version is "2.3.0" reachable from "2.3.0" And the API requires bridge version at least "2.4.0" When bridge starts - And the user logs in with username "user@pm.me" and password "password" + And the user logs in with username "user" and password "password" Then bridge sends a forced update event \ No newline at end of file diff --git a/tests/features/user/addressmode.feature b/tests/features/user/addressmode.feature index 3e51e37d..472a0835 100644 --- a/tests/features/user/addressmode.feature +++ b/tests/features/user/addressmode.feature @@ -1,179 +1,179 @@ Feature: Address mode Background: - Given there exists an account with username "user@pm.me" and password "password" - And the account "user@pm.me" has additional address "alias@pm.me" - And the account "user@pm.me" has the following custom mailboxes: - | name | type | - | one | folder | - | two | folder | - And the address "user@pm.me" of account "user@pm.me" has the following messages in "one": - | from | to | subject | unread | - | a@pm.me | a@pm.me | one | true | - | b@pm.me | b@pm.me | two | false | - And the address "alias@pm.me" of account "user@pm.me" has the following messages in "two": - | from | to | subject | unread | - | c@pm.me | c@pm.me | three | true | - | d@pm.me | d@pm.me | four | false | + 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: + | name | type | + | one | folder | + | two | folder | + And the address "user@[domain]" of account "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": + | 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@pm.me" and password "password" - And user "user@pm.me" finishes syncing + And the user logs in with username "user" and password "password" + And user "user" finishes syncing Scenario: The user is in combined mode - When user "user@pm.me" connects and authenticates IMAP client "1" with address "user@pm.me" + When user "user" connects and authenticates IMAP client "1" with address "user@[domain]" Then IMAP client "1" sees the following messages in "Folders/one": - | from | to | subject | unread | - | a@pm.me | a@pm.me | one | true | - | b@pm.me | b@pm.me | two | false | + | from | to | subject | unread | + | a@[domain] | a@[domain] | one | true | + | b@[domain] | b@[domain] | two | false | And IMAP client "1" sees the following messages in "Folders/two": - | from | to | subject | unread | - | c@pm.me | c@pm.me | three | true | - | d@pm.me | d@pm.me | four | false | + | from | to | subject | unread | + | c@[domain] | c@[domain] | three | true | + | d@[domain] | d@[domain] | four | false | And IMAP client "1" sees the following messages in "All Mail": - | from | to | subject | unread | - | a@pm.me | a@pm.me | one | true | - | b@pm.me | b@pm.me | two | false | - | c@pm.me | c@pm.me | three | true | - | d@pm.me | d@pm.me | four | false | - When user "user@pm.me" connects and authenticates IMAP client "2" with address "alias@pm.me" + | 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]" Then IMAP client "2" sees the following messages in "Folders/one": - | from | to | subject | unread | - | a@pm.me | a@pm.me | one | true | - | b@pm.me | b@pm.me | two | false | + | from | to | subject | unread | + | a@[domain] | a@[domain] | one | true | + | b@[domain] | b@[domain] | two | false | And IMAP client "2" sees the following messages in "Folders/two": - | from | to | subject | unread | - | c@pm.me | c@pm.me | three | true | - | d@pm.me | d@pm.me | four | false | + | from | to | subject | unread | + | c@[domain] | c@[domain] | three | true | + | d@[domain] | d@[domain] | four | false | And IMAP client "2" sees the following messages in "All Mail": - | from | to | subject | unread | - | a@pm.me | a@pm.me | one | true | - | b@pm.me | b@pm.me | two | false | - | c@pm.me | c@pm.me | three | true | - | d@pm.me | d@pm.me | four | false | + | 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 | Scenario: The user is in split mode - Given the user sets the address mode of "user@pm.me" to "split" - And user "user@pm.me" finishes syncing - When user "user@pm.me" connects and authenticates IMAP client "1" with address "user@pm.me" + 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]" Then IMAP client "1" sees the following messages in "Folders/one": - | from | to | subject | unread | - | a@pm.me | a@pm.me | one | true | - | b@pm.me | b@pm.me | two | false | + | from | to | subject | unread | + | a@[domain] | a@[domain] | one | true | + | b@[domain] | b@[domain] | two | false | And IMAP client "1" sees 0 messages in "Folders/two" And IMAP client "1" sees the following messages in "All Mail": - | from | to | subject | unread | - | a@pm.me | a@pm.me | one | true | - | b@pm.me | b@pm.me | two | false | - When user "user@pm.me" connects and authenticates IMAP client "2" with address "alias@pm.me" + | 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]" 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 | - | c@pm.me | c@pm.me | three | true | - | d@pm.me | d@pm.me | four | false | + | from | to | subject | unread | + | c@[domain] | c@[domain] | three | true | + | d@[domain] | d@[domain] | four | false | And IMAP client "2" sees the following messages in "All Mail": - | from | to | subject | unread | - | c@pm.me | c@pm.me | three | true | - | d@pm.me | d@pm.me | four | false | + | from | to | subject | unread | + | c@[domain] | c@[domain] | three | true | + | 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@pm.me" to "split" - And user "user@pm.me" finishes syncing - And the user sets the address mode of "user@pm.me" to "combined" - And user "user@pm.me" finishes syncing - When user "user@pm.me" connects and authenticates IMAP client "1" with address "user@pm.me" + 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]" Then IMAP client "1" sees the following messages in "All Mail": - | from | to | subject | unread | - | a@pm.me | a@pm.me | one | true | - | b@pm.me | b@pm.me | two | false | - | c@pm.me | c@pm.me | three | true | - | d@pm.me | d@pm.me | four | false | - When user "user@pm.me" connects and authenticates IMAP client "2" with address "alias@pm.me" + | 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]" Then IMAP client "2" sees the following messages in "All Mail": - | from | to | subject | unread | - | a@pm.me | a@pm.me | one | true | - | b@pm.me | b@pm.me | two | false | - | c@pm.me | c@pm.me | three | true | - | d@pm.me | d@pm.me | four | false | + | 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 | Scenario: The user adds an address while in combined mode - When user "user@pm.me" connects and authenticates IMAP client "1" with address "user@pm.me" + When user "user" connects and authenticates IMAP client "1" with address "user@[domain]" Then IMAP client "1" sees the following messages in "All Mail": - | from | to | subject | unread | - | a@pm.me | a@pm.me | one | true | - | b@pm.me | b@pm.me | two | false | - | c@pm.me | c@pm.me | three | true | - | d@pm.me | d@pm.me | four | false | - When user "user@pm.me" connects and authenticates IMAP client "2" with address "alias@pm.me" + | 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]" Then IMAP client "2" sees the following messages in "All Mail": - | from | to | subject | unread | - | a@pm.me | a@pm.me | one | true | - | b@pm.me | b@pm.me | two | false | - | c@pm.me | c@pm.me | three | true | - | d@pm.me | d@pm.me | four | false | - Given the account "user@pm.me" has additional address "other@pm.me" - And bridge sends an address created event for user "user@pm.me" - When user "user@pm.me" connects and authenticates IMAP client "3" with address "other@pm.me" + | 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]" Then IMAP client "3" sees the following messages in "All Mail": - | from | to | subject | unread | - | a@pm.me | a@pm.me | one | true | - | b@pm.me | b@pm.me | two | false | - | c@pm.me | c@pm.me | three | true | - | d@pm.me | d@pm.me | four | false | + | 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 | Scenario: The user adds an address while in split mode - Given the user sets the address mode of "user@pm.me" to "split" - And user "user@pm.me" finishes syncing - When user "user@pm.me" connects and authenticates IMAP client "1" with address "user@pm.me" + 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]" And IMAP client "1" sees the following messages in "All Mail": - | from | to | subject | unread | - | a@pm.me | a@pm.me | one | true | - | b@pm.me | b@pm.me | two | false | - When user "user@pm.me" connects and authenticates IMAP client "2" with address "alias@pm.me" + | 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]" And IMAP client "2" sees the following messages in "All Mail": - | from | to | subject | unread | - | c@pm.me | c@pm.me | three | true | - | d@pm.me | d@pm.me | four | false | - Given the account "user@pm.me" has additional address "other@pm.me" - And bridge sends an address created event for user "user@pm.me" - When user "user@pm.me" connects and authenticates IMAP client "3" with address "other@pm.me" + | 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]" Then IMAP client "3" eventually sees 0 messages in "All Mail" Scenario: The user deletes an address while in combined mode - When user "user@pm.me" connects and authenticates IMAP client "1" with address "user@pm.me" + When user "user" connects and authenticates IMAP client "1" with address "user@[domain]" Then IMAP client "1" sees the following messages in "All Mail": - | from | to | subject | unread | - | a@pm.me | a@pm.me | one | true | - | b@pm.me | b@pm.me | two | false | - | c@pm.me | c@pm.me | three | true | - | d@pm.me | d@pm.me | four | false | - When user "user@pm.me" connects and authenticates IMAP client "2" with address "alias@pm.me" + | 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]" Then IMAP client "2" sees the following messages in "All Mail": - | from | to | subject | unread | - | a@pm.me | a@pm.me | one | true | - | b@pm.me | b@pm.me | two | false | - | c@pm.me | c@pm.me | three | true | - | d@pm.me | d@pm.me | four | false | - Given the account "user@pm.me" no longer has additional address "alias@pm.me" - And bridge sends an address deleted event for user "user@pm.me" - When user "user@pm.me" connects IMAP client "3" - Then IMAP client "3" cannot authenticate with address "alias@pm.me" + | 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]" Scenario: The user deletes an address while in split mode - Given the user sets the address mode of "user@pm.me" to "split" - And user "user@pm.me" finishes syncing - When user "user@pm.me" connects and authenticates IMAP client "1" with address "user@pm.me" + 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]" And IMAP client "1" sees the following messages in "All Mail": - | from | to | subject | unread | - | a@pm.me | a@pm.me | one | true | - | b@pm.me | b@pm.me | two | false | - When user "user@pm.me" connects and authenticates IMAP client "2" with address "alias@pm.me" + | 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]" And IMAP client "2" sees the following messages in "All Mail": - | from | to | subject | unread | - | c@pm.me | c@pm.me | three | true | - | d@pm.me | d@pm.me | four | false | - Given the account "user@pm.me" no longer has additional address "alias@pm.me" - And bridge sends an address deleted event for user "user@pm.me" - When user "user@pm.me" connects IMAP client "3" - Then IMAP client "3" cannot authenticate with address "alias@pm.me" + | 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]" Scenario: The user makes an alias the primary address while in combined mode diff --git a/tests/features/user/delete.feature b/tests/features/user/delete.feature index 756f96fc..4dbaa5b1 100644 --- a/tests/features/user/delete.feature +++ b/tests/features/user/delete.feature @@ -1,14 +1,14 @@ Feature: A user can be deleted Background: - Given there exists an account with username "user@pm.me" and password "password" + Given there exists an account with username "user" and password "password" And bridge starts - And the user logs in with username "user@pm.me" and password "password" + And the user logs in with username "user" and password "password" Scenario: Delete a connected user - When user "user@pm.me" is deleted - Then user "user@pm.me" is not listed + When user "user" is deleted + Then user "user" is not listed Scenario: Delete a disconnected user - Given user "user@pm.me" logs out - When user "user@pm.me" is deleted - Then user "user@pm.me" is not listed \ No newline at end of file + Given user "user" logs out + When user "user" is deleted + Then user "user" is not listed \ No newline at end of file diff --git a/tests/features/user/login.feature b/tests/features/user/login.feature index 9b14b772..ceb9c226 100644 --- a/tests/features/user/login.feature +++ b/tests/features/user/login.feature @@ -1,36 +1,36 @@ Feature: A user can login Background: - Given there exists an account with username "user@pm.me" and password "password" + Given there exists an account with username "user" and password "password" And bridge starts Scenario: Login to account - When the user logs in with username "user@pm.me" and password "password" - Then user "user@pm.me" is listed and connected + When the user logs in with username "user" and password "password" + Then user "user" is listed and connected Scenario: Login to account with wrong password - When the user logs in with username "user@pm.me" and password "wrong" - Then user "user@pm.me" is not listed + When the user logs in with username "user" and password "wrong" + Then user "user" is not listed Scenario: Login to nonexistent account - When the user logs in with username "other@pm.me" and password "unknown" - Then user "other@pm.me" is not listed + When the user logs in with username "other" and password "unknown" + Then user "other" is not listed Scenario: Login to account without internet Given the internet is turned off - When the user logs in with username "user@pm.me" and password "password" - Then user "user@pm.me" is not listed + When the user logs in with username "user" and password "password" + Then user "user" is not listed Scenario: Login to account without internet but the connection is later restored - When the user logs in with username "user@pm.me" and password "password" + When the user logs in with username "user" and password "password" And bridge stops And the internet is turned off And bridge starts And the internet is turned on - Then user "user@pm.me" is eventually listed and connected + Then user "user" is eventually listed and connected Scenario: Login to multiple accounts - Given there exists an account with username "additional@pm.me" and password "other" - When the user logs in with username "user@pm.me" and password "password" - And the user logs in with username "additional@pm.me" and password "other" - Then user "user@pm.me" is listed and connected - And user "additional@pm.me" is listed and connected \ No newline at end of file + Given there exists an account with username "additional" and password "other" + When the user logs in with username "user" and password "password" + And the user logs in with username "additional" and password "other" + Then user "user" is listed and connected + And user "additional" is listed and connected \ No newline at end of file diff --git a/tests/features/user/relogin.feature b/tests/features/user/relogin.feature index 6fc714f2..9c105d9e 100644 --- a/tests/features/user/relogin.feature +++ b/tests/features/user/relogin.feature @@ -1,15 +1,15 @@ Feature: A logged out user can login again Background: - Given there exists an account with username "user@pm.me" and password "password" + Given there exists an account with username "user" and password "password" And bridge starts - And the user logs in with username "user@pm.me" and password "password" + And the user logs in with username "user" and password "password" Scenario: Login to disconnected account - When user "user@pm.me" logs out + When user "user" logs out And bridge restarts - And the user logs in with username "user@pm.me" and password "password" - Then user "user@pm.me" is listed and connected + And the user logs in with username "user" and password "password" + Then user "user" is listed and connected Scenario: Cannot login to removed account - When user "user@pm.me" is deleted - Then user "user@pm.me" is not listed \ No newline at end of file + When user "user" is deleted + Then user "user" is not listed \ No newline at end of file diff --git a/tests/features/user/revoke.feature b/tests/features/user/revoke.feature index debabaa4..17261008 100644 --- a/tests/features/user/revoke.feature +++ b/tests/features/user/revoke.feature @@ -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@pm.me" and password "password" + Given there exists an account with username "user" and password "password" And bridge starts - And the user logs in with username "user@pm.me" and password "password" + And the user logs in with username "user" and password "password" Scenario: The auth is revoked while bridge is running - When the auth of user "user@pm.me" is revoked - Then bridge sends a deauth event for user "user@pm.me" - And user "user@pm.me" is listed but not connected + 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 Scenario: The auth is revoked while bridge is not running Given bridge stops - And the auth of user "user@pm.me" is revoked + And the auth of user "user" is revoked When bridge starts - Then user "user@pm.me" is listed but not connected \ No newline at end of file + Then user "user" is listed but not connected \ No newline at end of file diff --git a/tests/features/user/sync.feature b/tests/features/user/sync.feature index b7ebaff1..e7c84f59 100644 --- a/tests/features/user/sync.feature +++ b/tests/features/user/sync.feature @@ -1,26 +1,26 @@ Feature: Bridge can fully sync an account Background: - Given there exists an account with username "user@pm.me" and password "password" - And the account "user@pm.me" has the following custom mailboxes: + Given there exists an account with username "user" and password "password" + And the account "user" has the following custom mailboxes: | name | type | | one | folder | | two | folder | | three | label | - And the address "user@pm.me" of account "user@pm.me" has the following messages in "one": - | from | to | subject | unread | - | a@pm.me | a@pm.me | one | true | - | b@pm.me | b@pm.me | two | false | - And the address "user@pm.me" of account "user@pm.me" has the following messages in "two": - | from | to | subject | unread | - | a@pm.me | a@pm.me | one | true | - | b@pm.me | b@pm.me | two | false | + And the address "user@[domain]" of account "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": + | 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@pm.me" and password "password" - Then bridge sends sync started and finished events for user "user@pm.me" + When the user logs in with username "user" and password "password" + Then bridge sends sync started and finished events for user "user" When bridge restarts - And user "user@pm.me" connects and authenticates IMAP client "1" + And 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@pm.me" and password "password" - And user "user@pm.me" finishes syncing + Given the user logs in with username "user" and password "password" + And user "user" finishes syncing And bridge stops And the user deletes the gluon files And bridge starts - When user "user@pm.me" connects and authenticates IMAP client "1" + When 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,19 +61,19 @@ Feature: Bridge can fully sync an account | Labels/three | 0 | 0 | Scenario: If an address has no keys, the account is still synced - Given the account "user@pm.me" has additional address "alias@pm.me" - And the account "user@pm.me" has the following custom mailboxes: + Given the account "user" has additional address "alias@[domain]" + And the account "user" has the following custom mailboxes: | name | type | | encrypted | folder | - And the address "alias@pm.me" of account "user@pm.me" has the following messages in "encrypted": - | from | to | subject | - | a@pm.me | a@pm.me | no key | - | b@pm.me | b@pm.me | no key | - And the address "alias@pm.me" of account "user@pm.me" has no keys - When the user logs in with username "user@pm.me" and password "password" - And user "user@pm.me" finishes syncing - When user "user@pm.me" connects and authenticates IMAP client "1" + And the address "alias@[domain]" of account "user" has the following messages in "encrypted": + | from | to | subject | + | a@[domain] | a@[domain] | no key | + | b@[domain] | b@[domain] | no key | + And the address "alias@[domain]" of account "user" has no 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" Then IMAP client "1" eventually sees the following messages in "Folders/encrypted": - | from | to | subject | mime-type | - | a@pm.me | a@pm.me | no key | multipart/encrypted | - | b@pm.me | b@pm.me | no key | multipart/encrypted | \ No newline at end of file + | from | to | subject | mime-type | + | a@[domain] | a@[domain] | no key | multipart/encrypted | + | b@[domain] | b@[domain] | no key | multipart/encrypted | \ No newline at end of file