mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-18 16:17:03 +00:00
GODT-1433 Adding first integration test for drafts.
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user