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/12/12 14:13:23 UTC
[02/11] james-project git commit: JAMES-2249 reorganize delegation
cucumber test
JAMES-2249 reorganize delegation cucumber test
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/f48f0c22
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/f48f0c22
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/f48f0c22
Branch: refs/heads/master
Commit: f48f0c22a0a38271aa41aabd5cd1e79b7034c1a2
Parents: 3cd6e50
Author: Luc DUZAN <ld...@linagora.com>
Authored: Fri Dec 8 19:01:02 2017 +0100
Committer: Antoine Duprat <ad...@linagora.com>
Committed: Tue Dec 12 15:12:35 2017 +0100
----------------------------------------------------------------------
.../CassandraGetMailboxesMethodTest.java | 45 ---
...wordsConsistencyOnDelegationMailboxTest.java | 44 ---
...arentMailboxWithAndWhithoutChildrenTest.java | 44 ---
.../cucumber/CassandraSharingTest.java | 61 ++++
.../resources/cucumber/DownloadEndpoint.feature | 8 +-
.../test/resources/cucumber/DownloadGet.feature | 27 --
.../resources/cucumber/DownloadPost.feature | 2 +-
.../resources/cucumber/GetMailboxes.feature | 366 -------------------
.../test/resources/cucumber/GetMessages.feature | 26 --
...ywordsConsistencyOnDelegationMailbox.feature | 141 -------
.../resources/cucumber/SetMailboxes.feature | 30 --
.../test/resources/cucumber/SetMessages.feature | 108 +-----
...gParentMailboxWithAndWithoutChildren.feature | 105 ------
.../cucumber/sharing/CopyAndSharing.feature | 55 +++
.../cucumber/sharing/DownloadAndSharing.feature | 42 +++
.../sharing/GetMessageAndSharing.feature | 48 +++
.../sharing/GetMessageListAndSharing.feature | 59 +++
...ywordsConsistencyOnDelegationMailbox.feature | 140 +++++++
.../sharing/MailboxCreationAndSharing.feature | 36 ++
.../sharing/MailboxDeletionAndSharing.feature | 36 ++
.../sharing/MoveMailboxAndSharing.feature | 76 ++++
.../sharing/MoveMessageAndSharing.feature | 146 ++++++++
.../sharing/RenamingMailboxAndSharing.feature | 48 +++
.../cucumber/sharing/SetFlagAndSharing.feature | 61 ++++
.../sharing/SetMessagesOnSharedMailbox.feature | 107 ++++++
.../SharingChildrenWithoutSharingParent.feature | 42 +++
.../SharingMailboxWithOtherDomain.feature | 31 ++
...gParentMailboxWithAndWithoutChildren.feature | 104 ++++++
.../cucumber/MemoryGetMailboxesMethodTest.java | 32 --
...wordsConsistencyOnDelegationMailboxTest.java | 32 --
...ParentMailboxWithAndWithoutChildrenTest.java | 32 --
.../jmap/memory/cucumber/MemorySharingTest.java | 47 +++
32 files changed, 1154 insertions(+), 1027 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/f48f0c22/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraGetMailboxesMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraGetMailboxesMethodTest.java b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraGetMailboxesMethodTest.java
deleted file mode 100644
index edf671b..0000000
--- a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraGetMailboxesMethodTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one *
- * or more contributor license agreements. See the NOTICE file *
- * distributed with this work for additional information *
- * regarding copyright ownership. The ASF licenses this file *
- * to you under the Apache License, Version 2.0 (the *
- * "License"); you may not use this file except in compliance *
- * with the License. You may obtain a copy of the License at *
- * *
- * http://www.apache.org/licenses/LICENSE-2.0 *
- * *
- * Unless required by applicable law or agreed to in writing, *
- * software distributed under the License is distributed on an *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
- * KIND, either express or implied. See the License for the *
- * specific language governing permissions and limitations *
- * under the License. *
- ****************************************************************/
-
-package org.apache.james.jmap.cassandra.cucumber;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.runner.RunWith;
-
-import cucumber.api.CucumberOptions;
-import cucumber.api.junit.Cucumber;
-
-@RunWith(Cucumber.class)
-@CucumberOptions(features="classpath:cucumber/GetMailboxes.feature",
- glue={"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.cassandra.cucumber"},
- strict = true)
-public class CassandraGetMailboxesMethodTest {
-
- @BeforeClass
- public static void init() {
- CucumberCassandraSingleton.cassandraServer.start();
- }
-
- @AfterClass
- public static void after() {
- CucumberCassandraSingleton.cassandraServer.stop();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/f48f0c22/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraKeywordsConsistencyOnDelegationMailboxTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraKeywordsConsistencyOnDelegationMailboxTest.java b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraKeywordsConsistencyOnDelegationMailboxTest.java
deleted file mode 100644
index 2e8688f..0000000
--- a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraKeywordsConsistencyOnDelegationMailboxTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one *
- * or more contributor license agreements. See the NOTICE file *
- * distributed with this work for additional information *
- * regarding copyright ownership. The ASF licenses this file *
- * to you under the Apache License, Version 2.0 (the *
- * "License"); you may not use this file except in compliance *
- * with the License. You may obtain a copy of the License at *
- * *
- * http://www.apache.org/licenses/LICENSE-2.0 *
- * *
- * Unless required by applicable law or agreed to in writing, *
- * software distributed under the License is distributed on an *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
- * KIND, either express or implied. See the License for the *
- * specific language governing permissions and limitations *
- * under the License. *
- ****************************************************************/
-
-package org.apache.james.jmap.cassandra.cucumber;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.runner.RunWith;
-
-import cucumber.api.CucumberOptions;
-import cucumber.api.junit.Cucumber;
-
-@RunWith(Cucumber.class)
-@CucumberOptions(features="classpath:cucumber/KeywordsConsistencyOnDelegationMailbox.feature",
- glue={"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.cassandra.cucumber"},
- strict = true)
-public class CassandraKeywordsConsistencyOnDelegationMailboxTest {
-
- @BeforeClass
- public static void init() {
- CucumberCassandraSingleton.cassandraServer.start();
- }
-
- @AfterClass
- public static void after() {
- CucumberCassandraSingleton.cassandraServer.stop();
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/f48f0c22/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraSharingParentMailboxWithAndWhithoutChildrenTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraSharingParentMailboxWithAndWhithoutChildrenTest.java b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraSharingParentMailboxWithAndWhithoutChildrenTest.java
deleted file mode 100644
index 67ba269..0000000
--- a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraSharingParentMailboxWithAndWhithoutChildrenTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one *
- * or more contributor license agreements. See the NOTICE file *
- * distributed with this work for additional information *
- * regarding copyright ownership. The ASF licenses this file *
- * to you under the Apache License, Version 2.0 (the *
- * "License"); you may not use this file except in compliance *
- * with the License. You may obtain a copy of the License at *
- * *
- * http://www.apache.org/licenses/LICENSE-2.0 *
- * *
- * Unless required by applicable law or agreed to in writing, *
- * software distributed under the License is distributed on an *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
- * KIND, either express or implied. See the License for the *
- * specific language governing permissions and limitations *
- * under the License. *
- ****************************************************************/
-
-package org.apache.james.jmap.cassandra.cucumber;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.runner.RunWith;
-
-import cucumber.api.CucumberOptions;
-import cucumber.api.junit.Cucumber;
-
-@RunWith(Cucumber.class)
-@CucumberOptions(features="classpath:cucumber/SharingParentMailboxWithAndWithoutChildren.feature",
- glue={"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.cassandra.cucumber"},
- strict = true)
-public class CassandraSharingParentMailboxWithAndWhithoutChildrenTest {
-
- @BeforeClass
- public static void init() {
- CucumberCassandraSingleton.cassandraServer.start();
- }
-
- @AfterClass
- public static void after() {
- CucumberCassandraSingleton.cassandraServer.stop();
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/f48f0c22/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraSharingTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraSharingTest.java b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraSharingTest.java
new file mode 100644
index 0000000..4cace81
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraSharingTest.java
@@ -0,0 +1,61 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
+package org.apache.james.jmap.cassandra.cucumber;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+
+import cucumber.api.CucumberOptions;
+import cucumber.api.junit.Cucumber;
+
+@RunWith(Cucumber.class)
+@CucumberOptions(features= {
+ "classpath:cucumber/sharing/SharingParentMailboxWithAndWithoutChildren.feature",
+ "classpath:cucumber/sharing/SharingChildrenWithoutSharingParent.feature",
+ "classpath:cucumber/sharing/GetMessageAndSharing.feature",
+ "classpath:cucumber/sharing/SharingMailboxWithOtherDomain.feature",
+ "classpath:cucumber/sharing/MailboxCreationAndSharing.feature",
+ "classpath:cucumber/sharing/MailboxDeletionAndSharing.feature",
+ "classpath:cucumber/sharing/SetMessagesOnSharedMailbox.feature",
+ "classpath:cucumber/sharing/DownloadAndSharing.feature",
+ "classpath:cucumber/sharing/KeywordsConsistencyOnDelegationMailbox.feature",
+ "classpath:cucumber/sharing/GetMessageListAndSharing.feature",
+ "classpath:cucumber/sharing/MoveMessageAndSharing.feature",
+ "classpath:cucumber/sharing/MoveMailboxAndSharing.feature",
+ "classpath:cucumber/sharing/SetFlagAndSharing.feature",
+ "classpath:cucumber/sharing/RenamingMailboxAndSharing.feature",
+ "classpath:cucumber/sharing/CopyAndSharing.feature" },
+ glue= { "org.apache.james.jmap.methods.integration", "org.apache.james.jmap.cassandra.cucumber" },
+ tags = {"~@Ignore"},
+ strict = true)
+public class CassandraSharingTest {
+
+ @BeforeClass
+ public static void init() {
+ CucumberCassandraSingleton.cassandraServer.start();
+ }
+
+ @AfterClass
+ public static void after() {
+ CucumberCassandraSingleton.cassandraServer.stop();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/f48f0c22/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/DownloadEndpoint.feature
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/DownloadEndpoint.feature b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/DownloadEndpoint.feature
index ea41c5d..3bb275a 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/DownloadEndpoint.feature
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/DownloadEndpoint.feature
@@ -23,7 +23,7 @@ Feature: Download endpoint
Background:
Given a domain named "domain.tld"
- And some users "usera@domain.tld", "userb@domain.tld", "userc@domain.tld"
+ And some users "usera@domain.tld", "userb@domain.tld"
And "usera@domain.tld" has a mailbox "INBOX"
And "usera@domain.tld" mailbox "INBOX" contains a message "m1" with an attachment "a1"
@@ -85,12 +85,6 @@ Feature: Download endpoint
When "userb@domain.tld" downloads "a1"
Then the user should receive a not found response
- Scenario: An authenticated user should have access to a shared attachment
- Given "usera@domain.tld" shares his mailbox "INBOX" with "userb@domain.tld" with "lr" rights
- And "userb@domain.tld" is connected
- When "userb@domain.tld" downloads "a1"
- Then the user should be authorized
-
Scenario: A user should have access to an inlined attachment
Given "usera@domain.tld" is connected
And "usera@domain.tld" mailbox "INBOX" contains a message "m2" with an inlined attachment "ia1"
http://git-wip-us.apache.org/repos/asf/james-project/blob/f48f0c22/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/DownloadGet.feature
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/DownloadGet.feature b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/DownloadGet.feature
index f739d65..6b8155f 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/DownloadGet.feature
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/DownloadGet.feature
@@ -24,9 +24,7 @@ Feature: Download GET
Given a domain named "domain.tld"
And a user "alice@domain.tld"
And a user "bob@domain.tld"
- And a user "cedric@domain.tld"
And "alice@domain.tld" has a mailbox "INBOX"
- And "alice@domain.tld" has a mailbox "sharedMailbox"
Scenario: Getting an attachment previously stored
Given "alice@domain.tld" mailbox "INBOX" contains a message "1" with an attachment "2"
@@ -80,28 +78,3 @@ Feature: Download GET
When "bob@domain.tld" downloads "1"
Then "bob@domain.tld" should receive a not found response
- Scenario: User can download attachment of another user when shared mailbox
- Given "alice@domain.tld" mailbox "sharedMailbox" contains a message "1" with an attachment "2"
- And "alice@domain.tld" shares her mailbox "sharedMailbox" with "bob@domain.tld" with "lr" rights
- When "bob@domain.tld" downloads "2"
- Then he can read that blob
- And the blob size is 3071
-
- Scenario: User can download message blob of another user when shared mailbox
- Given "alice@domain.tld" mailbox "sharedMailbox" contains a message "1" with an attachment "2"
- And "alice@domain.tld" shares her mailbox "sharedMailbox" with "bob@domain.tld" with "lr" rights
- When "bob@domain.tld" downloads "1"
- Then he can read that blob
- And the blob size is 4963
-
- Scenario: Attachment read delegation should be user specific
- Given "alice@domain.tld" mailbox "sharedMailbox" contains a message "1" with an attachment "2"
- And "alice@domain.tld" shares her mailbox "sharedMailbox" with "bob@domain.tld" with "lr" rights
- When "cedric@domain.tld" downloads "1"
- Then "cedric@domain.tld" should receive a not found response
-
- Scenario: Message download read delegation should be user specific
- Given "alice@domain.tld" mailbox "sharedMailbox" contains a message "1" with an attachment "2"
- And "alice@domain.tld" shares her mailbox "sharedMailbox" with "bob@domain.tld" with "lr" rights
- When "cedric@domain.tld" downloads "2"
- Then "cedric@domain.tld" should receive a not found response
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/james-project/blob/f48f0c22/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/DownloadPost.feature
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/DownloadPost.feature b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/DownloadPost.feature
index 571af47..6621c11 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/DownloadPost.feature
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/DownloadPost.feature
@@ -19,7 +19,7 @@
Feature: Alternative authentication mechanism for getting attachment via a POST request returning a specific authentication token
As a James user
- I want to retrieve my attachments without an alternative authentication mechanim
+ I want to retrieve my attachments without an alternative authentication mechanism
Background:
Given a domain named "domain.tld"
http://git-wip-us.apache.org/repos/asf/james-project/blob/f48f0c22/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMailboxes.feature
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMailboxes.feature b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMailboxes.feature
deleted file mode 100644
index 36ff9b4..0000000
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMailboxes.feature
+++ /dev/null
@@ -1,366 +0,0 @@
-#***************************************************************
-# Licensed to the Apache Software Foundation (ASF) under one *
-# or more contributor license agreements. See the NOTICE file *
-# distributed with this work for additional information *
-# regarding copyright ownership. The ASF licenses this file *
-# to you under the Apache License, Version 2.0 (the *
-# "License"); you may not use this file except in compliance *
-# with the License. You may obtain a copy of the License at *
-# *
-# http://www.apache.org/licenses/LICENSE-2.0 *
-# *
-# Unless required by applicable law or agreed to in writing, *
-# software distributed under the License is distributed on an *
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
-# KIND, either express or implied. See the License for the *
-# specific language governing permissions and limitations *
-# under the License. *
-# **************************************************************/
-Feature: GetMailboxes method
- As a James user
- I want to be able to retrieve my mailboxes
-
- Background:
- Given a domain named "domain.tld"
- And a user "alice@domain.tld"
- And a user "bob@domain.tld"
- And "alice@domain.tld" has a mailbox "INBOX"
- And "bob@domain.tld" has a mailbox "bobMailbox"
- And "alice@domain.tld" has a mailbox "shared"
- And "alice@domain.tld" shares her mailbox "shared" with "bob@domain.tld" with "aeilrwt" rights
-
- Scenario: Sharer can read the total and unread counts on a shared folder
- Given "alice@domain.tld" has a message "m1" in "shared" mailbox
- And "alice@domain.tld" has a message "m2" in "shared" mailbox with subject "my test subject 2", content "testmail 2"
- When "alice@domain.tld" lists mailboxes
- Then the mailbox "shared" has 2 messages
- And the mailbox "shared" has 2 unseen messages
-
- Scenario: Sharee can read the total and unread counts on a shared folder
- Given "alice@domain.tld" has a message "m1" in "shared" mailbox
- And "alice@domain.tld" has a message "m2" in "shared" mailbox with subject "my test subject 2", content "testmail 2"
- When "bob@domain.tld" lists mailboxes
- Then the mailbox "shared" has 2 messages
- And the mailbox "shared" has 2 unseen messages
-
- Scenario: Copy message should update the total and the unread counts when asked by sharer
- Given "alice@domain.tld" has a message "m1" in "INBOX" mailbox
- And "alice@domain.tld" copies "m1" from mailbox "INBOX" to mailbox "shared"
- When "alice@domain.tld" lists mailboxes
- Then the mailbox "shared" has 1 message
- And the mailbox "shared" has 1 unseen message
-
- Scenario: Copy message should update the total and the unread counts when asked by sharer / sharee view
- Given "alice@domain.tld" has a message "m1" in "INBOX" mailbox
- And "alice@domain.tld" copies "m1" from mailbox "INBOX" to mailbox "shared"
- When "bob@domain.tld" lists mailboxes
- Then the mailbox "shared" has 1 message
- And the mailbox "shared" has 1 unseen message
-
- Scenario: Copy message should update the total and the unread counts when asked by sharee
- Given "bob@domain.tld" has a message "m1" in "bobMailbox" mailbox
- And "bob@domain.tld" copies "m1" from mailbox "bobMailbox" of user "bob@domain.tld" to mailbox "shared" of user "alice@domain.tld"
- When "alice@domain.tld" lists mailboxes
- Then the mailbox "shared" has 1 message
- And the mailbox "shared" has 1 unseen message
-
- Scenario: Copy message should update the total and the unread counts when asked by sharee / sharee view
- Given "bob@domain.tld" has a message "m1" in "bobMailbox" mailbox
- And "bob@domain.tld" copies "m1" from mailbox "bobMailbox" of user "bob@domain.tld" to mailbox "shared" of user "alice@domain.tld"
- When "bob@domain.tld" lists mailboxes
- Then the mailbox "shared" has 1 message
- And the mailbox "shared" has 1 unseen message
-
- Scenario: Move message should update the total and the unread counts when asked by sharer
- Given "alice@domain.tld" has a message "m1" in "INBOX" mailbox
- And "alice@domain.tld" moves "m1" to mailbox "shared" of user "alice@domain.tld"
- When "alice@domain.tld" lists mailboxes
- Then the mailbox "shared" has 1 message
- And the mailbox "shared" has 1 unseen message
-
- Scenario: Move message should update the total and the unread counts of origin mailbox when asked by sharer
- Given "alice@domain.tld" has a message "m1" in "INBOX" mailbox
- And "alice@domain.tld" moves "m1" to mailbox "shared" of user "alice@domain.tld"
- When "alice@domain.tld" lists mailboxes
- Then the mailbox "INBOX" has 0 messages
- And the mailbox "INBOX" has 0 unseen messages
-
- Scenario: Move message should update the total and the unread counts when asked by sharer / sharee view
- Given "alice@domain.tld" has a message "m1" in "INBOX" mailbox
- And "alice@domain.tld" moves "m1" to mailbox "shared" of user "alice@domain.tld"
- When "bob@domain.tld" lists mailboxes
- Then the mailbox "shared" has 1 message
- And the mailbox "shared" has 1 unseen message
-
- Scenario: Move message should update the total and the unread counts of origin mailbox when asked by sharer / sharee view
- Given "alice@domain.tld" has a mailbox "sharedBis"
- And "alice@domain.tld" has a message "m1" in "sharedBis" mailbox
- And "alice@domain.tld" shares her mailbox "sharedBis" with "bob@domain.tld" with "aeilrwt" rights
- And "alice@domain.tld" moves "m1" to mailbox "shared" of user "alice@domain.tld"
- When "bob@domain.tld" lists mailboxes
- Then the mailbox "sharedBis" has 0 messages
- And the mailbox "sharedBis" has 0 unseen messages
-
- Scenario: Move message should update the total and the unread counts when asked by sharee
- Given "bob@domain.tld" has a message "m1" in "bobMailbox" mailbox
- And "bob@domain.tld" moves "m1" to mailbox "shared" of user "alice@domain.tld"
- When "alice@domain.tld" lists mailboxes
- Then the mailbox "shared" has 1 message
- And the mailbox "shared" has 1 unseen message
-
- Scenario: Move message should update the total and the unread counts of origin mailbox when asked by sharee
- Given "bob@domain.tld" has a mailbox "sharedBis"
- And "bob@domain.tld" has a message "m1" in "sharedBis" mailbox
- And "bob@domain.tld" shares her mailbox "sharedBis" with "alice@domain.tld" with "aeilrwt" rights
- And "bob@domain.tld" moves "m1" to mailbox "shared" of user "alice@domain.tld"
- When "alice@domain.tld" lists mailboxes
- Then the mailbox "sharedBis" has 0 messages
- And the mailbox "sharedBis" has 0 unseen messages
-
- Scenario: Move message should update the total and the unread counts when asked by sharee / sharee view
- Given "bob@domain.tld" has a message "m1" in "bobMailbox" mailbox
- And "bob@domain.tld" moves "m1" to mailbox "shared" of user "alice@domain.tld"
- When "bob@domain.tld" lists mailboxes
- Then the mailbox "shared" has 1 message
- And the mailbox "shared" has 1 unseen message
-
- Scenario: Move message should update the total and the unread counts of origin mailbox when asked by sharee / sharee view
- Given "bob@domain.tld" has a message "m1" in "bobMailbox" mailbox
- And "bob@domain.tld" moves "m1" to mailbox "shared" of user "alice@domain.tld"
- When "bob@domain.tld" lists mailboxes
- Then the mailbox "bobMailbox" has 0 messages
- And the mailbox "bobMailbox" has 0 unseen messages
-
- Scenario: Moving a message to a delegated mailbox without rights should not change the total and the unread counts
- Given "alice@domain.tld" has a mailbox "shared2"
- And "alice@domain.tld" shares her mailbox "shared2" with "bob@domain.tld" with "lr" rights
- And "bob@domain.tld" has a message "m1" in "bobMailbox" mailbox
- And "bob@domain.tld" moves "m1" to mailbox "shared2" of user "alice@domain.tld"
- When "alice@domain.tld" lists mailboxes
- Then the mailbox "shared" has 0 messages
- And the mailbox "shared" has 0 unseen messages
-
- Scenario: Moving a message to a delegated mailbox without rights should not change the total and the unread counts / sharee view
- Given "alice@domain.tld" has a mailbox "shared2"
- And "alice@domain.tld" shares her mailbox "shared2" with "bob@domain.tld" with "lr" rights
- And "bob@domain.tld" has a message "m1" in "bobMailbox" mailbox
- And "bob@domain.tld" moves "m1" to mailbox "shared2" of user "alice@domain.tld"
- When "bob@domain.tld" lists mailboxes
- Then the mailbox "shared" has 0 messages
- And the mailbox "shared" has 0 unseen messages
-
- Scenario: Move message should update the total and the unread counts when asked by sharee and seen message
- Given "bob@domain.tld" has a message "m1" in the "bobMailbox" mailbox with flags "$Seen"
- And "bob@domain.tld" moves "m1" to mailbox "shared" of user "alice@domain.tld"
- When "alice@domain.tld" lists mailboxes
- Then the mailbox "shared" has 1 message
- And the mailbox "shared" has 0 unseen message
-
- Scenario: Move message should update the total and the unread counts when asked by sharee / sharee view and seen message
- Given "bob@domain.tld" has a message "m1" in the "bobMailbox" mailbox with flags "$Seen"
- And "bob@domain.tld" moves "m1" to mailbox "shared" of user "alice@domain.tld"
- When "bob@domain.tld" lists mailboxes
- Then the mailbox "shared" has 1 message
- And the mailbox "shared" has 0 unseen message
-
- Scenario: Move message should update the total and the unread counts of origin mailbox when asked by sharer and seen message
- Given "alice@domain.tld" has a message "m1" in the "INBOX" mailbox with flags "$Seen"
- And "alice@domain.tld" moves "m1" to mailbox "shared" of user "alice@domain.tld"
- When "alice@domain.tld" lists mailboxes
- Then the mailbox "INBOX" has 0 messages
- And the mailbox "INBOX" has 0 unseen messages
-
- Scenario: Moving a message to a delegated mailbox without rights should not change the total and the unread counts
- Given "alice@domain.tld" has a mailbox "shared2"
- And "alice@domain.tld" shares her mailbox "shared2" with "bob@domain.tld" with "lri" rights
- And "bob@domain.tld" has a message "m1" in the "bobMailbox" mailbox with flags "$Seen"
- And "bob@domain.tld" moves "m1" to mailbox "shared2" of user "alice@domain.tld"
- When "alice@domain.tld" lists mailboxes
- Then the mailbox "shared" has 0 messages
- And the mailbox "shared" has 0 unseen messages
-
- Scenario: Moving a message to a delegated mailbox without rights should not change the total and the unread counts / sharee view
- Given "alice@domain.tld" has a mailbox "shared2"
- And "alice@domain.tld" shares her mailbox "shared2" with "bob@domain.tld" with "lri" rights
- And "bob@domain.tld" has a message "m1" in the "bobMailbox" mailbox with flags "$Seen"
- And "bob@domain.tld" moves "m1" to mailbox "shared2" of user "alice@domain.tld"
- When "bob@domain.tld" lists mailboxes
- Then the mailbox "shared" has 0 messages
- And the mailbox "shared" has 0 unseen messages
-
- Scenario: Set flags by sharer should update unseen count when read by sharer
- Given "alice@domain.tld" has a message "m1" in "shared" mailbox
- When "alice@domain.tld" sets flags "$Seen" on message "m1"
- When "alice@domain.tld" lists mailboxes
- Then the mailbox "shared" has 1 message
- And the mailbox "shared" has 0 unseen messages
-
- Scenario: Set flags by sharer should update unseen count when read by sharee
- Given "alice@domain.tld" has a message "m1" in "shared" mailbox
- When "alice@domain.tld" sets flags "$Seen" on message "m1"
- When "bob@domain.tld" lists mailboxes
- Then the mailbox "shared" has 1 message
- And the mailbox "shared" has 0 unseen messages
-
- Scenario: Set flags by sharee should update unseen count when read by sharer
- Given "alice@domain.tld" has a message "m1" in "shared" mailbox
- When "bob@domain.tld" sets flags "$Seen" on message "m1"
- When "alice@domain.tld" lists mailboxes
- Then the mailbox "shared" has 1 message
- And the mailbox "shared" has 0 unseen messages
-
- Scenario: Set flags by sharee should update unseen count when read by sharee
- Given "alice@domain.tld" has a message "m1" in "shared" mailbox
- When "bob@domain.tld" sets flags "$Seen" on message "m1"
- When "bob@domain.tld" lists mailboxes
- Then the mailbox "shared" has 1 message
- And the mailbox "shared" has 0 unseen messages
-
- Scenario: Set flags by sharee should not update unseen count when no rights and read by sharer
- Given "alice@domain.tld" has a mailbox "shared2"
- And "alice@domain.tld" shares her mailbox "shared2" with "bob@domain.tld" with "lri" rights
- And "alice@domain.tld" has a message "m1" in "shared2" mailbox
- When "bob@domain.tld" sets flags "$Seen" on message "m1"
- When "alice@domain.tld" lists mailboxes
- Then the mailbox "shared2" has 1 message
- And the mailbox "shared2" has 1 unseen message
-
- Scenario: As sharee read a message it should not update unseen count when no rights and read by sharee
- Given "alice@domain.tld" has a mailbox "shared2"
- And "alice@domain.tld" shares her mailbox "shared2" with "bob@domain.tld" with "lri" rights
- And "alice@domain.tld" has a message "m1" in "shared2" mailbox
- When "bob@domain.tld" sets flags "$Seen" on message "m1"
- When "bob@domain.tld" lists mailboxes
- Then the mailbox "shared2" has 1 message
- And the mailbox "shared2" has 1 unseen message
-
- Scenario: Lookup right should not be enough to read message and unseen counts
- Given "alice@domain.tld" has a mailbox "shared2"
- And "alice@domain.tld" shares her mailbox "shared2" with "bob@domain.tld" with "l" rights
- And "alice@domain.tld" has a message "m1" in "shared2" mailbox
- When "bob@domain.tld" lists mailboxes
- Then the mailbox "shared2" has 0 messages
- And the mailbox "shared2" has 0 unseen messages
-
- Scenario: User can share sub-mailbox without sharing its parent
- Given "alice@domain.tld" has a mailbox "mailbox1"
- And "alice@domain.tld" has a mailbox "mailbox1.shared"
- And "alice@domain.tld" shares her mailbox "mailbox1.shared" with "bob@domain.tld" with "aeirwt" rights
- When "bob@domain.tld" lists mailboxes
- Then the mailboxes should contain "shared" in "Delegated" namespace
- And the mailboxes should not contain "mailbox1"
-
- Scenario: User can share sub-mailbox without sharing its parent and then sharee can see the parent mailbox
- Given "alice@domain.tld" has a mailbox "mailbox1"
- And "alice@domain.tld" has a mailbox "mailbox1.shared"
- And "alice@domain.tld" shares her mailbox "mailbox1.shared" with "bob@domain.tld" with "l" rights
- When "bob@domain.tld" lists mailboxes
- Then the mailboxes should contain "shared" in "Delegated" namespace
- And the mailboxes should contain "mailbox1" in "Delegated" namespace
-
- Scenario: A sharee should be able to access a shared mailbox after it has been renamed by the owner
- Given "alice@domain.tld" renames her mailbox "shared" to "mySharedMailbox"
- When "bob@domain.tld" lists mailboxes
- Then the mailboxes should contain "mySharedMailbox" in "Delegated" namespace
-
- Scenario: A sharee should not be able to rename a shared mailbox
- Given "bob@domain.tld" renames the mailbox, owned by "alice@domain.tld", "shared" to "mySharedMailbox"
- When "alice@domain.tld" lists mailboxes
- Then the mailboxes should contain "shared" in "Personal" namespace
-
- Scenario: A user should not be able to rename an other user mailbox
- Given "alice@domain.tld" has a mailbox "mySecrets"
- And "bob@domain.tld" renames the mailbox, owned by "alice@domain.tld", "mySecrets" to "revealMySecrets"
- When "alice@domain.tld" lists mailboxes
- Then the mailboxes should contain "mySecrets" in "Personal" namespace
-
- Scenario: A sharee should receive a not updated response when trying to rename a shared mailbox
- Given "bob@domain.tld" renames the mailbox, owned by "alice@domain.tld", "shared" to "mySharedMailbox"
- Then mailbox "shared" owned by "alice@domain.tld" is not updated
-
- Scenario: A sharee should receive a not destroyed response when trying to destroy a shared mailbox
- Given "bob@domain.tld" deletes the mailbox "shared" owned by "alice@domain.tld"
- Then mailbox "shared" owned by "alice@domain.tld" is not destroyed
-
- Scenario: A sharee should not be able to delete a shared mailbox
- Given "bob@domain.tld" deletes the mailbox "shared" owned by "alice@domain.tld"
- When "alice@domain.tld" lists mailboxes
- Then the mailboxes should contain "shared" in "Personal" namespace
-
- Scenario: A sharee should not be able to create a shared mailbox child
- Given "bob@domain.tld" creates mailbox "sharedChild" with creationId "c-01" in mailbox "shared" owned by "alice@domain.tld"
- When "alice@domain.tld" lists mailboxes
- Then the mailboxes should contain "shared" in "Personal" namespace
-
- Scenario: A sharee should receive a not created response when trying to create a shared mailbox child
- When "bob@domain.tld" creates mailbox "sharedChild" with creationId "c-01" in mailbox "shared" owned by "alice@domain.tld"
- Then mailbox with creationId "c-01" is not created
-
- Scenario: A sharee moving a delegated mailbox as top level should be rejected
- Given "alice@domain.tld" has a mailbox "shared.sharedChild"
- And "alice@domain.tld" shares her mailbox "shared.sharedChild" with "bob@domain.tld" with "aeilrwt" rights
- When "bob@domain.tld" moves the mailbox "shared.sharedChild" owned by "alice@domain.tld" as top level mailbox
- Then mailbox "shared.sharedChild" owned by "alice@domain.tld" is not updated
-
- Scenario: A sharee moving a delegated mailbox as top level should not move mailbox
- Given "alice@domain.tld" has a mailbox "shared.sharedChild"
- And "alice@domain.tld" shares her mailbox "shared.sharedChild" with "bob@domain.tld" with "aeilrwt" rights
- When "bob@domain.tld" moves the mailbox "shared.sharedChild" owned by "alice@domain.tld" as top level mailbox
- Then "alice@domain.tld" lists mailboxes
- And the mailboxes should contain "sharedChild" in "Personal" namespace, with parent mailbox "shared" of user "alice@domain.tld"
-
- Scenario: A sharee moving a delegated mailbox into sharer mailboxes should be rejected
- Given "alice@domain.tld" has a mailbox "shared.sharedChild"
- And "alice@domain.tld" has a mailbox "otherShared"
- And "alice@domain.tld" shares her mailbox "shared.sharedChild" with "bob@domain.tld" with "aeilrwt" rights
- And "alice@domain.tld" shares her mailbox "otherShared" with "bob@domain.tld" with "aeilrwt" rights
- When "bob@domain.tld" moves the mailbox "shared.sharedChild" owned by "alice@domain.tld", into mailbox "otherShared" owned by "alice@domain.tld"
- Then mailbox "shared.sharedChild" owned by "alice@domain.tld" is not updated
-
- Scenario: A sharee moving a delegated mailbox into another delegated mailbox should not move mailbox
- Given "alice@domain.tld" has a mailbox "shared.sharedChild"
- And "alice@domain.tld" has a mailbox "otherShared"
- And "alice@domain.tld" shares her mailbox "shared.sharedChild" with "bob@domain.tld" with "aeilrwt" rights
- And "alice@domain.tld" shares her mailbox "otherShared" with "bob@domain.tld" with "aeilrwt" rights
- When "bob@domain.tld" moves the mailbox "shared.sharedChild" owned by "alice@domain.tld", into mailbox "otherShared" owned by "alice@domain.tld"
- Then "alice@domain.tld" lists mailboxes
- And the mailboxes should contain "sharedChild" in "Personal" namespace, with parent mailbox "shared" of user "alice@domain.tld"
-
- Scenario: A sharee moving a delegated mailbox to his mailboxes should be rejected
- Given "alice@domain.tld" has a mailbox "shared.sharedChild"
- And "bob@domain.tld" has a mailbox "other"
- And "alice@domain.tld" shares her mailbox "shared.sharedChild" with "bob@domain.tld" with "aeilrwt" rights
- When "bob@domain.tld" moves the mailbox "shared.sharedChild" owned by "alice@domain.tld", into mailbox "other" owned by "bob@domain.tld"
- Then mailbox "shared.sharedChild" owned by "alice@domain.tld" is not updated
-
- Scenario: A sharee moving a delegated mailbox into his mailbox should not move mailbox
- Given "alice@domain.tld" has a mailbox "shared.sharedChild"
- And "bob@domain.tld" has a mailbox "other"
- And "alice@domain.tld" shares her mailbox "shared.sharedChild" with "bob@domain.tld" with "aeilrwt" rights
- When "bob@domain.tld" moves the mailbox "shared.sharedChild" owned by "alice@domain.tld", into mailbox "other" owned by "bob@domain.tld"
- Then "alice@domain.tld" lists mailboxes
- And the mailboxes should contain "sharedChild" in "Personal" namespace, with parent mailbox "shared" of user "alice@domain.tld"
-
- Scenario: A sharee should be able to retrieve a mailbox after sharer moved it as a top level mailbox
- Given "alice@domain.tld" has a mailbox "shared.sharedChild"
- And "alice@domain.tld" shares her mailbox "shared.sharedChild" with "bob@domain.tld" with "aeilrwt" rights
- When "alice@domain.tld" moves the mailbox "shared.sharedChild" owned by "alice@domain.tld" as top level mailbox
- Then "bob@domain.tld" lists mailboxes
- And the mailboxes should contain "sharedChild" in "Delegated" namespace, with no parent mailbox
-
- Scenario: A sharee should be able to retrieve a mailbox after sharer moved it into another mailbox
- Given "alice@domain.tld" has a mailbox "shared.sharedChild"
- And "alice@domain.tld" has a mailbox "other"
- And "alice@domain.tld" shares her mailbox "shared.sharedChild" with "bob@domain.tld" with "aeilrwt" rights
- When "alice@domain.tld" moves the mailbox "shared.sharedChild" owned by "alice@domain.tld", into mailbox "other" owned by "alice@domain.tld"
- Then "bob@domain.tld" lists mailboxes
- And the mailboxes should contain "sharedChild" in "Delegated" namespace, with parent mailbox "other" of user "alice@domain.tld"
-
- Scenario: A sharer can not move its mailboxes to someone else delegated mailboxes
- Given "alice@domain.tld" has a mailbox "shared.sharedChild"
- And "bob@domain.tld" has a mailbox "other"
- And "alice@domain.tld" shares her mailbox "shared.sharedChild" with "bob@domain.tld" with "aeilrwt" rights
- And "bob@domain.tld" shares her mailbox "other" with "alice@domain.tld" with "aeilrwt" rights
- When "alice@domain.tld" moves the mailbox "shared.sharedChild" owned by "alice@domain.tld", into mailbox "other" owned by "bob@domain.tld"
- Then mailbox "shared.sharedChild" owned by "alice@domain.tld" is not updated
-
http://git-wip-us.apache.org/repos/asf/james-project/blob/f48f0c22/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 e2f1e73..11dde7a 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
@@ -23,8 +23,6 @@ Feature: GetMessages method
Background:
Given a domain named "domain.tld"
And a user "alice@domain.tld"
- And a user "bob@domain.tld"
- And a user "cedric@domain.tld"
And "alice@domain.tld" has a mailbox "INBOX"
Scenario: Retrieving a message in several mailboxes should return a single message in these mailboxes
@@ -36,30 +34,6 @@ Feature: GetMessages method
And the id of the message is "m1"
And the message is in "custom,INBOX" mailboxes
- Scenario: Retrieving a message in a mailbox delegated to me
- Given "alice@domain.tld" has a mailbox "shared"
- And "alice@domain.tld" shares her mailbox "shared" with "bob@domain.tld" with "lr" rights
- And "alice@domain.tld" has a message "m1" in "shared" mailbox with subject "my test subject", content "testmail"
- When "bob@domain.tld" ask for messages "m1"
- Then no error is returned
- And the list should contain 1 message
- And the id of the message is "m1"
-
- Scenario: Retrieving a message in a mailbox delegated to someone else
- Given "alice@domain.tld" has a mailbox "shared"
- And "alice@domain.tld" shares her mailbox "shared" with "bob@domain.tld" with "lr" rights
- And "alice@domain.tld" has a message "m1" in "shared" mailbox with subject "my test subject", content "testmail"
- When "cedric@domain.tld" ask for messages "m1"
- Then no error is returned
- And the list of messages is empty
-
- Scenario: Retrieving a message in a mailbox not delegated to me
- Given "alice@domain.tld" has a mailbox "notShared"
- And "alice@domain.tld" has a message "m1" in "notShared" mailbox with subject "my test subject", content "testmail"
- When "bob@domain.tld" ask for messages "m1"
- Then no error is returned
- And the list should contain 0 message
-
Scenario: Retrieving messages with a non null accountId should return a NotSupported error
When "alice@domain.tld" ask for messages using its accountId
Then an error "Not yet implemented" is returned
http://git-wip-us.apache.org/repos/asf/james-project/blob/f48f0c22/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/KeywordsConsistencyOnDelegationMailbox.feature
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/KeywordsConsistencyOnDelegationMailbox.feature b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/KeywordsConsistencyOnDelegationMailbox.feature
deleted file mode 100644
index de01c1c..0000000
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/KeywordsConsistencyOnDelegationMailbox.feature
+++ /dev/null
@@ -1,141 +0,0 @@
-#***************************************************************
-# Licensed to the Apache Software Foundation (ASF) under one *
-# or more contributor license agreements. See the NOTICE file *
-# distributed with this work for additional information *
-# regarding copyright ownership. The ASF licenses this file *
-# to you under the Apache License, Version 2.0 (the *
-# "License"); you may not use this file except in compliance *
-# with the License. You may obtain a copy of the License at *
-# *
-# http://www.apache.org/licenses/LICENSE-2.0 *
-# *
-# Unless required by applicable law or agreed to in writing, *
-# software distributed under the License is distributed on an *
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
-# KIND, either express or implied. See the License for the *
-# specific language governing permissions and limitations *
-# under the License. *
-# **************************************************************/
-Feature: Keywords consistency on delegation mailbox
-
- Background:
- Given a domain named "domain.tld"
- And a user "alice@domain.tld"
- And a user "bob@domain.tld"
- And "alice@domain.tld" has a mailbox "notShared"
- And "alice@domain.tld" has a mailbox "shared"
- And "alice@domain.tld" shares its mailbox "shared" with rights "lrw" with "bob@domain.tld"
- And "alice@domain.tld" has a message "m1" in "notShared" mailbox with subject "My awesome subject", content "This is the content"
- And "alice@domain.tld" copies "m1" from mailbox "notShared" to mailbox "shared"
-
- Scenario: getMessageList filtered by flag should combine flag when delegation mailbox
- Given "bob@domain.tld" sets flags "$Flagged" on message "m1"
- When "alice@domain.tld" asks for message list in mailboxes "shared,notShared" with flag "$Flagged"
- Then the message list contains "m1"
-
- Scenario: getMessageList filtered by flag should keep flag on non-shared mailbox
- Given "bob@domain.tld" sets flags "$Flagged" on message "m1"
- When "alice@domain.tld" asks for message list in mailboxes "notShared" with flag "$Flagged"
- Then the message list is empty
-
- Scenario: getMessageList filtered by flag should keep flag on delegation mailbox
- Given "bob@domain.tld" sets flags "$Flagged" on message "m1"
- When "alice@domain.tld" asks for message list in mailboxes "shared" with flag "$Flagged"
- Then the message list contains "m1"
-
- Scenario: Get message list should select Draft flag on all mailbox
- Given message "m1" has flags $Draft in mailbox "shared" of user "alice@domain.tld"
- When "alice@domain.tld" asks for message list in mailboxes "shared,notShared" with flag "$Draft"
- Then the message list contains "m1"
-
- Scenario: Get message list should keep flags on non-shared mailbox
- Given message "m1" has flags $Draft in mailbox "shared" of user "alice@domain.tld"
- When "alice@domain.tld" asks for message list in mailbox "notShared" with flag "$Draft"
- Then the message list is empty
-
- Scenario: Get message list should keep flags on shared mailbox
- Given message "m1" has flags $Draft in mailbox "shared" of user "alice@domain.tld"
- When "alice@domain.tld" asks for message list in mailbox "shared" with flag "$Draft"
- Then the message list contains "m1"
-
- Scenario: getMessage with shared user should return message with combine flag when delegation mailbox
- Given message "m1" has flags $Flagged in mailbox "shared" of user "alice@domain.tld"
- When "bob@domain.tld" ask for messages "m1"
- Then no error is returned
- And the keywords of the message is $Flagged
-
- Scenario: getMessage of owner mailbox should return message with combine flag when delegation mailbox
- Given message "m1" has flags $Flagged in mailbox "shared" of user "alice@domain.tld"
- When "alice@domain.tld" ask for messages "m1"
- Then no error is returned
- And the keywords of the message is $Flagged
-
- Scenario: message should update message status based on delegation mailbox
- Given "alice@domain.tld" sets flags "$Flagged,$Seen" on message "m1"
- And "bob@domain.tld" sets flags "$Seen" on message "m1"
- When "alice@domain.tld" ask for messages "m1"
- Then no error is returned
- And the message has IMAP flag "\Flagged \Seen" in mailbox "notShared" for "alice@domain.tld"
- And the message has IMAP flag "\Seen" in mailbox "shared" for "alice@domain.tld"
-
- Scenario: message should keep origin message status when cut the sharing
- Given "bob@domain.tld" sets flags "$Flagged" on message "m1"
- And "alice@domain.tld" shares its mailbox "shared" with rights "" with "bob@domain.tld"
- When "alice@domain.tld" ask for messages "m1"
- Then no error is returned
- And the message has IMAP flag "\Flagged" in mailbox "shared" for "alice@domain.tld"
- And the message has IMAP flag "" in mailbox "notShared" for "alice@domain.tld"
-
- Scenario: getMessage should keep origin message status when delegation mailbox
- Given message "m1" has flags $Flagged in mailbox "notShared" of user "alice@domain.tld"
- And message "m1" has flags $Seen in mailbox "shared" of user "alice@domain.tld"
- And "alice@domain.tld" shares its mailbox "shared" with rights "" with "bob@domain.tld"
- When "alice@domain.tld" ask for messages "m1"
- Then no error is returned
- And the keywords of the message is $Flagged,$Seen
-
- Scenario: getMessage on mailbox should keep its flag as it is when owner
- Given "alice@domain.tld" sets flags "$Flagged" on message "m1"
- When "alice@domain.tld" ask for messages "m1"
- Then no error is returned
- And the message has IMAP flag "\Flagged" in mailbox "shared" for "alice@domain.tld"
- And the message has IMAP flag "\Flagged" in mailbox "notShared" for "alice@domain.tld"
-
- Scenario: messages should keep Draft flag as it is when onwer
- Given message "m1" has flags $Draft in mailbox "shared" of user "alice@domain.tld"
- When "bob@domain.tld" ask for messages "m1"
- Then no error is returned
- And the keywords of the message is $Draft
-
- Scenario: message should intersect flag when Draft
- Given message "m1" has flags $Draft in mailbox "shared" of user "alice@domain.tld"
- When "alice@domain.tld" ask for messages "m1"
- Then no error is returned
- And the message has no keyword
-
- Scenario: message should intersect flag when Draft after cut sharing
- Given message "m1" has flags $Draft in mailbox "shared" of user "alice@domain.tld"
- And "alice@domain.tld" shares its mailbox "shared" with rights "" with "bob@domain.tld"
- When "alice@domain.tld" ask for messages "m1"
- Then no error is returned
- And the message has no keyword
-
- Scenario: message should combine flag if not Draft
- Given the user has an open IMAP connection with mailbox "shared" selected
- And the user set flags via IMAP to "\FLAGGED" for all messages in mailbox "shared"
- When "alice@domain.tld" ask for messages "m1"
- Then no error is returned
- And the keywords of the message is $Flagged
-
- Scenario: message should combine flag if not Draft on all mailboxes
- Given "alice@domain.tld" sets flags "$Flagged" on message "m1"
- When "alice@domain.tld" ask for messages "m1"
- Then no error is returned
- And the keywords of the message is $Flagged
-
- Scenario: message should intersect Draft flag with onwer mailbox
- Given the user has an open IMAP connection with mailbox "shared" selected
- And the user set flags via IMAP to "\DRAFT" for all messages in mailbox "shared"
- When "alice@domain.tld" ask for messages "m1"
- Then no error is returned
- And the message has no keyword
http://git-wip-us.apache.org/repos/asf/james-project/blob/f48f0c22/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/SetMailboxes.feature
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/SetMailboxes.feature b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/SetMailboxes.feature
deleted file mode 100644
index 57a7512..0000000
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/SetMailboxes.feature
+++ /dev/null
@@ -1,30 +0,0 @@
-#***************************************************************
-# Licensed to the Apache Software Foundation (ASF) under one *
-# or more contributor license agreements. See the NOTICE file *
-# distributed with this work for additional information *
-# regarding copyright ownership. The ASF licenses this file *
-# to you under the Apache License, Version 2.0 (the *
-# "License"); you may not use this file except in compliance *
-# with the License. You may obtain a copy of the License at *
-# *
-# http://www.apache.org/licenses/LICENSE-2.0 *
-# *
-# Unless required by applicable law or agreed to in writing, *
-# software distributed under the License is distributed on an *
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
-# KIND, either express or implied. See the License for the *
-# specific language governing permissions and limitations *
-# under the License. *
-# **************************************************************/
-Feature: SetMailboxes method
-
- Background:
- Given a domain named "domain.tld"
- And a user "alice@domain.tld"
- And "alice@domain.tld" has a mailbox "shared"
-
- Scenario: setMailboxes should reject sharing a mailbox to another domain
- Given a domain named "otherdomain.tld"
- And a user "bob@otherdomain.tld"
- When "alice@domain.tld" shares its mailbox "shared" with rights "lrw" with "bob@otherdomain.tld"
- Then "alice@domain.tld" receives not updated on mailbox "shared" with kind "invalidArguments" and message "Cannot share a mailbox to another domain"
http://git-wip-us.apache.org/repos/asf/james-project/blob/f48f0c22/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/SetMessages.feature
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/SetMessages.feature b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/SetMessages.feature
index b3447fb..ffe6eec 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/SetMessages.feature
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/SetMessages.feature
@@ -13,99 +13,24 @@
# software distributed under the License is distributed on an *
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
# KIND, either express or implied. See the License for the *
-# specific language governing permissions and limitations *
-# under the License. *
+# specific language governing permissions and limitations * # under the License. *
# **************************************************************/
-Feature: SetMessages method on shared folders
+Feature: SetMessages method
As a James user
- I want to be able to modify properties of a shared mail
+ I want to be able to modify properties of a mail
Background:
Given a domain named "domain.tld"
- And a user "alice@domain.tld"
And a user "bob@domain.tld"
- And "bob@domain.tld" has a mailbox "shared"
- And "alice@domain.tld" has a mailbox "INBOX"
- And "bob@domain.tld" has a message "mBob" in "shared" mailbox with two attachments in text
- And "alice@domain.tld" has a message "mAlice" in "INBOX" mailbox with two attachments in text
-
-# Set in mailboxes
-
- Scenario: A delegated user can copy messages from shared mailbox when having "read" right
- Given "bob@domain.tld" shares his mailbox "shared" with "alice@domain.tld" with "lr" rights
- And "alice@domain.tld" copies "mBob" from mailbox "shared" of user "bob@domain.tld" to mailbox "INBOX" of user "alice@domain.tld"
- Then "alice@domain.tld" should see message "mBob" in mailboxes:
- |alice@domain.tld |INBOX |
- |bob@domain.tld |shared |
-
- Scenario: A delegated user can move messages out of shared mailbox when having "read" and "delete" rights
- Given "bob@domain.tld" shares his mailbox "shared" with "alice@domain.tld" with "lrte" rights
- And "alice@domain.tld" moves "mBob" to mailbox "INBOX" of user "alice@domain.tld"
- Then "alice@domain.tld" should see message "mBob" in mailboxes:
- |alice@domain.tld |INBOX |
-
- Scenario: A delegated user can add messages to a shared mailbox when having "insert" rights
- Given "bob@domain.tld" shares his mailbox "shared" with "alice@domain.tld" with "lri" rights
- And "alice@domain.tld" copies "mAlice" from mailbox "INBOX" of user "alice@domain.tld" to mailbox "shared" of user "bob@domain.tld"
- Then "alice@domain.tld" should see message "mAlice" in mailboxes:
- |alice@domain.tld |INBOX |
- |bob@domain.tld |shared |
-
- Scenario: A delegated user can add messages with keywords to a shared mailbox when having "write" right
- Given "bob@domain.tld" shares his mailbox "shared" with "alice@domain.tld" with "lriws" rights
- And "alice@domain.tld" sets flags "$Flagged" on message "mAlice"
- And "alice@domain.tld" moves "mAlice" to mailbox "shared" of user "bob@domain.tld"
- Then "alice@domain.tld" should see message "mAlice" with keywords "$Flagged"
-
- Scenario: A delegated user can add sanitized messages to a shared mailbox when missing "write" right
- Given "bob@domain.tld" shares his mailbox "shared" with "alice@domain.tld" with "lri" rights
- And "alice@domain.tld" sets flags "$Flagged" on message "mAlice"
- And "alice@domain.tld" moves "mAlice" to mailbox "shared" of user "bob@domain.tld"
- Then "alice@domain.tld" should see message "mAlice" without keywords
-
- Scenario: A delegated user can not copy messages from shared mailbox when missing "read" right
- Given "bob@domain.tld" shares his mailbox "shared" with "alice@domain.tld" with "litewsa" rights
- When "alice@domain.tld" copies "mBob" from mailbox "shared" of user "bob@domain.tld" to mailbox "INBOX" of user "alice@domain.tld"
- Then message "mBob" is not updated
-
- Scenario: A delegated user can not copy messages to shared mailbox when missing "insert" right
- Given "bob@domain.tld" shares his mailbox "shared" with "alice@domain.tld" with "lrtewsa" rights
- When "alice@domain.tld" copies "mAlice" from mailbox "INBOX" of user "alice@domain.tld" to mailbox "shared" of user "bob@domain.tld"
- Then message "mAlice" is not updated
-
- Scenario: A delegated user can not move messages out of shared mailbox when missing "delete" right
- Given "bob@domain.tld" shares his mailbox "shared" with "alice@domain.tld" with "lriwsa" rights
- When "alice@domain.tld" moves "mBob" to mailbox "INBOX" of user "alice@domain.tld"
- Then message "mBob" is not updated
+ And "bob@domain.tld" has a mailbox "mailbox"
+ And "bob@domain.tld" has a message "mBob" in "mailbox" mailbox with two attachments in text
# Flags update
Scenario: A user can update the flags on a message
- Given "alice@domain.tld" sets flags "$Flagged,$Seen" on message "mAlice"
- When "alice@domain.tld" sets flags "$Flagged,$Forwarded" on message "mAlice"
- Then "alice@domain.tld" should see message "mAlice" with keywords "$Flagged,$Forwarded"
-
- Scenario: A delegated user add keywords on a delegated message when having "write" right
- Given "bob@domain.tld" shares his mailbox "shared" with "alice@domain.tld" with "lrw" rights
- When "alice@domain.tld" sets flags "$Flagged" on message "mBob"
- Then "alice@domain.tld" should see message "mBob" with keywords "$Flagged"
-
- Scenario: A delegated user can not add keywords on a delegated message when missing "write" right
- Given "bob@domain.tld" shares his mailbox "shared" with "alice@domain.tld" with "latires" rights
- When "alice@domain.tld" sets flags "$Flagged" on message "mBob"
- Then message "mBob" is not updated
-
- Scenario: A delegated user remove keywords on a delegated message when having "write" right
- Given "bob@domain.tld" shares his mailbox "shared" with "alice@domain.tld" with "lrw" rights
- And "bob@domain.tld" sets flags "$Flagged" on message "mBob"
- When "alice@domain.tld" sets flags "" on message "mBob"
- Then "alice@domain.tld" should see message "mBob" without keywords
-
- Scenario: A delegated user can not remove keywords on a delegated message when missing "write" right
- Given "bob@domain.tld" shares his mailbox "shared" with "alice@domain.tld" with "latires" rights
- And "bob@domain.tld" sets flags "$Flagged" on message "mBob"
- When "alice@domain.tld" sets flags "" on message "mBob"
- Then message "mBob" is not updated
+ Given "bob@domain.tld" sets flags "$Flagged,$Seen" on message "mBob"
+ When "bob@domain.tld" sets flags "$Flagged,$Forwarded" on message "mBob"
+ Then "bob@domain.tld" should see message "mBob" with keywords "$Flagged,$Forwarded"
# Updating draft
@@ -142,28 +67,21 @@ Feature: SetMessages method on shared folders
Scenario: Draft creation in any mailbox is allowed
Given "bob@domain.tld" has a mailbox "Outbox"
- When "bob@domain.tld" tries to create a draft message "mDraft" in mailbox "shared"
+ When "bob@domain.tld" tries to create a draft message "mDraft" in mailbox "mailbox"
Then message "mDraft" is created
Scenario: A user can move draft out of draft mailbox
Given "bob@domain.tld" has a mailbox "Drafts"
And "bob@domain.tld" tries to create a draft message "mDraft" in mailbox "Drafts"
- When "bob@domain.tld" moves "mDraft" to user mailbox "shared"
+ When "bob@domain.tld" moves "mDraft" to user mailbox "mailbox"
Then message "mDraft" is updated
Scenario: A user can move draft out of draft mailbox when removing draft flag
Given "bob@domain.tld" has a mailbox "Drafts"
And "bob@domain.tld" tries to create a draft message "mDraft" in mailbox "Drafts"
- When the user moves "mDraft" to user mailbox "shared" and set flags ""
+ When the user moves "mDraft" to user mailbox "mailbox" and set flags ""
Then message "mDraft" is updated
- Scenario: A delegated user can not move draft from draft mailbox to outbox
- Given "bob@domain.tld" has a mailbox "Drafts"
- And "bob@domain.tld" tries to create a draft message "mDraft" in mailbox "Drafts"
- When "alice@domain.tld" moves "mDraft" to mailbox "Outbox" of user "bob@domain.tld"
- Then message "mDraft" is not updated
- And message "mBob" has flags $Draft in mailbox "Drafts" of user "bob@domain.tld"
-
Scenario: A user can move non-draft messages to draft mailbox when setting $Draft
Given "bob@domain.tld" has a mailbox "Drafts"
When the user moves "mBob" to user mailbox "Drafts" and set flags "$Draft"
@@ -172,7 +90,7 @@ Feature: SetMessages method on shared folders
Scenario: A user can copy draft out of draft mailbox
Given "bob@domain.tld" has a mailbox "Drafts"
And "bob@domain.tld" tries to create a draft message "mDraft" in mailbox "Drafts"
- When "bob@domain.tld" copies "mDraft" from mailbox "Drafts" to mailbox "shared"
+ When "bob@domain.tld" copies "mDraft" from mailbox "Drafts" to mailbox "mailbox"
Then message "mDraft" is updated
Scenario: A user can copy draft out of draft mailbox
@@ -182,5 +100,5 @@ Feature: SetMessages method on shared folders
Scenario: A user can copy draft out of draft mailbox
Given "bob@domain.tld" has a mailbox "Drafts"
- When "bob@domain.tld" copies "mBob" from mailbox "shared" to mailbox "Drafts"
+ When "bob@domain.tld" copies "mBob" from mailbox "mailbox" to mailbox "Drafts"
Then message "mBob" is updated
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/james-project/blob/f48f0c22/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/SharingParentMailboxWithAndWithoutChildren.feature
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/SharingParentMailboxWithAndWithoutChildren.feature b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/SharingParentMailboxWithAndWithoutChildren.feature
deleted file mode 100644
index 4c6e6b8..0000000
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/SharingParentMailboxWithAndWithoutChildren.feature
+++ /dev/null
@@ -1,105 +0,0 @@
-#***************************************************************
-# Licensed to the Apache Software Foundation (ASF) under one *
-# or more contributor license agreements. See the NOTICE file *
-# distributed with this work for additional information *
-# regarding copyright ownership. The ASF licenses this file *
-# to you under the Apache License, Version 2.0 (the *
-# "License"); you may not use this file except in compliance *
-# with the License. You may obtain a copy of the License at *
-# *
-# http://www.apache.org/licenses/LICENSE-2.0 *
-# *
-# Unless required by applicable law or agreed to in writing, *
-# software distributed under the License is distributed on an *
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
-# KIND, either express or implied. See the License for the *
-# specific language governing permissions and limitations *
-# under the License. *
-# **************************************************************/
-
-Feature: Share parent mailbox without sharing submailbox
- As a James user
- I want to be able to retrieve my mailboxes
-
- Background:
- Given a domain named "domain.tld"
- And a user "alice@domain.tld"
- And a user "bob@domain.tld"
- And "alice@domain.tld" has a mailbox "shared"
- And "alice@domain.tld" has a mailbox "shared.secret"
- And "alice@domain.tld" has a mailbox "shared.notsecret"
- And "alice@domain.tld" shares her mailbox "shared" with "bob@domain.tld" with "aeilrwt" rights
- And "alice@domain.tld" shares her mailbox "shared.notsecret" with "bob@domain.tld" with "aeilrwt" rights
- And "alice@domain.tld" has a message "m1" in "shared" mailbox
- And "alice@domain.tld" has a message "m2" in "shared.secret" mailbox
- And "alice@domain.tld" has a message "m3" in "shared.notsecret" mailbox
-
- Scenario: Bob can see shared mailbox and explicitly shared children mailbox
- When "bob@domain.tld" lists mailboxes
- Then the mailboxes should contain "shared" in "Delegated" namespace
- And the mailboxes should contain "notsecret" in "Delegated" namespace, with parent mailbox "shared" of user "alice@domain.tld"
- And the mailbox "shared" has 1 messages
- And the mailbox "notsecret" has 1 messages
-
- Scenario: Bob can not see not explicitly shared children mailbox
- When "bob@domain.tld" lists mailboxes
- And the mailboxes should not contain "shared.secret" in "Delegated" namespace
- And the mailboxes should not contain "secret" in "Personal" namespace
- And the mailboxes should not contain "secret" in "Delegated" namespace, with parent mailbox "shared" of user "alice@domain.tld"
-
- Scenario: Alice can see all her shared mailbox
- When "alice@domain.tld" lists mailboxes
- And the mailboxes should contain "shared" in "Personal" namespace
- And the mailboxes should contain "notsecret" in "Personal" namespace, with parent mailbox "shared" of user "alice@domain.tld"
- And the mailbox "shared" has 1 messages
- And the mailbox "notsecret" has 1 messages
-
- Scenario: Alice can see all her not shared mailbox
- When "alice@domain.tld" lists mailboxes
- And the mailboxes should contain "secret" in "Personal" namespace, with parent mailbox "shared" of user "alice@domain.tld"
- And the mailbox "secret" has 1 messages
-
- Scenario: Alice can get message from her shared mailbox
- When "alice@domain.tld" ask for messages "m1"
- Then no error is returned
- And the list should contain 1 message
- When "alice@domain.tld" ask for messages "m3"
- Then no error is returned
- And the list should contain 1 message
-
- Scenario: Alice can get message from her not shared mailbox
- When "alice@domain.tld" ask for messages "m2"
- Then no error is returned
- And the list should contain 1 message
-
- Scenario: Bob can get message from all his shared mailbox
- When "bob@domain.tld" ask for messages "m1"
- Then no error is returned
- And the list should contain 1 message
- When "bob@domain.tld" ask for messages "m3"
- Then no error is returned
- And the list should contain 1 message
-
- Scenario: Bob can not get message from mailbox not shared with him
- When "bob@domain.tld" ask for messages "m2"
- And the list should contain 0 message
-
- Scenario: Alice can list message from all her shared mailbox
- When "alice@domain.tld" asks for message list in mailbox "shared"
- Then the message list has size 1
- When "alice@domain.tld" asks for message list in mailbox "shared.notsecret"
- Then the message list has size 1
-
- Scenario: Alice can list message from all her mailbox she is not sharing
- When "alice@domain.tld" asks for message list in mailbox "shared.secret"
- Then the message list has size 1
-
- Scenario: Bob can list message from all mailbox that are shared to him
- When "bob@domain.tld" asks for message list in delegated mailbox "shared" from "alice@domain.tld"
- Then the message list has size 1
- When "bob@domain.tld" asks for message list in delegated mailbox "shared.notsecret" from "alice@domain.tld"
- Then the message list has size 1
-
- Scenario: Bob can not list message from mailbox that are not shared to him
- When "bob@domain.tld" asks for message list in delegated mailbox "shared.secret" from "alice@domain.tld"
- Then the message list has size 0
http://git-wip-us.apache.org/repos/asf/james-project/blob/f48f0c22/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/CopyAndSharing.feature
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/CopyAndSharing.feature b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/CopyAndSharing.feature
new file mode 100644
index 0000000..de466d7
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/CopyAndSharing.feature
@@ -0,0 +1,55 @@
+#***************************************************************
+# Licensed to the Apache Software Foundation (ASF) under one *
+# or more contributor license agreements. See the NOTICE file *
+# distributed with this work for additional information *
+# regarding copyright ownership. The ASF licenses this file *
+# to you under the Apache License, Version 2.0 (the *
+# "License"); you may not use this file except in compliance *
+# with the License. You may obtain a copy of the License at *
+# *
+# http://www.apache.org/licenses/LICENSE-2.0 *
+# *
+# Unless required by applicable law or agreed to in writing, *
+# software distributed under the License is distributed on an *
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+# KIND, either express or implied. See the License for the *
+# specific language governing permissions and limitations *
+# under the License. *
+# **************************************************************/
+Feature: Copy message and sharing
+ As a James user
+ I want that copying message work correctly with shared folder
+
+ Background:
+ Given a domain named "domain.tld"
+ And some users "alice@domain.tld", "bob@domain.tld"
+ And "alice@domain.tld" has a mailbox "shared"
+ And "alice@domain.tld" shares her mailbox "shared" with "bob@domain.tld" with "aeilrwt" rights
+ And "bob@domain.tld" has a mailbox "bobMailbox"
+ And "alice@domain.tld" has a message "m1" in "INBOX" mailbox
+ And "bob@domain.tld" has a message "m2" in "bobMailbox" mailbox
+
+ Scenario: Copy message should update the total and the unread counts when asked by sharer
+ Given "alice@domain.tld" copies "m1" from mailbox "INBOX" to mailbox "shared"
+ When "alice@domain.tld" lists mailboxes
+ Then the mailbox "shared" has 1 message
+ And the mailbox "shared" has 1 unseen message
+
+ Scenario: Copy message should update the total and the unread counts when asked by sharer / sharee view
+ Given "alice@domain.tld" copies "m1" from mailbox "INBOX" to mailbox "shared"
+ When "bob@domain.tld" lists mailboxes
+ Then the mailbox "shared" has 1 message
+ And the mailbox "shared" has 1 unseen message
+
+ Scenario: Copy message should update the total and the unread counts when asked by sharee
+ Given "bob@domain.tld" copies "m2" from mailbox "bobMailbox" of user "bob@domain.tld" to mailbox "shared" of user "alice@domain.tld"
+ When "alice@domain.tld" lists mailboxes
+ Then the mailbox "shared" has 1 message
+ And the mailbox "shared" has 1 unseen message
+
+ Scenario: Copy message should update the total and the unread counts when asked by sharee / sharee view
+ Given "bob@domain.tld" copies "m2" from mailbox "bobMailbox" of user "bob@domain.tld" to mailbox "shared" of user "alice@domain.tld"
+ When "bob@domain.tld" lists mailboxes
+ Then the mailbox "shared" has 1 message
+ And the mailbox "shared" has 1 unseen message
+
http://git-wip-us.apache.org/repos/asf/james-project/blob/f48f0c22/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/DownloadAndSharing.feature
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/DownloadAndSharing.feature b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/DownloadAndSharing.feature
new file mode 100644
index 0000000..23194ab
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/DownloadAndSharing.feature
@@ -0,0 +1,42 @@
+#***************************************************************
+# Licensed to the Apache Software Foundation (ASF) under one *
+# or more contributor license agreements. See the NOTICE file *
+# distributed with this work for additional information *
+# regarding copyright ownership. The ASF licenses this file *
+# to you under the Apache License, Version 2.0 (the *
+# "License"); you may not use this file except in compliance *
+# with the License. You may obtain a copy of the License at *
+# *
+# http://www.apache.org/licenses/LICENSE-2.0 *
+# *
+# Unless required by applicable law or agreed to in writing, *
+# software distributed under the License is distributed on an *
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+# KIND, either express or implied. See the License for the *
+# specific language governing permissions and limitations *
+# under the License. *
+# **************************************************************/
+Feature: Download endpoint and shared mailbox
+ As a James user
+ I want to access to the download endpoint in order to download attachment from mail of mailbox that has been shared to me
+
+ Background:
+ Given a domain named "domain.tld"
+ And some users "alice@domain.tld", "bob@domain.tld", "someone@domain.tld"
+ And "alice@domain.tld" has a mailbox "shared"
+ And "alice@domain.tld" mailbox "shared" contains a message "m1" with an attachment "a1"
+ And "alice@domain.tld" shares his mailbox "shared" with "bob@domain.tld" with "lr" rights
+
+ Scenario: Bob should have access to a shared attachment
+ Given "bob@domain.tld" is connected
+ When "bob@domain.tld" downloads "a1"
+ Then the user should be authorized
+
+ Scenario: Bob can download attachment of another user when shared mailbox
+ When "bob@domain.tld" downloads "a1"
+ Then he can read that blob
+ And the blob size is 3071
+
+ Scenario: Someone should not be able to download mail's attachment of mailbox shared to others
+ When "someone@domain.tld" downloads "a1"
+ Then "someone@domain.tld" should receive a not found response
http://git-wip-us.apache.org/repos/asf/james-project/blob/f48f0c22/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/GetMessageAndSharing.feature
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/GetMessageAndSharing.feature b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/GetMessageAndSharing.feature
new file mode 100644
index 0000000..30e662f
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/GetMessageAndSharing.feature
@@ -0,0 +1,48 @@
+#***************************************************************
+# Licensed to the Apache Software Foundation (ASF) under one *
+# or more contributor license agreements. See the NOTICE file *
+# distributed with this work for additional information *
+# regarding copyright ownership. The ASF licenses this file *
+# to you under the Apache License, Version 2.0 (the *
+# "License"); you may not use this file except in compliance *
+# with the License. You may obtain a copy of the License at *
+# *
+# http://www.apache.org/licenses/LICENSE-2.0 *
+# *
+# Unless required by applicable law or agreed to in writing, *
+# software distributed under the License is distributed on an *
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+# KIND, either express or implied. See the License for the *
+# specific language governing permissions and limitations *
+# under the License. *
+# **************************************************************/
+Feature: GetMessages method on shared mailbox
+ As a James user
+ I want to be able to retrieve messages contained by mailbox that has been shared to me
+
+ Background:
+ Given a domain named "domain.tld"
+ And some users "alice@domain.tld", "bob@domain.tld", "someone@domain.tld"
+ And "alice@domain.tld" has a mailbox "INBOX"
+ And "alice@domain.tld" has a mailbox "shared"
+ And "alice@domain.tld" shares her mailbox "shared" with "bob@domain.tld" with "lr" rights
+ And "alice@domain.tld" has a message "m1" in "shared" mailbox with subject "my test subject", content "testmail"
+
+ Scenario: Retrieving a message in a mailbox delegated to me
+ When "bob@domain.tld" ask for messages "m1"
+ Then no error is returned
+ And the list should contain 1 message
+ And the id of the message is "m1"
+
+ Scenario: Retrieving a message in a mailbox delegated to someone else
+ When "someone@domain.tld" ask for messages "m1"
+ Then no error is returned
+ And the list of messages is empty
+
+ Scenario: Retrieving a message in a mailbox not delegated to me
+ Given "alice@domain.tld" has a mailbox "notShared"
+ And "alice@domain.tld" has a message "m2" in "notShared" mailbox with subject "my test subject", content "testmail"
+ When "bob@domain.tld" ask for messages "m2"
+ Then no error is returned
+ And the list should contain 0 message
+
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org