forked from Silverfish/proton-bridge
GODT-1779: Remove go-imap
This commit is contained in:
15
tests/features/imap/mailbox/create.feature
Normal file
15
tests/features/imap/mailbox/create.feature
Normal file
@ -0,0 +1,15 @@
|
||||
Feature: IMAP create mailbox
|
||||
Background:
|
||||
Given there exists an account with username "user@pm.me" 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"
|
||||
|
||||
Scenario: Create folder
|
||||
When IMAP client "1" creates "Folders/mbox"
|
||||
Then IMAP client "1" sees "Folders/mbox"
|
||||
|
||||
Scenario: Create label
|
||||
When IMAP client "1" creates "Labels/mbox"
|
||||
Then IMAP client "1" sees "Labels/mbox"
|
||||
29
tests/features/imap/mailbox/delete.feature
Normal file
29
tests/features/imap/mailbox/delete.feature
Normal file
@ -0,0 +1,29 @@
|
||||
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:
|
||||
| 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"
|
||||
|
||||
Scenario: Delete folder
|
||||
When IMAP client "1" deletes "Folders/one"
|
||||
Then IMAP client "1" does not see "Folders/one"
|
||||
But IMAP client "1" sees "Folders/two"
|
||||
But IMAP client "1" sees "Labels/three"
|
||||
|
||||
Scenario: Delete label
|
||||
When IMAP client "1" deletes "Labels/three"
|
||||
Then IMAP client "1" does not see "Labels/three"
|
||||
But IMAP client "1" sees "Folders/one"
|
||||
But IMAP client "1" sees "Folders/two"
|
||||
|
||||
Scenario: Deleting system mailbox is not possible
|
||||
When IMAP client "1" deletes "INBOX"
|
||||
Then it fails
|
||||
And IMAP client "1" sees "INBOX"
|
||||
19
tests/features/imap/mailbox/info.feature
Normal file
19
tests/features/imap/mailbox/info.feature
Normal file
@ -0,0 +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 account "user@pm.me" has the following messages in "one":
|
||||
| sender | recipient | subject | unread |
|
||||
| a@pm.me | a@pm.me | one | true |
|
||||
| b@pm.me | b@pm.me | 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
|
||||
|
||||
Scenario: Mailbox status reports correct name, total and unread
|
||||
When user "user@pm.me" 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 |
|
||||
39
tests/features/imap/mailbox/list.feature
Normal file
39
tests/features/imap/mailbox/list.feature
Normal file
@ -0,0 +1,39 @@
|
||||
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:
|
||||
| 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"
|
||||
Then IMAP client "1" 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 | 0 | 0 |
|
||||
| Folders | 0 | 0 |
|
||||
| Folders/mbox1 | 0 | 0 |
|
||||
| Labels | 0 | 0 |
|
||||
| Labels/mbox2 | 0 | 0 |
|
||||
|
||||
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
|
||||
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"
|
||||
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"
|
||||
And IMAP client "2" counts 60 mailboxes under "Labels"
|
||||
29
tests/features/imap/mailbox/rename.feature
Normal file
29
tests/features/imap/mailbox/rename.feature
Normal file
@ -0,0 +1,29 @@
|
||||
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 |
|
||||
| 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"
|
||||
|
||||
Scenario: Rename folder
|
||||
When IMAP client "1" renames "Folders/f1" to "Folders/f2"
|
||||
Then IMAP client "1" sees "Folders/f2"
|
||||
And IMAP client "1" does not see "Folders/f1"
|
||||
|
||||
Scenario: Rename label
|
||||
When IMAP client "1" renames "Labels/l1" to "Labels/l2"
|
||||
Then IMAP client "1" sees "Labels/l2"
|
||||
And IMAP client "1" does not see "Labels/l1"
|
||||
|
||||
Scenario: Renaming folder to label is not possible
|
||||
When IMAP client "1" renames "Folders/f1" to "Labels/f2"
|
||||
Then it fails
|
||||
|
||||
Scenario: Renaming system folder is not possible
|
||||
When IMAP client "1" renames "Labels/l1" to "Folders/l2"
|
||||
Then it fails
|
||||
27
tests/features/imap/mailbox/select.feature
Normal file
27
tests/features/imap/mailbox/select.feature
Normal file
@ -0,0 +1,27 @@
|
||||
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:
|
||||
| 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"
|
||||
|
||||
Scenario: Select inbox
|
||||
When IMAP client "1" selects "INBOX"
|
||||
Then it succeeds
|
||||
|
||||
Scenario: Select custom mailbox
|
||||
When IMAP client "1" selects "Folders/mbox"
|
||||
Then it succeeds
|
||||
|
||||
Scenario: Select custom label
|
||||
When IMAP client "1" selects "Labels/label"
|
||||
Then it succeeds
|
||||
|
||||
Scenario: Select non-existing mailbox
|
||||
When IMAP client "1" selects "qwerty"
|
||||
Then it fails
|
||||
Reference in New Issue
Block a user