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

@ -34,7 +34,8 @@ func IMAPActionsMessagesFeatureContext(s *godog.ScenarioContext) {
s.Step(`^IMAP client sends command "([^"]*)"$`, imapClientSendsCommand)
s.Step(`^IMAP client fetches "([^"]*)"$`, imapClientFetches)
s.Step(`^IMAP client fetches header(?:s)? of "([^"]*)"$`, imapClientFetchesHeader)
s.Step(`^IMAP client fetches body "([^"]*)"$`, imapClientFetchesBody)
s.Step(`^IMAP client fetches bod(?:y|ies) "([^"]*)"$`, imapClientFetchesBody)
s.Step(`^IMAP client fetches bod(?:y|ies) of UID "([^"]*)"$`, imapClientFetchesUIDBody)
s.Step(`^IMAP client fetches by UID "([^"]*)"$`, imapClientFetchesByUID)
s.Step(`^IMAP client searches for "([^"]*)"$`, imapClientSearchesFor)
s.Step(`^IMAP client copies message seq "([^"]*)" to "([^"]*)"$`, imapClientCopiesMessagesTo)
@ -98,6 +99,12 @@ func imapClientFetchesBody(fetchRange string) error {
return nil
}
func imapClientFetchesUIDBody(fetchRange string) error {
res := ctx.GetIMAPClient("imap").FetchUID(fetchRange, "BODY.PEEK[]")
ctx.SetIMAPLastResponse("imap", res)
return nil
}
func imapClientFetchesByUID(fetchRange string) error {
res := ctx.GetIMAPClient("imap").FetchUID(fetchRange, "UID")
ctx.SetIMAPLastResponse("imap", res)