summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorAndrey Kumanyaev <me@zzet.org>2012-12-26 02:52:49 +0400
committerAndrey Kumanyaev <me@zzet.org>2012-12-26 19:52:15 +0400
commit25c57637807bac79037c4d791979951bf13ed056 (patch)
tree131a592a32b3e580bdc2859c9aef7ea486f2af40 /features
parent9c574464a6051536ee83a93e8270a7dd9d85da33 (diff)
downloadgitlab-ce-25c57637807bac79037c4d791979951bf13ed056.tar.gz
Add functional in user section
Diffstat (limited to 'features')
-rw-r--r--features/group/group.feature7
-rw-r--r--features/steps/group/group.rb19
-rw-r--r--features/steps/shared/paths.rb4
3 files changed, 30 insertions, 0 deletions
diff --git a/features/group/group.feature b/features/group/group.feature
index 07308112270..4b8483bd361 100644
--- a/features/group/group.feature
+++ b/features/group/group.feature
@@ -17,3 +17,10 @@ Feature: Groups
Given project from group has merge requests assigned to me
When I visit group merge requests page
Then I should see merge requests from this group assigned to me
+
+ Scenario: I should add user to projects in Group
+ Given I have new user "John"
+ When I visit group page
+ When I visit group people page
+ When I select user "John" from list with role "Reporter"
+ Then I should see user "John" in team list
diff --git a/features/steps/group/group.rb b/features/steps/group/group.rb
index 4de260ec33e..03693852072 100644
--- a/features/steps/group/group.rb
+++ b/features/steps/group/group.rb
@@ -32,6 +32,25 @@ class Groups < Spinach::FeatureSteps
end
end
+ Given 'I have new user "John"' do
+ create(:user, name: "John")
+ end
+
+ When 'I select user "John" from list with role "Reporter"' do
+ user = User.find_by_name("John")
+ within "#new_team_member" do
+ select user.name, :from => "user_ids"
+ select "Reporter", :from => "project_access"
+ end
+ click_button "Add"
+ end
+
+ Then 'I should see user "John" in team list' do
+ user = User.find_by_name("John")
+ projects_with_access = find(".ui-box .well-list li")
+ projects_with_access.should have_content("John")
+ end
+
Given 'project from group has issues assigned to me' do
create :issue,
project: project,
diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb
index a12576288df..bd43ba6b3dc 100644
--- a/features/steps/shared/paths.rb
+++ b/features/steps/shared/paths.rb
@@ -21,6 +21,10 @@ module SharedPaths
visit merge_requests_group_path(current_group)
end
+ When 'I visit group people page' do
+ visit people_group_path(current_group)
+ end
+
# ----------------------------------------
# Dashboard
# ----------------------------------------