mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 05:06:51 +00:00
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 "Folders/mbox"
|
||||||
And there is "user" with mailbox "Labels/label"
|
And there is "user" with mailbox "Labels/label"
|
||||||
|
|
||||||
# https://gitlab.protontech.ch/ProtonMail/Slim-API/issues/1420
|
|
||||||
@ignore-live
|
|
||||||
Scenario Outline: Delete message
|
Scenario Outline: Delete message
|
||||||
Given there are 10 messages in mailbox "<mailbox>" for "user"
|
Given there are 10 messages in mailbox "<mailbox>" for "user"
|
||||||
And there is IMAP client logged in as "user"
|
And there is IMAP client logged in as "user"
|
||||||
@ -19,11 +17,8 @@ Feature: IMAP delete messages
|
|||||||
| INBOX |
|
| INBOX |
|
||||||
| Folders/mbox |
|
| Folders/mbox |
|
||||||
| Labels/label |
|
| Labels/label |
|
||||||
| Drafts |
|
|
||||||
| Trash |
|
| Trash |
|
||||||
|
|
||||||
# https://gitlab.protontech.ch/ProtonMail/Slim-API/issues/1420
|
|
||||||
@ignore-live
|
|
||||||
Scenario Outline: Delete all messages
|
Scenario Outline: Delete all messages
|
||||||
Given there are 10 messages in mailbox "<mailbox>" for "user"
|
Given there are 10 messages in mailbox "<mailbox>" for "user"
|
||||||
And there is IMAP client logged in as "user"
|
And there is IMAP client logged in as "user"
|
||||||
@ -37,5 +32,4 @@ Feature: IMAP delete messages
|
|||||||
| INBOX |
|
| INBOX |
|
||||||
| Folders/mbox |
|
| Folders/mbox |
|
||||||
| Labels/label |
|
| Labels/label |
|
||||||
| Drafts |
|
|
||||||
| Trash |
|
| Trash |
|
||||||
|
|||||||
@ -38,7 +38,7 @@ func cleanup(client *pmapi.Client) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func cleanSystemFolders(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 {
|
for {
|
||||||
messages, total, err := client.ListMessages(&pmapi.MessagesFilter{
|
messages, total, err := client.ListMessages(&pmapi.MessagesFilter{
|
||||||
PageSize: 150,
|
PageSize: 150,
|
||||||
|
|||||||
Reference in New Issue
Block a user