summaryrefslogtreecommitdiff
path: root/features/dashboard
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-08 20:52:22 -0700
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-08 20:52:22 -0700
commit7e4258777f8eed31cfe202bb96178823218f3b1c (patch)
treed908f55aa559721914d16ef4d9f1b301e5da10bd /features/dashboard
parent9b3e156e43b8a14e4eb294a47bda6a477c8573b0 (diff)
downloadgitlab-ce-7e4258777f8eed31cfe202bb96178823218f3b1c.tar.gz
Move Profile groups tests to Dashboard group tests
Diffstat (limited to 'features/dashboard')
-rw-r--r--features/dashboard/group.feature48
1 files changed, 48 insertions, 0 deletions
diff --git a/features/dashboard/group.feature b/features/dashboard/group.feature
new file mode 100644
index 00000000000..0e4acb325b7
--- /dev/null
+++ b/features/dashboard/group.feature
@@ -0,0 +1,48 @@
+@dashboard
+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 dashboard 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 dashboard 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 dashboard 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 dashboard 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 dashboard 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 dashboard 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 dashboard groups page
+ Then I should see group "Owned" in group list
+ Then I should not see group "Guest" in group list