diff options
author | Ciro Santillli <ciro.santilli@gmail.com> | 2014-02-07 20:59:55 +0400 |
---|---|---|
committer | Ciro Santillli <ciro.santilli@gmail.com> | 2014-02-12 18:52:53 +0400 |
commit | 439a61783d0b61bbcc8f3c9e5b828b2270a679aa (patch) | |
tree | e6a02b733ad2dea5bda94ea5ac25d333e1419589 /features/profile | |
parent | c86553cd836b7be3948ace41ef47f85776a48a97 (diff) |
User can leave group from group page.
Diffstat (limited to 'features/profile')
-rw-r--r-- | features/profile/group.feature | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/features/profile/group.feature b/features/profile/group.feature new file mode 100644 index 00000000000..70b682e2913 --- /dev/null +++ b/features/profile/group.feature @@ -0,0 +1,47 @@ +Feature: Profile Group + Background: + Given I sign in as "John Doe" + And "John Doe" is owner of group "Owned" + And "John Doe" is guest of group "Guest" + + # Leave groups + + @javascript + Scenario: Owner should be able to leave from group if he is not the last owner + Given "Mary Jane" is owner of group "Owned" + When I visit profile groups page + Then I should see group "Owned" in group list + Then I should see group "Guest" in group list + When I click on the "Leave" button for group "Owned" + And I visit profile groups page + Then I should not see group "Owned" in group list + Then I should see group "Guest" in group list + + @javascript + Scenario: Owner should not be able to leave from group if he is the last owner + Given "Mary Jane" is guest of group "Owned" + When I visit profile groups page + Then I should see group "Owned" in group list + Then I should see group "Guest" in group list + Then I should not see the "Leave" button for group "Owned" + + @javascript + Scenario: Guest should be able to leave from group + Given "Mary Jane" is guest of group "Guest" + When I visit profile groups page + Then I should see group "Owned" in group list + Then I should see group "Guest" in group list + When I click on the "Leave" button for group "Guest" + When I visit profile groups page + Then I should see group "Owned" in group list + Then I should not see group "Guest" in group list + + @javascript + Scenario: Guest should be able to leave from group even if he is the only user in the group + When I visit profile groups page + Then I should see group "Owned" in group list + Then I should see group "Guest" in group list + When I click on the "Leave" button for group "Guest" + When I visit profile groups page + Then I should see group "Owned" in group list + Then I should not see group "Guest" in group list |