forked from Silverfish/proton-bridge
GODT-1779: Remove go-imap
This commit is contained in:
61
tests/features/imap/message/copy.feature
Normal file
61
tests/features/imap/message/copy.feature
Normal file
@ -0,0 +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:
|
||||
| name | type |
|
||||
| mbox | folder |
|
||||
| label | label |
|
||||
And the account "user@pm.me" has the following messages in "Inbox":
|
||||
| sender | recipient | subject | unread |
|
||||
| john.doe@mail.com | user@pm.me | foo | false |
|
||||
| jane.doe@mail.com | name@pm.me | 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"
|
||||
|
||||
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":
|
||||
| sender | recipient | subject | unread |
|
||||
| john.doe@mail.com | user@pm.me | foo | false |
|
||||
| jane.doe@mail.com | name@pm.me | bar | true |
|
||||
And IMAP client "1" sees the following messages in "Labels/label":
|
||||
| sender | recipient | subject | unread |
|
||||
| john.doe@mail.com | user@pm.me | 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":
|
||||
| sender | recipient | subject | unread |
|
||||
| john.doe@mail.com | user@pm.me | foo | false |
|
||||
| jane.doe@mail.com | name@pm.me | bar | true |
|
||||
And IMAP client "1" sees the following messages in "Labels/label":
|
||||
| sender | recipient | subject | unread |
|
||||
| john.doe@mail.com | user@pm.me | foo | false |
|
||||
| jane.doe@mail.com | name@pm.me | 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":
|
||||
| sender | recipient | subject | unread |
|
||||
| jane.doe@mail.com | name@pm.me | bar | true |
|
||||
And IMAP client "1" sees the following messages in "Folders/mbox":
|
||||
| sender | recipient | subject | unread |
|
||||
| john.doe@mail.com | user@pm.me | 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":
|
||||
| sender | recipient | subject | unread |
|
||||
| john.doe@mail.com | user@pm.me | foo | false |
|
||||
| jane.doe@mail.com | name@pm.me | 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":
|
||||
| sender | recipient | subject | unread |
|
||||
| john.doe@mail.com | user@pm.me | foo | false |
|
||||
| jane.doe@mail.com | name@pm.me | bar | true |
|
||||
And IMAP client "1" eventually sees 0 messages in "Sent"
|
||||
39
tests/features/imap/message/delete.feature
Normal file
39
tests/features/imap/message/delete.feature
Normal file
@ -0,0 +1,39 @@
|
||||
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:
|
||||
| name | type |
|
||||
| mbox | folder |
|
||||
| label | label |
|
||||
And the account "user@pm.me" 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"
|
||||
|
||||
Scenario: Mark message as deleted and EXPUNGE
|
||||
When IMAP client "1" selects "Folders/mbox"
|
||||
And IMAP client "1" marks message 2 as deleted
|
||||
Then IMAP client "1" sees that message 2 has the flag "\Deleted"
|
||||
When IMAP client "1" expunges
|
||||
Then IMAP client "1" 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
|
||||
Then IMAP client "1" sees 0 messages in "Folders/mbox"
|
||||
|
||||
Scenario: Mark messages as undeleted and EXPUNGE
|
||||
When IMAP client "1" selects "Folders/mbox"
|
||||
And IMAP client "1" marks all messages as deleted
|
||||
But IMAP client "1" marks message 2 as not deleted
|
||||
And IMAP client "1" marks message 3 as not deleted
|
||||
When IMAP client "1" expunges
|
||||
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 IMAP client "1" eventually sees 10 messages in "All Mail"
|
||||
Reference in New Issue
Block a user