test(GODT-1602): run integration tests against black 🖤

This commit is contained in:
Jakub Cuth
2024-02-19 10:43:35 +00:00
parent 2a1aeb208d
commit 37352d44d2
51 changed files with 525 additions and 271 deletions

View File

@ -3,7 +3,6 @@ Feature: A user can authenticate an IMAP client
Given there exists an account with username "[user:user]" and password "password"
And there exists an account with username "[user:user2]" and password "password2"
And the account "[user:user]" has additional address "[alias:alias]@[domain]"
And the account "[user:user2]" has additional disabled address "[alias:alias2]@[domain]"
Then it succeeds
When bridge starts
And the user logs in with username "[user:user]" and password "password"
@ -21,8 +20,12 @@ Feature: A user can authenticate an IMAP client
Scenario: IMAP client can authenticate successfully with secondary address
Given user "[user:user]" connects and authenticates IMAP client "1" with address "[alias:alias]@[domain]"
# Need to find way to setup disabled address on black
@skip-black
Scenario: IMAP client can not authenticate successfully with disable address
Given user "[user:user2]" connects and can not authenticate IMAP client "1" with address "[alias:alias2]@[domain]"
Given the account "[user:user2]" has additional disabled address "[alias:disabled]@[domain]"
And it succeeds
Then user "[user:user2]" connects and can not authenticate IMAP client "1" with address "[alias:disabled]@[domain]"
Scenario: IMAP client can authenticate successfully
When user "[user:user]" connects IMAP client "1"

View File

@ -40,6 +40,8 @@ Feature: IMAP list mailboxes
Then IMAP client "2" counts 20 mailboxes under "Folders"
And IMAP client "2" counts 60 mailboxes under "Labels"
# need to implement _schedule message_ test step for black
@skip-black
Scenario: List with scheduled mail
Given there exists an account with username "[user:user]" and password "password"
And the address "[user:user]@[domain]" of account "[user:user]" has the following messages in "Scheduled":

View File

@ -12,6 +12,8 @@ Feature: IMAP get mailbox info
And user "[user:user]" connects and authenticates IMAP client "1"
Then it succeeds
# with black subfolder is not renamed (maybe missing event?)
@skip-black
Scenario: Rename folder with subfolders
When IMAP client "1" renames "Folders/f1" to "Folders/f3"
And it succeeds

View File

@ -6,7 +6,6 @@ Feature: IMAP remove messages from mailbox
| mbox | folder |
| label | label |
And the address "[user:user]@[domain]" of account "[user:user]" has 10 messages in "Folders/mbox"
And the address "[user:user]@[domain]" of account "[user:user]" has 1 messages in "Scheduled"
Then it succeeds
When bridge starts
And the user logs in with username "[user:user]" and password "password"
@ -48,10 +47,3 @@ Feature: IMAP remove messages from mailbox
And it succeeds
And IMAP client "1" expunges
Then it fails
Scenario: Not possible to delete from Scheduled and expunge does nothing
When IMAP client "1" selects "Scheduled"
And IMAP client "1" marks message 1 as deleted
Then it succeeds
And IMAP client "1" expunges
Then it fails

View File

@ -42,6 +42,8 @@ Feature: IMAP Draft messages
And IMAP client "1" eventually sees 1 messages in "Drafts"
And IMAP client "1" does not see header "Reply-To" in message with subject "Basic Draft" in "Drafts"
# The draft event is received from black but it's not processed to IMAP
@skip-black
Scenario: Draft edited remotely
When the following fields were changed in draft 1 for address "[user:user]@[domain]" of account "[user:user]":
| to | subject | body |
@ -52,6 +54,8 @@ Feature: IMAP Draft messages
And IMAP client "1" eventually sees 1 messages in "Drafts"
And IMAP client "1" does not see header "Reply-To" in message with subject "Basic Draft" in "Drafts"
# The draft event is received from black but it's not processed to IMAP
@skip-black
@regression
Scenario: Draft edited remotely and sent from client
When IMAP client "1" selects "Drafts"
@ -103,6 +107,8 @@ Feature: IMAP Draft messages
And IMAP client "1" eventually sees 0 messages in "Drafts"
# The draft event is received from black but it's not processed to IMAP
@skip-black
Scenario: Draft moved to trash remotely
When draft 1 for address "[user:user]@[domain]" of account "[user:user]" was moved to trash
Then IMAP client "1" eventually sees the following messages in "Trash":

View File

@ -15,6 +15,8 @@ Feature: IMAP Fetch
And user "[user:user]" connects and authenticates IMAP client "1"
Then it succeeds
# The date returned from black is server time.. Black is probably correct we need to fix GPA server
@skip-black
Scenario: Fetch very old message
Given IMAP client "1" eventually sees the following messages in "INBOX":
| from | to | subject | date |
@ -22,6 +24,8 @@ Feature: IMAP Fetch
Then IMAP client "1" sees header "X-Original-Date: Sun, 13 Jul 1969 00:00:00 +0000" in message with subject "foo" in "INBOX"
# The date returned from black is server time.. Black is probably correct we need to fix GPA server
@skip-black
Scenario: Fetch from deleted cache
When the user deletes the gluon cache
Then IMAP client "1" eventually sees the following messages in "INBOX":

View File

@ -274,6 +274,8 @@ Feature: IMAP import messages
| Archive |
| Sent |
# The date returned from black is server time.. Black is probably correct we need to fix GPA server
@skip-black
Scenario: Import message without sender to Drafts
When IMAP client "1" appends the following message to "Drafts":
"""
@ -648,4 +650,4 @@ Feature: IMAP import messages
]
}
}
"""
"""

View File

@ -16,9 +16,6 @@ Feature: IMAP move messages
And the address "[user:user]@[domain]" of account "[user:user]" has the following messages in "Sent":
| from | to | subject | unread |
| john.doe@mail.com | [user:user]@[domain] | bax | false |
And the address "[user:user]@[domain]" of account "[user:user]" has the following messages in "Scheduled":
| from | to | subject | unread |
| john.doe@mail.com | [user:user]@[domain] | sch | false |
Then it succeeds
When bridge starts
And the user logs in with username "[user:user]" and password "password"
@ -124,15 +121,7 @@ Feature: IMAP move messages
| jane.doe@mail.com | name@[domain] | bar | true |
| john.doe@mail.com | [user:user]@[domain] | baz | false |
| john.doe@mail.com | [user:user]@[domain] | bax | false |
| john.doe@mail.com | [user:user]@[domain] | sch | false |
Scenario: Move message from Scheduled is not possible
Given test skips reporter checks
When IMAP client "1" moves the message with subject "sch" from "Scheduled" to "Inbox"
Then it fails
And IMAP client "1" eventually sees the following messages in "Scheduled":
| from | to | subject | unread |
| john.doe@mail.com | [user:user]@[domain] | sch | false |
Scenario: Move message from Inbox to Sent is not possible
Given test skips reporter checks

View File

@ -60,9 +60,49 @@ Feature: IMAP move messages by append and delete (without MOVE support, e.g., Ou
| INBOX | Folders/mbox | DELETE APPEND EXPUNGE |
| INBOX | Spam | DELETE APPEND EXPUNGE |
| INBOX | Trash | DELETE APPEND EXPUNGE |
| Trash | INBOX | DELETE EXPUNGE APPEND |
| Spam | INBOX | DELETE EXPUNGE APPEND |
| INBOX | Archive | DELETE EXPUNGE APPEND |
| INBOX | Folders/mbox | DELETE EXPUNGE APPEND |
| INBOX | Spam | DELETE EXPUNGE APPEND |
| INBOX | Trash | DELETE EXPUNGE APPEND |
# black cannot pass this test, test timimng probably needs to be different. Once fixed it can be merged again
@skip-black
Scenario Outline: Move message from <srcMailbox> to <dstMailbox> by <order>, second batch
When IMAP client "source" appends the following message to "<srcMailbox>":
"""
Received: by 2002:0:0:0:0:0:0:0 with SMTP id 0123456789abcdef; Wed, 30 Dec 2020 01:23:45 0000
From: sndr1@[domain]
Date: 01 Jan 1980 00:00:00 +0000
To: rcvr1@[domain]
Subject: subj1
body1
"""
Then it succeeds
When IMAP client "source" appends the following message to "<srcMailbox>":
"""
Received: by 2002:0:0:0:0:0:0:0 with SMTP id 0123456789abcdef; Wed, 30 Dec 2020 01:23:45 0000
From: sndr2@[domain]
Date: 01 Jan 1980 00:00:00 +0000
To: rcvr2@[domain]
Subject: subj2
body2
"""
Then it succeeds
And IMAP client "source" selects "<srcMailbox>"
And IMAP client "target" selects "<dstMailbox>"
When IMAP clients "source" and "target" move message with subject "subj2" of "[user:user]" to "<dstMailbox>" by <order>
And IMAP client "source" eventually sees 1 messages in "<srcMailbox>"
And IMAP client "source" eventually sees the following messages in "<srcMailbox>":
| from | to | subject |
| sndr1@[domain] | rcvr1@[domain] | subj1 |
And IMAP client "target" eventually sees 1 messages in "<dstMailbox>"
And IMAP client "target" eventually sees the following messages in "<dstMailbox>":
| from | to | subject |
| sndr2@[domain] | rcvr2@[domain] | subj2 |
Examples:
| srcMailbox | dstMailbox | order |
| Trash | INBOX | DELETE EXPUNGE APPEND |

View File

@ -0,0 +1,56 @@
# need to implement _schedule message_ test step for black
@skip-black
Feature: IMAP interaction with scheduled
Scenario: Not possible to delete from Scheduled and expunge does nothing
Given there exists an account with username "[user:user]" and password "password"
And the account "[user:user]" has the following custom mailboxes:
| name | type |
| mbox | folder |
| label | label |
And the address "[user:user]@[domain]" of account "[user:user]" has 10 messages in "Folders/mbox"
And the address "[user:user]@[domain]" of account "[user:user]" has 1 messages in "Scheduled"
Then it succeeds
When bridge starts
And the user logs in with username "[user:user]" and password "password"
And user "[user:user]" finishes syncing
And user "[user:user]" connects and authenticates IMAP client "1"
Then it succeeds
When IMAP client "1" selects "Scheduled"
And IMAP client "1" marks message 1 as deleted
Then it succeeds
And IMAP client "1" expunges
Then it fails
Scenario: Move message from Scheduled is not possible
Given there exists an account with username "[user:user]" and password "password"
And the account "[user:user]" has the following custom mailboxes:
| name | type |
| mbox | folder |
| label | label |
| label2 | label |
And the address "[user:user]@[domain]" of account "[user:user]" has the following messages in "Inbox":
| from | to | subject | unread |
| john.doe@mail.com | [user:user]@[domain] | foo | false |
| jane.doe@mail.com | name@[domain] | bar | true |
And the address "[user:user]@[domain]" of account "[user:user]" has the following messages in "Labels/label2":
| from | to | subject | unread |
| john.doe@mail.com | [user:user]@[domain] | baz | false |
And the address "[user:user]@[domain]" of account "[user:user]" has the following messages in "Sent":
| from | to | subject | unread |
| john.doe@mail.com | [user:user]@[domain] | bax | false |
And the address "[user:user]@[domain]" of account "[user:user]" has the following messages in "Scheduled":
| from | to | subject | unread |
| john.doe@mail.com | [user:user]@[domain] | sch | false |
Then it succeeds
When bridge starts
And the user logs in with username "[user:user]" and password "password"
And user "[user:user]" finishes syncing
And user "[user:user]" connects and authenticates IMAP client "1"
Then it succeeds
Given test skips reporter checks
When IMAP client "1" moves the message with subject "sch" from "Scheduled" to "Inbox"
Then it fails
And IMAP client "1" eventually sees the following messages in "Scheduled":
| from | to | subject | unread |
| john.doe@mail.com | [user:user]@[domain] | sch | false |

View File

@ -6,7 +6,7 @@ Feature: IMAP change state of message in mailbox
| one | folder |
| two | folder |
And the address "[user:user]@[domain]" of account "[user:user]" has 5 messages in "Folders/one"
And the address "[user:user]@[domain]" of account "[user:user]" has 150 messages in "Folders/two"
And the address "[user:user]@[domain]" of account "[user:user]" has 5 messages in "Folders/two"
And the address "[user:user]@[domain]" of account "[user:user]" has the following messages in "Inbox":
| from | to | subject | unread |
| a@example.com | b@example.com | one | true |