forked from Silverfish/proton-bridge
test: Add test scenarios to add an /Answered flag to a replied message and revert
This commit is contained in:
@ -30,3 +30,22 @@ Feature: IMAP marks messages as forwarded
|
|||||||
And it succeeds
|
And it succeeds
|
||||||
Then IMAP client "1" eventually sees that message at row 1 does not have the flag "forwarded"
|
Then IMAP client "1" eventually sees that message at row 1 does not have the flag "forwarded"
|
||||||
And it succeeds
|
And it succeeds
|
||||||
|
|
||||||
|
Scenario: Mark message as replied
|
||||||
|
When IMAP client "1" selects "Folders/mbox"
|
||||||
|
And IMAP client "1" marks message 1 as "replied"
|
||||||
|
And it succeeds
|
||||||
|
Then IMAP client "1" eventually sees that message at row 1 has the flag "\Answered"
|
||||||
|
And it succeeds
|
||||||
|
|
||||||
|
@regression
|
||||||
|
Scenario: Mark message as replied and then revert
|
||||||
|
When IMAP client "1" selects "Folders/mbox"
|
||||||
|
And IMAP client "1" marks message 1 as "replied"
|
||||||
|
And it succeeds
|
||||||
|
Then IMAP client "1" eventually sees that message at row 1 has the flag "\Answered"
|
||||||
|
And it succeeds
|
||||||
|
And IMAP client "1" marks message 1 as "unreplied"
|
||||||
|
And it succeeds
|
||||||
|
Then IMAP client "1" eventually sees that message at row 1 does not have the flag "\Answered"
|
||||||
|
And it succeeds
|
||||||
@ -938,6 +938,18 @@ func clientChangeMessageState(client *client.Client, seq int, messageState strin
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case messageState == "replied":
|
||||||
|
_, err := clientStore(client, seq, seq, isUID, imap.FormatFlagsOp(imap.AddFlags, true), imap.AnsweredFlag)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
case messageState == "unreplied":
|
||||||
|
_, err := clientStore(client, seq, seq, isUID, imap.FormatFlagsOp(imap.RemoveFlags, true), imap.AnsweredFlag)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user