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 <[email protected]> Authored: Mon Dec 11 17:22:57 2017 +0100 Committer: Antoine Duprat <[email protected]> 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 "[email protected]" sets flags "$Seen" on message "m1" - When "[email protected]" lists mailboxes + And "[email protected]" 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 "[email protected]" sets flags "$Seen" on message "m1" - When "[email protected]" lists mailboxes + And "[email protected]" 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 "[email protected]" sets flags "$Seen" on message "m1" - When "[email protected]" lists mailboxes + And "[email protected]" 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 "[email protected]" sets flags "$Seen" on message "m1" - When "[email protected]" lists mailboxes + And "[email protected]" 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 "[email protected]" shares her mailbox "shared2" with "[email protected]" with "lri" rights And "[email protected]" has a message "m2" in "shared2" mailbox When "[email protected]" sets flags "$Seen" on message "m2" - When "[email protected]" lists mailboxes + And "[email protected]" 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 "[email protected]" 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 "[email protected]" Scenario: Alice can see all her shared mailbox When "[email protected]" 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 "[email protected]" And the mailbox "shared" has 1 messages And the mailbox "notsecret" has 1 messages Scenario: Alice can see all her not shared mailbox When "[email protected]" lists mailboxes - And the mailboxes should contain "secret" in "Personal" namespace, with parent mailbox "shared" of user "[email protected]" + Then the mailboxes should contain "secret" in "Personal" namespace, with parent mailbox "shared" of user "[email protected]" 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 "[email protected]" 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 "[email protected]" 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 "[email protected]" 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 "[email protected]" 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 "[email protected]" 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 "[email protected]" 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 "[email protected]" 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 "[email protected]" 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 "[email protected]" asks for message list in delegated mailbox "shared" from "[email protected]" Then the message list has size 1 + + Scenario: Bob can list message from children mailbox that are shared to him When "[email protected]" asks for message list in delegated mailbox "shared.notsecret" from "[email protected]" Then the message list has size 1 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
