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:32 UTC

[11/11] james-project git commit: JAMES-2249 cucumber scenario: improve using of When, Then, And

JAMES-2249 cucumber scenario: improve using of When, Then, And


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/8e9c667e
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/8e9c667e
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/8e9c667e

Branch: refs/heads/master
Commit: 8e9c667e72815059d98b5c50a4af0c702ceac936
Parents: e71d1de
Author: Luc DUZAN <ld...@linagora.com>
Authored: Mon Dec 11 17:22:57 2017 +0100
Committer: Antoine Duprat <ad...@linagora.com>
Committed: Tue Dec 12 15:12:36 2017 +0100

----------------------------------------------------------------------
 .../cucumber/sharing/SetFlagAndSharing.feature  | 10 ++++----
 ...gParentMailboxWithAndWithoutChildren.feature | 24 +++++++++++++-------
 2 files changed, 21 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/8e9c667e/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/SetFlagAndSharing.feature
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/SetFlagAndSharing.feature b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/SetFlagAndSharing.feature
index 2925725..a3287fa 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/SetFlagAndSharing.feature
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/SetFlagAndSharing.feature
@@ -29,25 +29,25 @@ Feature: Set flag and sharing
 
   Scenario: Set flags by sharer should update unseen count when read by sharer
     When "alice@domain.tld" sets flags "$Seen" on message "m1"
-    When "alice@domain.tld" lists mailboxes
+    And "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
     When "alice@domain.tld" sets flags "$Seen" on message "m1"
-    When "bob@domain.tld" lists mailboxes
+    And "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
     When "bob@domain.tld" sets flags "$Seen" on message "m1"
-    When "alice@domain.tld" lists mailboxes
+    And "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
     When "bob@domain.tld" sets flags "$Seen" on message "m1"
-    When "bob@domain.tld" lists mailboxes
+    And "bob@domain.tld" lists mailboxes
     Then the mailbox "shared" has 1 message
     And the mailbox "shared" has 0 unseen messages
 
@@ -56,6 +56,6 @@ Feature: Set flag and sharing
     And "alice@domain.tld" shares her mailbox "shared2" with "bob@domain.tld" with "lri" rights
     And "alice@domain.tld" has a message "m2" in "shared2" mailbox
     When "bob@domain.tld" sets flags "$Seen" on message "m2"
-    When "alice@domain.tld" lists mailboxes
+    And "alice@domain.tld" lists mailboxes
     Then the mailbox "shared2" has 1 message
     And the mailbox "shared2" has 1 unseen message

http://git-wip-us.apache.org/repos/asf/james-project/blob/8e9c667e/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/SharingParentMailboxWithAndWithoutChildren.feature
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/SharingParentMailboxWithAndWithoutChildren.feature b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/SharingParentMailboxWithAndWithoutChildren.feature
index 361859b..24aaabd 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/SharingParentMailboxWithAndWithoutChildren.feature
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/sharing/SharingParentMailboxWithAndWithoutChildren.feature
@@ -42,26 +42,28 @@ Feature: Share parent mailbox without sharing submailbox
 
   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
+    Then 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
+    Then 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"
+    Then 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
+  Scenario: Alice can get message from her root shared mailbox
     When "alice@domain.tld" ask for messages "m1"
     Then no error is returned
     And the list should contain 1 message
+
+  Scenario: Alice can get message from her children shared mailbox
     When "alice@domain.tld" ask for messages "m3"
     Then no error is returned
     And the list should contain 1 message
@@ -71,21 +73,25 @@ Feature: Share parent mailbox without sharing submailbox
     Then no error is returned
     And the list should contain 1 message
 
-  Scenario: Bob can get message from all his shared mailbox
+  Scenario: Bob can get message from root shared mailbox
     When "bob@domain.tld" ask for messages "m1"
     Then no error is returned
     And the list should contain 1 message
+
+  Scenario: Bob can get message from children shared mailbox
     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
+    Then the list should contain 0 message
 
-  Scenario: Alice can list message from all her shared mailbox
+  Scenario: Alice can list message from her shared root mailbox
     When "alice@domain.tld" asks for message list in mailbox "shared"
     Then the message list has size 1
+
+  Scenario: Alice can list message from her shared children mailbox
     When "alice@domain.tld" asks for message list in mailbox "shared.notsecret"
     Then the message list has size 1
 
@@ -93,9 +99,11 @@ Feature: Share parent mailbox without sharing submailbox
     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
+  Scenario: Bob can list message from root 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
+
+  Scenario: Bob can list message from children mailbox that are shared to him
     When "bob@domain.tld" asks for message list in delegated mailbox "shared.notsecret" from "alice@domain.tld"
     Then the message list has size 1
 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org