Other: IMAP create duplicate mailbox tests

This commit is contained in:
James Houlahan
2022-10-25 00:07:47 +02:00
parent 94e219137e
commit b594b5f90a
5 changed files with 84 additions and 70 deletions

View File

@ -1,6 +1,12 @@
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:
| 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
@ -12,4 +18,36 @@ Feature: IMAP create mailbox
Scenario: Create label
When IMAP client "1" creates "Labels/mbox"
Then IMAP client "1" sees "Labels/mbox"
Then IMAP client "1" sees "Labels/mbox"
Scenario: Creating folder or label with existing name is not possible
When IMAP client "1" creates "Folders/f1"
Then it fails
When IMAP client "1" creates "Folders/f2"
Then it fails
When IMAP client "1" creates "Labels/l1"
Then it fails
When IMAP client "1" creates "Labels/l2"
Then it fails
When IMAP client "1" creates "Folders/f3"
Then it succeeds
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 |

View File

@ -8,39 +8,39 @@ Feature: IMAP Hide All Mail
Scenario: Hide All Mail Mailbox
Given 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 |
| Labels | 0 | 0 |
| name |
| INBOX |
| Drafts |
| Sent |
| Starred |
| Archive |
| Spam |
| Trash |
| All Mail |
| Folders |
| Labels |
When bridge hides all mail
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 |
| Folders | 0 | 0 |
| Labels | 0 | 0 |
| name |
| INBOX |
| Drafts |
| Sent |
| Starred |
| Archive |
| Spam |
| Trash |
| Folders |
| Labels |
When bridge shows all mail
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 |
| Labels | 0 | 0 |
| name |
| INBOX |
| Drafts |
| Sent |
| Starred |
| Archive |
| Spam |
| Trash |
| All Mail |
| Folders |
| Labels |

View File

@ -10,19 +10,19 @@ Feature: IMAP list mailboxes
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 |
| name |
| INBOX |
| Drafts |
| Sent |
| Starred |
| Archive |
| Spam |
| Trash |
| All Mail |
| Folders |
| Folders/mbox1 |
| Labels |
| Labels/mbox2 |
Scenario: List multiple times in parallel without crash
Given there exists an account with username "user@pm.me" and password "password"