You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ad...@apache.org on 2017/11/15 12:33:33 UTC
[2/4] james-project git commit: JAMES-2215 Mailbox argument should
not be ignored in message stepDefs
JAMES-2215 Mailbox argument should not be ignored in message stepDefs
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/cda4eece
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/cda4eece
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/cda4eece
Branch: refs/heads/master
Commit: cda4eece0780063a40f690e52e2e5533ec6a36b6
Parents: b73c53f
Author: benwa <bt...@linagora.com>
Authored: Tue Nov 14 09:33:38 2017 +0700
Committer: Antoine Duprat <ad...@linagora.com>
Committed: Wed Nov 15 09:57:30 2017 +0100
----------------------------------------------------------------------
.../integration/cucumber/GetMessagesMethodStepdefs.java | 7 +++----
.../src/test/resources/cucumber/GetMessages.feature | 12 ++++++------
2 files changed, 9 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/cda4eece/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/GetMessagesMethodStepdefs.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/GetMessagesMethodStepdefs.java b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/GetMessagesMethodStepdefs.java
index 4750950..f594b30 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/GetMessagesMethodStepdefs.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/GetMessagesMethodStepdefs.java
@@ -38,7 +38,6 @@ import javax.mail.Flags;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.text.StringEscapeUtils;
-import org.apache.james.jmap.DefaultMailboxes;
import org.apache.james.jmap.methods.integration.cucumber.util.TableRow;
import org.apache.james.jmap.model.MessagePreviewGenerator;
import org.apache.james.mailbox.model.MailboxConstants;
@@ -365,14 +364,14 @@ public class GetMessagesMethodStepdefs {
@Given("^the user has a message \"([^\"]*)\" in the \"([^\"]*)\" mailbox with flags \"([^\"]*)\"$")
public void appendMessageWithFlags(String messageName, String mailbox, List<String> flagList) throws Exception {
- appendMessage(messageName, StringListToFlags.fromFlagList(flagList));
+ appendMessage(messageName, mailbox, StringListToFlags.fromFlagList(flagList));
}
- private void appendMessage(String messageName, Flags flags) throws Exception {
+ private void appendMessage(String messageName, String mailbox, Flags flags) throws Exception {
ZonedDateTime dateTime = ZonedDateTime.parse("2014-10-30T14:12:00Z");
boolean isRecent = flags.contains(Flags.Flag.RECENT);
MessageId id = mainStepdefs.mailboxProbe.appendMessage(userStepdefs.getConnectedUser(),
- MailboxPath.forUser(userStepdefs.getConnectedUser(), DefaultMailboxes.INBOX),
+ MailboxPath.forUser(userStepdefs.getConnectedUser(), mailbox),
new ByteArrayInputStream("Subject: test\r\n\r\ntestmail".getBytes()),
Date.from(dateTime.toInstant()), isRecent, flags)
.getMessageId();
http://git-wip-us.apache.org/repos/asf/james-project/blob/cda4eece/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMessages.feature
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMessages.feature b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMessages.feature
index f0f8418..c003096 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMessages.feature
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMessages.feature
@@ -364,7 +364,7 @@ Feature: GetMessages method
|"text/html; charset=iso-8859-1" |quoted-printable |"Dans le cadre du stage effectu=E9 Mlle 2017, =E0 sign=E9e d=E8s que possible, =E0, tr=E8s, journ=E9e.." |effectué, à, signée dès, très, journée |
Scenario Outline: Retrieving message should display keywords as jmap flag
- Given "alice@domain.tld" has a message "m1" in the "inbox" mailbox with flags <flags>
+ Given "alice@domain.tld" has a message "m1" in the "INBOX" mailbox with flags <flags>
When "alice@domain.tld" ask for messages "m1"
Then no error is returned
And the list should contain 1 message
@@ -375,7 +375,7 @@ Feature: GetMessages method
|"$Flagged,$Answered,$Draft" |$Flagged,$Answered,$Draft |
Scenario Outline: GetMessages should filter invalid keywords
- Given "alice@domain.tld" has a message "m1" in the "inbox" mailbox with flags <flags>
+ Given "alice@domain.tld" has a message "m1" in the "INBOX" mailbox with flags <flags>
When "alice@domain.tld" ask for messages "m1"
Then no error is returned
And the list should contain 1 message
@@ -386,7 +386,7 @@ Feature: GetMessages method
|"$Draft,@ert,t^a,op§,$user_flag" |$Draft,$user_flag |
Scenario Outline: Retrieving message should display keywords without unsupported jmap flag
- Given "alice@domain.tld" has a message "m1" in the "inbox" mailbox with flags <flags>
+ Given "alice@domain.tld" has a message "m1" in the "INBOX" mailbox with flags <flags>
When "alice@domain.tld" ask for messages "m1"
Then no error is returned
And the list should contain 1 message
@@ -397,7 +397,7 @@ Feature: GetMessages method
|"$Flagged,$Answered,$Deleted,$Recent" |$Flagged,$Answered |
Scenario Outline: Retrieving message should display keywords with custom user jmap flag
- Given "alice@domain.tld" has a message "m1" in the "inbox" mailbox with flags <flags>
+ Given "alice@domain.tld" has a message "m1" in the "INBOX" mailbox with flags <flags>
When "alice@domain.tld" ask for messages "m1"
Then no error is returned
And the list should contain 1 message
@@ -408,14 +408,14 @@ Feature: GetMessages method
|"$Flagged,$Forwarded" |$Forwarded,$Flagged |
Scenario: Retrieving message should include true isForwarded property when set
- Given "alice@domain.tld" has a message "m1" in the "inbox" mailbox with flags "$Forwarded"
+ Given "alice@domain.tld" has a message "m1" in the "INBOX" mailbox with flags "$Forwarded"
When "alice@domain.tld" ask for messages "m1"
Then no error is returned
And the list should contain 1 message
And the isForwarded property of the message is "true"
Scenario: Retrieving message should include false isForwarded property when not set
- Given "alice@domain.tld" has a message "m1" in the "inbox" mailbox with flags "$Answered"
+ Given "alice@domain.tld" has a message "m1" in the "INBOX" mailbox with flags "$Answered"
When "alice@domain.tld" ask for messages "m1"
Then no error is returned
And the list should contain 1 message
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org