diff --git a/Makefile b/Makefile index b1feec17..0d85f5fc 100644 --- a/Makefile +++ b/Makefile @@ -230,7 +230,7 @@ test-race: gofiles go test -v -timeout=30m -p=1 -count=1 -race -failfast -run=${TESTRUN} ./internal/... ./pkg/... test-integration: gofiles - go test -v -timeout=10m -p=1 -count=1 github.com/ProtonMail/proton-bridge/v3/tests + go test -v -timeout=20m -p=1 -count=1 github.com/ProtonMail/proton-bridge/v3/tests test-integration-debug: gofiles dlv test github.com/ProtonMail/proton-bridge/v3/tests -- -test.v -test.timeout=10m -test.parallel=1 -test.count=1 diff --git a/tests/bdd_test.go b/tests/bdd_test.go index 2fcb1e5d..f67caa70 100644 --- a/tests/bdd_test.go +++ b/tests/bdd_test.go @@ -162,7 +162,6 @@ func TestFeatures(testingT *testing.T) { ctx.Step(`^user "([^"]*)" logs out$`, s.userLogsOut) ctx.Step(`^user "([^"]*)" is deleted$`, s.userIsDeleted) ctx.Step(`^the auth of user "([^"]*)" is revoked$`, s.theAuthOfUserIsRevoked) - ctx.Step(`^user "([^"]*)" is listed and connected$`, s.userIsListedAndConnected) ctx.Step(`^user "([^"]*)" is eventually listed and connected$`, s.userIsEventuallyListedAndConnected) ctx.Step(`^user "([^"]*)" is listed but not connected$`, s.userIsListedButNotConnected) ctx.Step(`^user "([^"]*)" is not listed$`, s.userIsNotListed) @@ -184,7 +183,6 @@ func TestFeatures(testingT *testing.T) { ctx.Step(`^IMAP client "([^"]*)" creates "([^"]*)"$`, s.imapClientCreatesMailbox) ctx.Step(`^IMAP client "([^"]*)" deletes "([^"]*)"$`, s.imapClientDeletesMailbox) ctx.Step(`^IMAP client "([^"]*)" renames "([^"]*)" to "([^"]*)"$`, s.imapClientRenamesMailboxTo) - ctx.Step(`^IMAP client "([^"]*)" sees the following mailbox info:$`, s.imapClientSeesTheFollowingMailboxInfo) ctx.Step(`^IMAP client "([^"]*)" eventually sees the following mailbox info:$`, s.imapClientEventuallySeesTheFollowingMailboxInfo) ctx.Step(`^IMAP client "([^"]*)" sees the following mailbox info for "([^"]*)":$`, s.imapClientSeesTheFollowingMailboxInfoForMailbox) ctx.Step(`^IMAP client "([^"]*)" sees "([^"]*)"$`, s.imapClientSeesMailbox) @@ -195,9 +193,7 @@ func TestFeatures(testingT *testing.T) { ctx.Step(`^IMAP client "([^"]*)" copies all messages from "([^"]*)" to "([^"]*)"$`, s.imapClientCopiesAllMessagesFromTo) ctx.Step(`^IMAP client "([^"]*)" moves the message with subject "([^"]*)" from "([^"]*)" to "([^"]*)"$`, s.imapClientMovesTheMessageWithSubjectFromTo) ctx.Step(`^IMAP client "([^"]*)" moves all messages from "([^"]*)" to "([^"]*)"$`, s.imapClientMovesAllMessagesFromTo) - ctx.Step(`^IMAP client "([^"]*)" sees the following messages in "([^"]*)":$`, s.imapClientSeesTheFollowingMessagesInMailbox) ctx.Step(`^IMAP client "([^"]*)" eventually sees the following messages in "([^"]*)":$`, s.imapClientEventuallySeesTheFollowingMessagesInMailbox) - ctx.Step(`^IMAP client "([^"]*)" sees (\d+) messages in "([^"]*)"$`, s.imapClientSeesMessagesInMailbox) ctx.Step(`^IMAP client "([^"]*)" eventually sees (\d+) messages in "([^"]*)"$`, s.imapClientEventuallySeesMessagesInMailbox) ctx.Step(`^IMAP client "([^"]*)" marks message (\d+) as deleted$`, s.imapClientMarksMessageAsDeleted) ctx.Step(`^IMAP client "([^"]*)" marks the message with subject "([^"]*)" as deleted$`, s.imapClientMarksTheMessageWithSubjectAsDeleted) diff --git a/tests/features/imap/mailbox/create.feature b/tests/features/imap/mailbox/create.feature index ce0e6349..e89ffc7c 100644 --- a/tests/features/imap/mailbox/create.feature +++ b/tests/features/imap/mailbox/create.feature @@ -37,7 +37,7 @@ Feature: IMAP create mailbox Then it succeeds When IMAP client "1" creates "Labels/l3" Then it succeeds - Then IMAP client "1" sees the following mailbox info: + Then IMAP client "1" eventually sees the following mailbox info: | name | | INBOX | | Drafts | @@ -65,7 +65,7 @@ Feature: IMAP create mailbox Then it succeeds When IMAP client "1" creates "Folders/f2/f22" Then it succeeds - Then IMAP client "1" sees the following mailbox info: + Then IMAP client "1" eventually sees the following mailbox info: | name | | INBOX | | Drafts | @@ -89,7 +89,7 @@ Feature: IMAP create mailbox And the user logs in with username "[user:user]" and password "password" And user "[user:user]" finishes syncing And user "[user:user]" connects and authenticates IMAP client "2" - Then IMAP client "2" sees the following mailbox info: + Then IMAP client "2" eventually sees the following mailbox info: | name | | INBOX | | Drafts | @@ -119,7 +119,7 @@ Feature: IMAP create mailbox Then it succeeds When IMAP client "1" creates "Folders/f2/f22" Then it succeeds - Then IMAP client "1" sees the following mailbox info: + Then IMAP client "1" eventually sees the following mailbox info: | name | | INBOX | | Drafts | @@ -143,7 +143,7 @@ Feature: IMAP create mailbox Then it succeeds When IMAP client "1" renames "Folders/f1/f12" to "Folders/f2/f12" Then it succeeds - Then IMAP client "1" sees the following mailbox info: + Then IMAP client "1" eventually sees the following mailbox info: | name | | INBOX | | Drafts | @@ -167,7 +167,7 @@ Feature: IMAP create mailbox And the user logs in with username "[user:user]" and password "password" And user "[user:user]" finishes syncing And user "[user:user]" connects and authenticates IMAP client "2" - Then IMAP client "2" sees the following mailbox info: + Then IMAP client "2" eventually sees the following mailbox info: | name | | INBOX | | Drafts | diff --git a/tests/features/imap/mailbox/hide_all_mail.feature b/tests/features/imap/mailbox/hide_all_mail.feature index ba4e7ba1..9a450e8f 100644 --- a/tests/features/imap/mailbox/hide_all_mail.feature +++ b/tests/features/imap/mailbox/hide_all_mail.feature @@ -7,7 +7,7 @@ Feature: IMAP Hide All Mail And user "[user:user]" connects and authenticates IMAP client "1" Scenario: Hide All Mail Mailbox - Given IMAP client "1" sees the following mailbox info: + Given IMAP client "1" eventually sees the following mailbox info: | name | | INBOX | | Drafts | @@ -20,7 +20,7 @@ Feature: IMAP Hide All Mail | Folders | | Labels | When the user hides All Mail - Then IMAP client "1" sees the following mailbox info: + Then IMAP client "1" eventually sees the following mailbox info: | name | | INBOX | | Drafts | @@ -32,7 +32,7 @@ Feature: IMAP Hide All Mail | Folders | | Labels | When the user shows All Mail - Then IMAP client "1" sees the following mailbox info: + Then IMAP client "1" eventually sees the following mailbox info: | name | | INBOX | | Drafts | diff --git a/tests/features/imap/mailbox/list.feature b/tests/features/imap/mailbox/list.feature index 934409fd..f93fc15f 100644 --- a/tests/features/imap/mailbox/list.feature +++ b/tests/features/imap/mailbox/list.feature @@ -9,7 +9,7 @@ Feature: IMAP list mailboxes And the user logs in with username "[user:user]" and password "password" And user "[user:user]" finishes syncing And user "[user:user]" connects and authenticates IMAP client "1" - Then IMAP client "1" sees the following mailbox info: + Then IMAP client "1" eventually sees the following mailbox info: | name | | INBOX | | Drafts | diff --git a/tests/features/imap/message/copy.feature b/tests/features/imap/message/copy.feature index 3c97b3ef..016fa323 100644 --- a/tests/features/imap/message/copy.feature +++ b/tests/features/imap/message/copy.feature @@ -17,22 +17,22 @@ Feature: IMAP copy messages Scenario: Copy message to label When IMAP client "1" copies the message with subject "foo" from "INBOX" to "Labels/label" And it succeeds - Then IMAP client "1" sees the following messages in "INBOX": + Then IMAP client "1" eventually sees the following messages in "INBOX": | from | to | subject | unread | | john.doe@mail.com | [user:user]@[domain] | foo | false | | jane.doe@mail.com | name@[domain] | bar | true | - And IMAP client "1" sees the following messages in "Labels/label": + And IMAP client "1" eventually sees the following messages in "Labels/label": | from | to | subject | unread | | john.doe@mail.com | [user:user]@[domain] | foo | false | Scenario: Copy all messages to label When IMAP client "1" copies all messages from "INBOX" to "Labels/label" And it succeeds - Then IMAP client "1" sees the following messages in "INBOX": + Then IMAP client "1" eventually sees the following messages in "INBOX": | from | to | subject | unread | | john.doe@mail.com | [user:user]@[domain] | foo | false | | jane.doe@mail.com | name@[domain] | bar | true | - And IMAP client "1" sees the following messages in "Labels/label": + And IMAP client "1" eventually sees the following messages in "Labels/label": | from | to | subject | unread | | john.doe@mail.com | [user:user]@[domain] | foo | false | | jane.doe@mail.com | name@[domain] | bar | true | @@ -43,14 +43,14 @@ Feature: IMAP copy messages Then IMAP client "1" eventually sees the following messages in "INBOX": | from | to | subject | unread | | jane.doe@mail.com | name@[domain] | bar | true | - And IMAP client "1" sees the following messages in "Folders/mbox": + And IMAP client "1" eventually sees the following messages in "Folders/mbox": | from | to | subject | unread | | john.doe@mail.com | [user:user]@[domain] | foo | false | Scenario: Copy all messages to folder does move When IMAP client "1" copies all messages from "INBOX" to "Folders/mbox" And it succeeds - Then IMAP client "1" sees the following messages in "Folders/mbox": + Then IMAP client "1" eventually sees the following messages in "Folders/mbox": | from | to | subject | unread | | john.doe@mail.com | [user:user]@[domain] | foo | false | | jane.doe@mail.com | name@[domain] | bar | true | @@ -66,7 +66,7 @@ Feature: IMAP copy messages And IMAP client "1" eventually sees 0 messages in "Sent" Scenario: Copy message from All mail moves from the original location - Given IMAP client "1" sees the following messages in "INBOX": + Given IMAP client "1" eventually sees the following messages in "INBOX": | from | to | subject | unread | | john.doe@mail.com | [user:user]@[domain] | foo | false | | jane.doe@mail.com | name@[domain] | bar | true | diff --git a/tests/features/imap/message/create.feature b/tests/features/imap/message/create.feature index 733c26c7..367197da 100644 --- a/tests/features/imap/message/create.feature +++ b/tests/features/imap/message/create.feature @@ -12,10 +12,10 @@ Feature: IMAP create messages | from | to | subject | body | | john.doe@email.com | [user:user]@[domain] | foo | bar | Then it succeeds - And IMAP client "1" sees the following messages in "INBOX": + And IMAP client "1" eventually sees the following messages in "INBOX": | from | to | subject | body | | john.doe@email.com | [user:user]@[domain] | foo | bar | - And IMAP client "1" sees the following messages in "All Mail": + And IMAP client "1" eventually sees the following messages in "All Mail": | from | to | subject | body | | john.doe@email.com | [user:user]@[domain] | foo | bar | @@ -37,10 +37,10 @@ Feature: IMAP create messages | from | to | subject | body | | [user:user]@[domain] | john.doe@email.com | foo | bar | Then it succeeds - And IMAP client "1" sees the following messages in "Sent": + And IMAP client "1" eventually sees the following messages in "Sent": | from | to | subject | body | | [user:user]@[domain] | john.doe@email.com | foo | bar | - And IMAP client "1" sees the following messages in "All Mail": + And IMAP client "1" eventually sees the following messages in "All Mail": | from | to | subject | body | | [user:user]@[domain] | john.doe@email.com | foo | bar | @@ -49,10 +49,10 @@ Feature: IMAP create messages | from | to | subject | body | | [alias:alias]@[domain] | john.doe@email.com | foo | bar | Then it succeeds - And IMAP client "1" sees the following messages in "Sent": + And IMAP client "1" eventually sees the following messages in "Sent": | from | to | subject | body | | [alias:alias]@[domain] | john.doe@email.com | foo | bar | - And IMAP client "1" sees the following messages in "All Mail": + And IMAP client "1" eventually sees the following messages in "All Mail": | from | to | subject | body | | [alias:alias]@[domain] | john.doe@email.com | foo | bar | @@ -61,10 +61,10 @@ Feature: IMAP create messages | 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": + And IMAP client "1" eventually sees the following messages in "INBOX": | from | to | subject | body | | john.doe@email.com | john.doe2@[domain] | foo | bar | - And IMAP client "1" sees the following messages in "All Mail": + And IMAP client "1" eventually sees the following messages in "All Mail": | from | to | subject | body | | john.doe@email.com | john.doe2@[domain] | foo | bar | @@ -73,10 +73,10 @@ Feature: IMAP create messages | 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": + And IMAP client "1" eventually sees the following messages in "Sent": | from | to | subject | body | | john.doe@email.com | john.doe2@[domain] | foo | bar | - And IMAP client "1" sees the following messages in "All Mail": + And IMAP client "1" eventually sees the following messages in "All Mail": | from | to | subject | body | | john.doe@email.com | john.doe2@[domain] | foo | bar | @@ -85,7 +85,7 @@ Feature: IMAP create messages | from | to | subject | body | | john.doe@email.com | john.doe2@[domain] | foo | bar | And it succeeds - And IMAP client "1" sees the following messages in "Sent": + And IMAP client "1" eventually sees the following messages in "Sent": | from | to | subject | body | | john.doe@email.com | john.doe2@[domain] | foo | bar | And it succeeds @@ -93,7 +93,7 @@ Feature: IMAP create messages | from | to | subject | body | | john.doe@email.com | john.doe2@[domain] | foo | bar | And it succeeds - And IMAP client "1" sees the following messages in "Sent": + And IMAP client "1" eventually sees the following messages in "Sent": | from | to | subject | body | | john.doe@email.com | john.doe2@[domain] | foo | bar | | 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 ffe7619d..32e04229 100644 --- a/tests/features/imap/message/delete.feature +++ b/tests/features/imap/message/delete.feature @@ -18,14 +18,14 @@ Feature: IMAP remove messages from mailbox Then IMAP client "1" sees that message 2 has the flag "\Deleted" When IMAP client "1" expunges And it succeeds - Then IMAP client "1" sees 9 messages in "Folders/mbox" + Then IMAP client "1" eventually sees 9 messages in "Folders/mbox" Scenario: Mark all messages as deleted and EXPUNGE When IMAP client "1" selects "Folders/mbox" And IMAP client "1" marks all messages as deleted And IMAP client "1" expunges And it succeeds - Then IMAP client "1" sees 0 messages in "Folders/mbox" + Then IMAP client "1" eventually sees 0 messages in "Folders/mbox" Scenario: Mark messages as undeleted and EXPUNGE When IMAP client "1" selects "Folders/mbox" @@ -37,7 +37,7 @@ Feature: IMAP remove messages from mailbox And it succeeds When IMAP client "1" expunges And it succeeds - Then IMAP client "1" sees 2 messages in "Folders/mbox" + Then IMAP client "1" eventually 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" diff --git a/tests/features/imap/message/delete_from_trash.feature b/tests/features/imap/message/delete_from_trash.feature index 7797f130..fdc5105e 100644 --- a/tests/features/imap/message/delete_from_trash.feature +++ b/tests/features/imap/message/delete_from_trash.feature @@ -20,14 +20,14 @@ Feature: IMAP remove messages from Trash Then it succeeds When IMAP client "1" marks the message with subject "foo" as deleted Then it succeeds - And IMAP client "1" sees 2 messages in "Trash" - And IMAP client "1" sees 2 messages in "All Mail" - And IMAP client "1" sees 1 messages in "Labels/label" + And IMAP client "1" eventually sees 2 messages in "Trash" + And IMAP client "1" eventually sees 2 messages in "All Mail" + And IMAP client "1" eventually sees 1 messages in "Labels/label" When IMAP client "1" expunges Then it succeeds - And IMAP client "1" sees 1 messages in "Trash" - And IMAP client "1" sees 2 messages in "All Mail" - And IMAP client "1" sees 1 messages in "Labels/label" + And IMAP client "1" eventually sees 1 messages in "Trash" + And IMAP client "1" eventually sees 2 messages in "All Mail" + And IMAP client "1" eventually sees 1 messages in "Labels/label" Scenario Outline: Message in Trash only is permanently deleted Given the address "[user:user]@[domain]" of account "[user:user]" has the following messages in "Trash": @@ -41,9 +41,9 @@ Feature: IMAP remove messages from Trash And IMAP client "1" selects "Trash" When IMAP client "1" marks the message with subject "foo" as deleted Then it succeeds - And IMAP client "1" sees 2 messages in "Trash" - And IMAP client "1" sees 2 messages in "All Mail" + And IMAP client "1" eventually sees 2 messages in "Trash" + And IMAP client "1" eventually sees 2 messages in "All Mail" When IMAP client "1" expunges Then it succeeds - And IMAP client "1" sees 1 messages in "Trash" + And IMAP client "1" eventually sees 1 messages in "Trash" And IMAP client "1" eventually sees 1 messages in "All Mail" \ No newline at end of file diff --git a/tests/features/imap/message/drafts.feature b/tests/features/imap/message/drafts.feature index 8ebed248..6f185418 100644 --- a/tests/features/imap/message/drafts.feature +++ b/tests/features/imap/message/drafts.feature @@ -15,7 +15,7 @@ Feature: IMAP Draft messages Then IMAP client "1" eventually sees the following messages in "Drafts": | body | | This is a dra | - And IMAP client "1" sees 1 messages in "Drafts" + And IMAP client "1" eventually sees 1 messages in "Drafts" Scenario: Draft edited locally When IMAP client "1" marks message 1 as deleted @@ -33,7 +33,7 @@ Feature: IMAP Draft messages And IMAP client "1" eventually sees the following messages in "Drafts": | to | subject | body | | someone@example.com | Basic Draft | This is a draft, but longer | - And IMAP client "1" sees 1 messages in "Drafts" + And IMAP client "1" eventually sees 1 messages in "Drafts" Scenario: Draft edited remotely When the following fields were changed in draft 1 for address "[user:user]@[domain]" of account "[user:user]": @@ -42,12 +42,12 @@ Feature: IMAP Draft messages Then IMAP client "1" eventually sees the following messages in "Drafts": | to | subject | body | | someone@example.com | Basic Draft | This is a draft body, but longer | - And IMAP client "1" sees 1 messages in "Drafts" + And IMAP client "1" eventually sees 1 messages in "Drafts" Scenario: Draft moved to trash remotely When draft 1 for address "[user:user]@[domain]" of account "[user:user] was moved to trash Then IMAP client "1" eventually sees the following messages in "Trash": | body | | This is a dra | - And IMAP client "1" sees 0 messages in "Drafts" + And IMAP client "1" eventually sees 0 messages in "Drafts" diff --git a/tests/features/imap/message/fetch.feature b/tests/features/imap/message/fetch.feature index 7c4d6fcc..f72461b4 100644 --- a/tests/features/imap/message/fetch.feature +++ b/tests/features/imap/message/fetch.feature @@ -13,7 +13,7 @@ Feature: IMAP Fetch And user "[user:user]" connects and authenticates IMAP client "1" Scenario: Fetch very old message - Given IMAP client "1" sees the following messages in "INBOX": + Given IMAP client "1" eventually sees the following messages in "INBOX": | from | to | subject | date | | john.doe@mail.com | [user:user]@[domain] | foo | 13 Aug 82 00:00 +0000 | Then IMAP client "1" sees header "X-Original-Date: Sun, 13 Jul 1969 00:00:00 +0000" in message with subject "foo" in "INBOX" @@ -21,6 +21,6 @@ Feature: IMAP Fetch Scenario: Fetch from deleted cache When the user deletes the gluon cache - Then IMAP client "1" sees the following messages in "INBOX": + Then IMAP client "1" eventually sees the following messages in "INBOX": | from | to | subject | date | | john.doe@mail.com | [user:user]@[domain] | foo | 13 Aug 82 00:00 +0000 | diff --git a/tests/features/imap/message/import.feature b/tests/features/imap/message/import.feature index a3c36f0a..b70ad4c7 100644 --- a/tests/features/imap/message/import.feature +++ b/tests/features/imap/message/import.feature @@ -104,7 +104,7 @@ Feature: IMAP import messages And IMAP client "1" eventually sees the following messages in "Sent": | from | to | subject | body | | foo@example.com | bridgetest@pm.test | Hello | Hello | - And IMAP client "1" sees 0 messages in "Inbox" + And IMAP client "1" eventually sees 0 messages in "Inbox" Scenario: Import non-received message to Inbox When IMAP client "1" appends the following message to "Inbox": @@ -119,7 +119,7 @@ Feature: IMAP import messages And IMAP client "1" eventually sees the following messages in "INBOX": | from | to | subject | body | | foo@example.com | bridgetest@pm.test | Hello | Hello | - And IMAP client "1" sees 0 messages in "Sent" + And IMAP client "1" eventually sees 0 messages in "Sent" Scenario: Import non-received message to Sent When IMAP client "1" appends the following message to "Sent": @@ -134,7 +134,7 @@ Feature: IMAP import messages And IMAP client "1" eventually sees the following messages in "Sent": | from | to | subject | body | | foo@example.com | bridgetest@pm.test | Hello | Hello | - And IMAP client "1" sees 0 messages in "Inbox" + And IMAP client "1" eventually sees 0 messages in "Inbox" Scenario Outline: Import message without sender to When IMAP client "1" appends the following message to "": diff --git a/tests/features/imap/message/move.feature b/tests/features/imap/message/move.feature index 272498d8..289f258a 100644 --- a/tests/features/imap/message/move.feature +++ b/tests/features/imap/message/move.feature @@ -24,11 +24,11 @@ Feature: IMAP move messages Scenario: Move message from folder to label (keeps in folder) When IMAP client "1" moves the message with subject "foo" from "INBOX" to "Labels/label" And it succeeds - And IMAP client "1" sees the following messages in "INBOX": + And IMAP client "1" eventually sees the following messages in "INBOX": | from | to | subject | unread | | john.doe@mail.com | [user:user]@[domain] | foo | false | | jane.doe@mail.com | name@[domain] | bar | true | - And IMAP client "1" sees the following messages in "Labels/label": + And IMAP client "1" eventually sees the following messages in "Labels/label": | from | to | subject | unread | | john.doe@mail.com | [user:user]@[domain] | foo | false | @@ -41,56 +41,56 @@ Feature: IMAP move messages And IMAP client "target" selects "Labels/label" And IMAP clients "source" and "target" move message with subject "foo" of "[user:user]" to "Labels/label" by APPEND DELETE EXPUNGE And it succeeds - Then IMAP client "source" sees the following messages in "INBOX": + Then IMAP client "source" eventually sees the following messages in "INBOX": | from | to | subject | unread | | jane.doe@mail.com | name@[domain] | bar | true | - And IMAP client "target" sees the following messages in "Labels/label": + And IMAP client "target" eventually sees the following messages in "Labels/label": | from | to | subject | unread | | john.doe@mail.com | [user:user]@[domain] | foo | false | Scenario: Move message from label to folder When IMAP client "1" moves the message with subject "baz" from "Labels/label2" to "Folders/mbox" And it succeeds - And IMAP client "1" sees the following messages in "Folders/mbox": + And IMAP client "1" eventually sees the following messages in "Folders/mbox": | from | to | subject | unread | | john.doe@mail.com | [user:user]@[domain] | baz | false | - And IMAP client "1" sees 0 messages in "Labels/label2" + And IMAP client "1" eventually sees 0 messages in "Labels/label2" Scenario: Move message from label to label When IMAP client "1" moves the message with subject "baz" from "Labels/label2" to "Labels/label" And it succeeds - And IMAP client "1" sees the following messages in "Labels/label": + And IMAP client "1" eventually sees the following messages in "Labels/label": | from | to | subject | unread | | john.doe@mail.com | [user:user]@[domain] | baz | false | - And IMAP client "1" sees 0 messages in "Labels/label2" + And IMAP client "1" eventually sees 0 messages in "Labels/label2" Scenario: Move message from system label to system label When IMAP client "1" moves the message with subject "foo" from "INBOX" to "Trash" And it succeeds - And IMAP client "1" sees the following messages in "INBOX": + And IMAP client "1" eventually sees the following messages in "INBOX": | from | to | subject | unread | | jane.doe@mail.com | name@[domain] | bar | true | - And IMAP client "1" sees the following messages in "Trash": + And IMAP client "1" eventually sees the following messages in "Trash": | from | to | subject | unread | | john.doe@mail.com | [user:user]@[domain] | foo | false | Scenario: Move message from folder to system label When IMAP client "1" moves the message with subject "baz" from "Labels/label2" to "Folders/mbox" And it succeeds - And IMAP client "1" sees the following messages in "Folders/mbox": + And IMAP client "1" eventually sees the following messages in "Folders/mbox": | from | to | subject | unread | | john.doe@mail.com | [user:user]@[domain] | baz | false | When IMAP client "1" moves the message with subject "baz" from "Folders/mbox" to "Trash" And it succeeds - And IMAP client "1" sees 0 messages in "Folders/mbox" - And IMAP client "1" sees the following messages in "Trash": + And IMAP client "1" eventually sees 0 messages in "Folders/mbox" + And IMAP client "1" eventually sees the following messages in "Trash": | from | to | subject | unread | | john.doe@mail.com | [user:user]@[domain] | baz | false | Scenario: Move message from All Mail is not possible When IMAP client "1" moves the message with subject "baz" from "All Mail" to "Folders/folder" Then it fails - And IMAP client "1" sees the following messages in "All Mail": + And IMAP client "1" eventually sees the following messages in "All Mail": | from | to | subject | unread | | john.doe@mail.com | [user:user]@[domain] | foo | false | | jane.doe@mail.com | name@[domain] | bar | true | diff --git a/tests/features/imap/message/move_without_support.feature b/tests/features/imap/message/move_without_support.feature index bdf583b7..ca81095e 100644 --- a/tests/features/imap/message/move_without_support.feature +++ b/tests/features/imap/message/move_without_support.feature @@ -34,8 +34,8 @@ Feature: IMAP move messages by append and delete (without MOVE support, e.g., Ou And IMAP client "source" selects "" And IMAP client "target" selects "" When IMAP clients "source" and "target" move message with subject "subj2" of "[user:user]" to "" by - And IMAP client "source" sees 1 messages in "" - And IMAP client "source" sees the following messages in "": + And IMAP client "source" eventually sees 1 messages in "" + And IMAP client "source" eventually sees the following messages in "": | from | to | subject | | sndr1@[domain] | rcvr1@[domain] | subj1 | And IMAP client "target" eventually sees 1 messages in "" diff --git a/tests/features/imap/migration.feature b/tests/features/imap/migration.feature index 136257f1..4d6a11a9 100644 --- a/tests/features/imap/migration.feature +++ b/tests/features/imap/migration.feature @@ -17,7 +17,7 @@ Feature: Bridge can fully sync an account Scenario: The user changes the gluon path When the user changes the gluon path And user "[user:user]" connects and authenticates IMAP client "2" - Then IMAP client "2" sees the following messages in "INBOX": + Then IMAP client "2" eventually sees the following messages in "INBOX": | from | to | subject | unread | | john.doe@mail.com | [user:user]@[domain] | foo | false | | jane.doe@mail.com | name@[domain] | bar | true | diff --git a/tests/features/user/addressmode.feature b/tests/features/user/addressmode.feature index d447a4c1..714e2e3c 100644 --- a/tests/features/user/addressmode.feature +++ b/tests/features/user/addressmode.feature @@ -20,30 +20,30 @@ Feature: Address mode Scenario: The user is in combined mode When user "[user:user]" connects and authenticates IMAP client "1" with address "[user:user]@[domain]" - Then IMAP client "1" sees the following messages in "Folders/one": + Then IMAP client "1" eventually sees the following messages in "Folders/one": | 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": + And IMAP client "1" eventually sees the following messages in "Folders/two": | 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": + And IMAP client "1" eventually sees the following messages in "All Mail": | from | to | subject | unread | | a@[domain] | a@[domain] | one | true | | b@[domain] | b@[domain] | two | false | | c@[domain] | c@[domain] | three | true | | d@[domain] | d@[domain] | four | false | When user "[user:user]" connects and authenticates IMAP client "2" with address "[alias:alias]@[domain]" - Then IMAP client "2" sees the following messages in "Folders/one": + Then IMAP client "2" eventually sees the following messages in "Folders/one": | 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": + And IMAP client "2" eventually sees the following messages in "Folders/two": | 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": + And IMAP client "2" eventually sees the following messages in "All Mail": | from | to | subject | unread | | a@[domain] | a@[domain] | one | true | | b@[domain] | b@[domain] | two | false | @@ -54,22 +54,22 @@ Feature: Address mode Given the user sets the address mode of user "[user:user]" to "split" And user "[user:user]" finishes syncing When user "[user:user]" connects and authenticates IMAP client "1" with address "[user:user]@[domain]" - Then IMAP client "1" sees the following messages in "Folders/one": + Then IMAP client "1" eventually sees the following messages in "Folders/one": | 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": + And IMAP client "1" eventually sees 0 messages in "Folders/two" + And IMAP client "1" eventually sees the following messages in "All Mail": | from | to | subject | unread | | a@[domain] | a@[domain] | one | true | | b@[domain] | b@[domain] | two | false | When user "[user:user]" connects and authenticates IMAP client "2" with address "[alias:alias]@[domain]" - Then IMAP client "2" sees 0 messages in "Folders/one" - And IMAP client "2" sees the following messages in "Folders/two": + Then IMAP client "2" eventually sees 0 messages in "Folders/one" + And IMAP client "2" eventually sees the following messages in "Folders/two": | 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": + And IMAP client "2" eventually sees the following messages in "All Mail": | from | to | subject | unread | | c@[domain] | c@[domain] | three | true | | d@[domain] | d@[domain] | four | false | @@ -80,14 +80,14 @@ Feature: Address mode And the user sets the address mode of user "[user:user]" to "combined" And user "[user:user]" finishes syncing When user "[user:user]" connects and authenticates IMAP client "1" with address "[user:user]@[domain]" - Then IMAP client "1" sees the following messages in "All Mail": + Then IMAP client "1" eventually sees the following messages in "All Mail": | from | to | subject | unread | | a@[domain] | a@[domain] | one | true | | b@[domain] | b@[domain] | two | false | | c@[domain] | c@[domain] | three | true | | d@[domain] | d@[domain] | four | false | When user "[user:user]" connects and authenticates IMAP client "2" with address "[alias:alias]@[domain]" - Then IMAP client "2" sees the following messages in "All Mail": + Then IMAP client "2" eventually sees the following messages in "All Mail": | from | to | subject | unread | | a@[domain] | a@[domain] | one | true | | b@[domain] | b@[domain] | two | false | @@ -96,14 +96,14 @@ Feature: Address mode Scenario: The user adds an address while in combined mode When user "[user:user]" connects and authenticates IMAP client "1" with address "[user:user]@[domain]" - Then IMAP client "1" sees the following messages in "All Mail": + Then IMAP client "1" eventually sees the following messages in "All Mail": | from | to | subject | unread | | a@[domain] | a@[domain] | one | true | | b@[domain] | b@[domain] | two | false | | c@[domain] | c@[domain] | three | true | | d@[domain] | d@[domain] | four | false | When user "[user:user]" connects and authenticates IMAP client "2" with address "[alias:alias]@[domain]" - Then IMAP client "2" sees the following messages in "All Mail": + Then IMAP client "2" eventually sees the following messages in "All Mail": | from | to | subject | unread | | a@[domain] | a@[domain] | one | true | | b@[domain] | b@[domain] | two | false | @@ -112,7 +112,7 @@ Feature: Address mode Given the account "[user:user]" has additional address "other@[domain]" And bridge sends an address created event for user "[user:user]" When user "[user:user]" connects and authenticates IMAP client "3" with address "other@[domain]" - Then IMAP client "3" sees the following messages in "All Mail": + Then IMAP client "3" eventually sees the following messages in "All Mail": | from | to | subject | unread | | a@[domain] | a@[domain] | one | true | | b@[domain] | b@[domain] | two | false | @@ -123,12 +123,12 @@ Feature: Address mode Given the user sets the address mode of user "[user:user]" to "split" And user "[user:user]" finishes syncing When user "[user:user]" connects and authenticates IMAP client "1" with address "[user:user]@[domain]" - And IMAP client "1" sees the following messages in "All Mail": + And IMAP client "1" eventually sees the following messages in "All Mail": | from | to | subject | unread | | a@[domain] | a@[domain] | one | true | | b@[domain] | b@[domain] | two | false | When user "[user:user]" connects and authenticates IMAP client "2" with address "[alias:alias]@[domain]" - And IMAP client "2" sees the following messages in "All Mail": + And IMAP client "2" eventually sees the following messages in "All Mail": | from | to | subject | unread | | c@[domain] | c@[domain] | three | true | | d@[domain] | d@[domain] | four | false | @@ -139,14 +139,14 @@ Feature: Address mode Scenario: The user deletes an address while in combined mode When user "[user:user]" connects and authenticates IMAP client "1" with address "[user:user]@[domain]" - Then IMAP client "1" sees the following messages in "All Mail": + Then IMAP client "1" eventually sees the following messages in "All Mail": | from | to | subject | unread | | a@[domain] | a@[domain] | one | true | | b@[domain] | b@[domain] | two | false | | c@[domain] | c@[domain] | three | true | | d@[domain] | d@[domain] | four | false | When user "[user:user]" connects and authenticates IMAP client "2" with address "[alias:alias]@[domain]" - Then IMAP client "2" sees the following messages in "All Mail": + Then IMAP client "2" eventually sees the following messages in "All Mail": | from | to | subject | unread | | a@[domain] | a@[domain] | one | true | | b@[domain] | b@[domain] | two | false | @@ -161,12 +161,12 @@ Feature: Address mode Given the user sets the address mode of user "[user:user]" to "split" And user "[user:user]" finishes syncing When user "[user:user]" connects and authenticates IMAP client "1" with address "[user:user]@[domain]" - And IMAP client "1" sees the following messages in "All Mail": + And IMAP client "1" eventually sees the following messages in "All Mail": | from | to | subject | unread | | a@[domain] | a@[domain] | one | true | | b@[domain] | b@[domain] | two | false | When user "[user:user]" connects and authenticates IMAP client "2" with address "[alias:alias]@[domain]" - And IMAP client "2" sees the following messages in "All Mail": + And IMAP client "2" eventually sees the following messages in "All Mail": | from | to | subject | unread | | c@[domain] | c@[domain] | three | true | | d@[domain] | d@[domain] | four | false | diff --git a/tests/features/user/login.feature b/tests/features/user/login.feature index 3edfdb79..1e512431 100644 --- a/tests/features/user/login.feature +++ b/tests/features/user/login.feature @@ -7,7 +7,7 @@ Feature: A user can login Scenario: Login to account When the user logs in with username "[user:user]" and password "password" - Then user "[user:user]" is listed and connected + Then user "[user:user]" is eventually listed and connected Scenario: Login to account with wrong password When the user logs in with username "[user:user]" and password "wrong" @@ -24,11 +24,11 @@ Feature: A user can login Scenario: Login to account with caps When the user logs in with username "[user:MixedCaps]" and password "password" - Then user "[user:MixedCaps]" is listed and connected + Then user "[user:MixedCaps]" is eventually listed and connected Scenario: Login to account with disabled primary When the user logs in with username "[user:disabled]" and password "password" - Then user "[user:disabled]" is listed and connected + Then user "[user:disabled]" is eventually listed and connected Scenario: Login to account without internet but the connection is later restored When the user logs in with username "[user:user]" and password "password" @@ -42,5 +42,5 @@ Feature: A user can login Given there exists an account with username "[user:additional]" and password "password" When the user logs in with username "[user:user]" and password "password" And the user logs in with username "[user:additional]" and password "password" - Then user "[user:user]" is listed and connected - And user "[user:additional]" is listed and connected \ No newline at end of file + Then user "[user:user]" is eventually listed and connected + And user "[user:additional]" is eventually listed and connected \ No newline at end of file diff --git a/tests/features/user/relogin.feature b/tests/features/user/relogin.feature index 2da7b437..021a6696 100644 --- a/tests/features/user/relogin.feature +++ b/tests/features/user/relogin.feature @@ -8,7 +8,7 @@ Feature: A logged out user can login again When user "[user:user]" logs out And bridge restarts And the user logs in with username "[user:user]" and password "password" - Then user "[user:user]" is listed and connected + Then user "[user:user]" is eventually listed and connected Scenario: Cannot login to removed account When user "[user:user]" is deleted diff --git a/tests/features/user/sync.feature b/tests/features/user/sync.feature index 5f0fbf91..260eea3d 100644 --- a/tests/features/user/sync.feature +++ b/tests/features/user/sync.feature @@ -21,7 +21,7 @@ Feature: Bridge can fully sync an account Then bridge sends sync started and finished events for user "[user:user]" When bridge restarts And user "[user:user]" connects and authenticates IMAP client "1" - Then IMAP client "1" sees the following mailbox info: + Then IMAP client "1" eventually sees the following mailbox info: | name | total | unread | | INBOX | 0 | 0 | | Drafts | 0 | 0 |