Finish tests for moving without MOVE support

This commit is contained in:
Michal Horejsek
2020-09-07 11:13:05 +02:00
parent ec9a799fe9
commit 5496a26f73
5 changed files with 104 additions and 66 deletions

View File

@ -1,31 +0,0 @@
Feature: IMAP move messages like Outlook
Background:
Given there is connected user "user"
And there is "user" with mailbox "Folders/mbox"
And there are messages in mailbox "INBOX" for "user"
| from | to | subject | body |
| john.doe@mail.com | user@pm.me | foo | hello |
| jane.doe@mail.com | name@pm.me | bar | world |
And there is IMAP client logged in as "user"
And there is IMAP client selected in "INBOX"
Scenario: Move message from INBOX to mailbox like outlook
When IMAP client moves messages "2" to "<mailbox>" like Outlook for "user"
Then IMAP response is "OK"
And mailbox "INBOX" for "user" has messages
| from | to | subject |
| jane.doe@mail.com | name@pm.me | bar |
And mailbox "<mailbox>" for "user" has messages
| from | to | subject |
| john.doe@mail.com | user@pm.me | foo |
Examples:
| mailbox |
| Archive |
| Folders/mbox |
| Spam |
| Trash |
#Scenario: Move message from Trash/Spam to INBOX like outlook

View File

@ -0,0 +1,60 @@
Feature: IMAP move messages by append and delete (without MOVE support, e.g., Outlook)
Background:
Given there is connected user "user"
And there is "user" with mailbox "Folders/mbox"
And there is IMAP client "source" logged in as "user"
And there is IMAP client "target" logged in as "user"
Scenario Outline: Move message from INBOX to mailbox by append and delete
# Messages are inserted in opposite way to keep increasing ID.
# Sequence numbers are then opposite than listed below.
Given there are messages in mailbox "INBOX" for "user"
| from | to | subject | body |
| john.doe@mail.com | user@pm.me | foo | hello |
| jane.doe@mail.com | name@pm.me | bar | world |
And there is IMAP client "source" selected in "INBOX"
And there is IMAP client "target" selected in "<mailbox>"
When IMAP clients "source" and "target" move message "1" of "user" from "INBOX" to "<mailbox>" by append and delete
Then IMAP response to "source" is "OK"
Then IMAP response to "target" is "OK"
When IMAP client "source" sends expunge
Then IMAP response to "source" is "OK"
And mailbox "INBOX" for "user" has messages
| from | to | subject |
| john.doe@mail.com | user@pm.me | foo |
And mailbox "<mailbox>" for "user" has messages
| from | to | subject |
| jane.doe@mail.com | name@pm.me | bar |
Examples:
| mailbox |
| Archive |
| Folders/mbox |
| Spam |
| Trash |
Scenario Outline: Move message from Trash/Spam to INBOX by append and delete
# Messages are inserted in opposite way to keep increasing ID.
# Sequence numbers are then opposite than listed below.
Given there are messages in mailbox "<mailbox>" for "user"
| from | to | subject | body |
| john.doe@mail.com | user@pm.me | foo | hello |
| jane.doe@mail.com | name@pm.me | bar | world |
And there is IMAP client "source" selected in "<mailbox>"
And there is IMAP client "target" selected in "INBOX"
When IMAP clients "source" and "target" move message "1" of "user" from "<mailbox>" to "INBOX" by append and delete
Then IMAP response to "source" is "OK"
Then IMAP response to "target" is "OK"
When IMAP client "source" sends expunge
Then IMAP response to "source" is "OK"
And mailbox "INBOX" for "user" has messages
| from | to | subject |
| jane.doe@mail.com | name@pm.me | bar |
And mailbox "<mailbox>" for "user" has messages
| from | to | subject |
| john.doe@mail.com | user@pm.me | foo |
Examples:
| mailbox |
| Spam |
| Trash |