summaryrefslogtreecommitdiff
path: root/features/group
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-25 11:44:39 +0100
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-25 11:44:39 +0100
commitd262daa4f0f425ddda189ae9e2eb21bbf287f21a (patch)
treed4b8e015aedd73ada2f1096d1c3185dcce88c7a4 /features/group
parent561634c78f3ab7967709196e8cca39a256d27196 (diff)
downloadgitlab-ce-d262daa4f0f425ddda189ae9e2eb21bbf287f21a.tar.gz
Split group feature tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'features/group')
-rw-r--r--features/group/members.feature105
-rw-r--r--features/group/milestones.feature30
2 files changed, 135 insertions, 0 deletions
diff --git a/features/group/members.feature b/features/group/members.feature
new file mode 100644
index 00000000000..1f9514bac39
--- /dev/null
+++ b/features/group/members.feature
@@ -0,0 +1,105 @@
+Feature: Group Members
+ Background:
+ Given I sign in as "John Doe"
+ And "John Doe" is owner of group "Owned"
+ And "John Doe" is guest of group "Guest"
+
+ @javascript
+ Scenario: I should add user to group "Owned"
+ Given User "Mary Jane" exists
+ When I visit group "Owned" members page
+ And I select user "Mary Jane" from list with role "Reporter"
+ Then I should see user "Mary Jane" in team list
+
+ @javascript
+ Scenario: Add user to group
+ Given gitlab user "Mike"
+ When I visit group "Owned" members page
+ When I select "Mike" as "Reporter"
+ Then I should see "Mike" in team list as "Reporter"
+
+ @javascript
+ Scenario: Ignore add user to group when is already Owner
+ Given gitlab user "Mike"
+ When I visit group "Owned" members page
+ When I select "Mike" as "Reporter"
+ Then I should see "Mike" in team list as "Owner"
+
+ @javascript
+ Scenario: Invite user to group
+ When I visit group "Owned" members page
+ When I select "sjobs@apple.com" as "Reporter"
+ Then I should see "sjobs@apple.com" in team list as invited "Reporter"
+
+ @javascript
+ Scenario: Edit group member permissions
+ Given "Mary Jane" is guest of group "Owned"
+ And I visit group "Owned" members page
+ When I change the "Mary Jane" role to "Developer"
+ Then I should see "Mary Jane" as "Developer"
+
+ # Leave
+
+ @javascript
+ Scenario: Owner should be able to remove himself from group if he is not the last owner
+ Given "Mary Jane" is owner of group "Owned"
+ When I visit group "Owned" members page
+ Then I should see user "John Doe" in team list
+ Then I should see user "Mary Jane" in team list
+ When I click on the "Remove User From Group" button for "John Doe"
+ And I visit group "Owned" members page
+ Then I should not see user "John Doe" in team list
+ Then I should see user "Mary Jane" in team list
+
+ @javascript
+ Scenario: Owner should not be able to remove himself from group if he is the last owner
+ Given "Mary Jane" is guest of group "Owned"
+ When I visit group "Owned" members page
+ Then I should see user "John Doe" in team list
+ Then I should see user "Mary Jane" in team list
+ Then I should not see the "Remove User From Group" button for "John Doe"
+
+ @javascript
+ Scenario: Guest should be able to remove himself from group
+ Given "Mary Jane" is guest of group "Guest"
+ When I visit group "Guest" members page
+ Then I should see user "John Doe" in team list
+ Then I should see user "Mary Jane" in team list
+ When I click on the "Remove User From Group" button for "John Doe"
+ When I visit group "Guest" members page
+ Then I should not see user "John Doe" in team list
+ Then I should see user "Mary Jane" in team list
+
+ @javascript
+ Scenario: Guest should be able to remove himself from group even if he is the only user in the group
+ When I visit group "Guest" members page
+ Then I should see user "John Doe" in team list
+ When I click on the "Remove User From Group" button for "John Doe"
+ When I visit group "Guest" members page
+ Then I should not see user "John Doe" in team list
+
+ # Remove others
+
+ Scenario: Owner should be able to remove other users from group
+ Given "Mary Jane" is owner of group "Owned"
+ When I visit group "Owned" members page
+ Then I should see user "John Doe" in team list
+ Then I should see user "Mary Jane" in team list
+ When I click on the "Remove User From Group" button for "Mary Jane"
+ When I visit group "Owned" members page
+ Then I should see user "John Doe" in team list
+ Then I should not see user "Mary Jane" in team list
+
+ Scenario: Guest should not be able to remove other users from group
+ Given "Mary Jane" is guest of group "Guest"
+ When I visit group "Guest" members page
+ Then I should see user "John Doe" in team list
+ Then I should see user "Mary Jane" in team list
+ Then I should not see the "Remove User From Group" button for "Mary Jane"
+
+ Scenario: Search member by name
+ Given "Mary Jane" is guest of group "Guest"
+ And I visit group "Guest" members page
+ When I search for 'Mary' member
+ Then I should see user "Mary Jane" in team list
+ Then I should not see user "John Doe" in team list
diff --git a/features/group/milestones.feature b/features/group/milestones.feature
new file mode 100644
index 00000000000..62ea66a783c
--- /dev/null
+++ b/features/group/milestones.feature
@@ -0,0 +1,30 @@
+Feature: Group Milestones
+ Background:
+ Given I sign in as "John Doe"
+ And "John Doe" is owner of group "Owned"
+
+ Scenario: I should see group "Owned" milestone index page with no milestones
+ When I visit group "Owned" page
+ And I click on group milestones
+ Then I should see group milestones index page has no milestones
+
+ Scenario: I should see group "Owned" milestone index page with milestones
+ Given Group has projects with milestones
+ When I visit group "Owned" page
+ And I click on group milestones
+ Then I should see group milestones index page with milestones
+
+ Scenario: I should see group "Owned" milestone show page
+ Given Group has projects with milestones
+ When I visit group "Owned" page
+ And I click on group milestones
+ And I click on one group milestone
+ Then I should see group milestone with descriptions and expiry date
+ And I should see group milestone with all issues and MRs assigned to that milestone
+
+ Scenario: Create multiple milestones with one form
+ Given I visit group "Owned" milestones page
+ And I click new milestone button
+ And I fill milestone name
+ When I press create mileston button
+ Then milestone in each project should be created