forked from Silverfish/proton-bridge
Clean also All Mail and Drafts mailboxes before running integration test
This commit is contained in:
@ -4,8 +4,6 @@ Feature: IMAP delete messages
|
||||
And there is "user" with mailbox "Folders/mbox"
|
||||
And there is "user" with mailbox "Labels/label"
|
||||
|
||||
# https://gitlab.protontech.ch/ProtonMail/Slim-API/issues/1420
|
||||
@ignore-live
|
||||
Scenario Outline: Delete message
|
||||
Given there are 10 messages in mailbox "<mailbox>" for "user"
|
||||
And there is IMAP client logged in as "user"
|
||||
@ -19,11 +17,8 @@ Feature: IMAP delete messages
|
||||
| INBOX |
|
||||
| Folders/mbox |
|
||||
| Labels/label |
|
||||
| Drafts |
|
||||
| Trash |
|
||||
|
||||
# https://gitlab.protontech.ch/ProtonMail/Slim-API/issues/1420
|
||||
@ignore-live
|
||||
Scenario Outline: Delete all messages
|
||||
Given there are 10 messages in mailbox "<mailbox>" for "user"
|
||||
And there is IMAP client logged in as "user"
|
||||
@ -37,5 +32,4 @@ Feature: IMAP delete messages
|
||||
| INBOX |
|
||||
| Folders/mbox |
|
||||
| Labels/label |
|
||||
| Drafts |
|
||||
| Trash |
|
||||
|
||||
@ -38,7 +38,7 @@ func cleanup(client *pmapi.Client) error {
|
||||
}
|
||||
|
||||
func cleanSystemFolders(client *pmapi.Client) error {
|
||||
for _, labelID := range []string{pmapi.InboxLabel, pmapi.SentLabel, pmapi.ArchiveLabel} {
|
||||
for _, labelID := range []string{pmapi.InboxLabel, pmapi.SentLabel, pmapi.ArchiveLabel, pmapi.AllMailLabel, pmapi.DraftLabel} {
|
||||
for {
|
||||
messages, total, err := client.ListMessages(&pmapi.MessagesFilter{
|
||||
PageSize: 150,
|
||||
|
||||
Reference in New Issue
Block a user