Clear separation of different message IDs in integration tests

This commit is contained in:
Michal Horejsek
2020-10-14 14:41:39 +02:00
parent 288ba11452
commit 43d54c8f4f
22 changed files with 261 additions and 220 deletions

View File

@ -1,8 +1,6 @@
Feature: IMAP search messages
Background:
Given there is connected user "user"
# Messages are inserted in opposite way to keep increasing ID.
# Sequence numbers are then opposite than listed above.
Given there are messages in mailbox "INBOX" for "user"
| from | to | cc | subject | read | starred | deleted | body |
| john.doe@email.com | user@pm.me | | foo | false | false | false | hello |
@ -34,17 +32,17 @@ Feature: IMAP search messages
Scenario: Search by Subject
When IMAP client searches for "SUBJECT foo"
Then IMAP response is "OK"
And IMAP response contains "SEARCH 3[^0-9]*$"
And IMAP response contains "SEARCH 1[^0-9]*$"
Scenario: Search by From
When IMAP client searches for "FROM jane.doe@email.com"
Then IMAP response is "OK"
And IMAP response contains "SEARCH 1 2[^0-9]*$"
And IMAP response contains "SEARCH 2 3[^0-9]*$"
Scenario: Search by To
When IMAP client searches for "TO user@pm.me"
Then IMAP response is "OK"
And IMAP response contains "SEARCH 2 3[^0-9]*$"
And IMAP response contains "SEARCH 1 2[^0-9]*$"
Scenario: Search by CC
When IMAP client searches for "CC name@pm.me"
@ -64,22 +62,22 @@ Feature: IMAP search messages
Scenario: Search seen messages
When IMAP client searches for "SEEN"
Then IMAP response is "OK"
And IMAP response contains "SEARCH 1 2[^0-9]*$"
And IMAP response contains "SEARCH 2 3[^0-9]*$"
Scenario: Search unseen messages
When IMAP client searches for "UNSEEN"
Then IMAP response is "OK"
And IMAP response contains "SEARCH 3[^0-9]*$"
And IMAP response contains "SEARCH 1[^0-9]*$"
Scenario: Search deleted messages
When IMAP client searches for "DELETED"
Then IMAP response is "OK"
And IMAP response contains "SEARCH 1[^0-9]*$"
And IMAP response contains "SEARCH 3[^0-9]*$"
Scenario: Search undeleted messages
When IMAP client searches for "UNDELETED"
Then IMAP response is "OK"
And IMAP response contains "SEARCH 2 3[^0-9]*$"
And IMAP response contains "SEARCH 1 2[^0-9]*$"
Scenario: Search recent messages
When IMAP client searches for "RECENT"
@ -89,4 +87,4 @@ Feature: IMAP search messages
Scenario: Search by more criterias
When IMAP client searches for "SUBJECT baz TO name@pm.me SEEN UNFLAGGED"
Then IMAP response is "OK"
And IMAP response contains "SEARCH 1[^0-9]*$"
And IMAP response contains "SEARCH 3[^0-9]*$"