From 826dc2e5c37973ce9f14accfb19972ba34a72824 Mon Sep 17 00:00:00 2001 From: Gjorgji Slamkov Date: Tue, 8 Aug 2023 14:37:00 +0000 Subject: [PATCH] test(GODT-2743): Sync high number of messages --- tests/features_long/user/sync.feature | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 tests/features_long/user/sync.feature diff --git a/tests/features_long/user/sync.feature b/tests/features_long/user/sync.feature new file mode 100644 index 00000000..d72d4e4c --- /dev/null +++ b/tests/features_long/user/sync.feature @@ -0,0 +1,43 @@ +Feature: Bridge can fully synchronize an account with high number of messages, and correct number of messages is shown in client + Background: + Given there exists an account with username "[user:user]" and password "password" + And the account "[user:user]" has the following custom mailboxes: + | name | type | + | one | folder | + | two | folder | + | three | folder | + | four | label | + And the address "[user:user]@[domain]" of account "[user:user]" has 1000 messages in "Folders/one" + And the address "[user:user]@[domain]" of account "[user:user]" has 5450 messages in "Folders/two" + And the address "[user:user]@[domain]" of account "[user:user]" has the following messages in "Folders/three": + | 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 | true | + And the address "[user:user]@[domain]" of account "[user:user]" has 9800 messages in "Labels/four" + Then it succeeds + When bridge starts + Then it succeeds + + Scenario: The account is synced when the user logs in and the number of messages is correct + When the user logs in with username "[user:user]" and password "password" + Then bridge sends sync started and finished events for user "[user:user]" + Then it succeeds + And user "[user:user]" connects and authenticates IMAP client "1" + Then IMAP client "1" eventually sees the following mailbox info: + | name | total | unread | + | INBOX | 0 | 0 | + | Drafts | 0 | 0 | + | Sent | 0 | 0 | + | Starred | 0 | 0 | + | Archive | 0 | 0 | + | Spam | 0 | 0 | + | Trash | 0 | 0 | + | All Mail | 16254 | 3 | + | Folders | 0 | 0 | + | Folders/one | 1000 | 0 | + | Folders/two | 5450 | 0 | + | Folders/three | 4 | 3 | + | Labels | 0 | 0 | + | Labels/four | 9800 | 0 |