GODT-1433 Adding first integration test for drafts.

This commit is contained in:
Jakub
2021-11-30 13:53:49 +01:00
parent 6ed97a0347
commit 55beb9227f
8 changed files with 89 additions and 15 deletions

View File

@ -108,6 +108,7 @@ func thereAreMessagesInMailboxesForAddressOfUser(mailboxNames, bddAddressID, bdd
if message.HasLabelID(pmapi.SentLabel) {
message.Flags |= pmapi.FlagSent
message.Type = pmapi.MessageTypeSent
} else {
// some tests (Outlook move by DELETE EXPUNGE APPEND) imply creating hard copies of emails,
// and the importMessage() function flags the email as Sent if the 'Received' key in not present in the
@ -115,6 +116,11 @@ func thereAreMessagesInMailboxesForAddressOfUser(mailboxNames, bddAddressID, bdd
header.Add("Received", "from dummy.protonmail.com")
}
if message.HasLabelID(pmapi.DraftLabel) {
message.Type = pmapi.MessageTypeDraft
message.Flags = pmapi.FlagInternal | pmapi.FlagE2E
}
bddMessageID := ""
hasDeletedFlag := false