Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
4e5b3d9a
Commit
4e5b3d9a
authored
Jun 18, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixin tests
parent
48019f1a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
6 deletions
+20
-6
app/views/admin/groups/show.html.haml
app/views/admin/groups/show.html.haml
+2
-2
features/steps/admin/admin_groups.rb
features/steps/admin/admin_groups.rb
+1
-1
features/steps/project/project_team_management.rb
features/steps/project/project_team_management.rb
+17
-3
No files found.
app/views/admin/groups/show.html.haml
View file @
4e5b3d9a
...
...
@@ -65,7 +65,7 @@
.span6
.ui-box
%h5
.title
Add user
to the group
:
Add user
(s)
:
.ui-box-body.form-holder
%p
.light
Read more about project permissions
...
...
@@ -77,7 +77,7 @@
%div
.prepend-top-10
=
select_tag
:project_access
,
options_for_select
(
Project
.
access_options
),
{
class:
"project-access-select chosen span2"
}
%hr
=
submit_tag
'Add user
to the
group'
,
class:
"btn btn-create"
=
submit_tag
'Add user
s into
group'
,
class:
"btn btn-create"
.ui-box
%h5
.title
Users from
#{
@group
.
name
}
Group
...
...
features/steps/admin/admin_groups.rb
View file @
4e5b3d9a
...
...
@@ -45,7 +45,7 @@ class AdminGroups < Spinach::FeatureSteps
within
"#new_team_member"
do
select
"Reporter"
,
from:
"project_access"
end
click_button
"Add user
to projects in
group"
click_button
"Add user
s into
group"
end
Then
'I should see "John" in team list in every project as "Reporter"'
do
...
...
features/steps/project/project_team_management.rb
View file @
4e5b3d9a
...
...
@@ -30,14 +30,20 @@ class ProjectTeamManagement < Spinach::FeatureSteps
end
Then
'I should see "Mike" in team list as "Reporter"'
do
within
'.reporters'
do
user
=
User
.
find_by_name
(
"Mike"
)
within
"#user_
#{
user
.
id
}
"
do
page
.
should
have_content
(
'Mike'
)
page
.
find
(
'#team_member_project_access'
).
value
.
should
==
access_value
(
:reporter
)
end
end
Given
'I should see "Sam" in team list as "Developer"'
do
within
'.developers'
do
user
=
User
.
find_by_name
(
"Sam"
)
within
"#user_
#{
user
.
id
}
"
do
page
.
should
have_content
(
'Sam'
)
page
.
find
(
'#team_member_project_access'
).
value
.
should
==
access_value
(
:developer
)
end
end
...
...
@@ -49,8 +55,10 @@ class ProjectTeamManagement < Spinach::FeatureSteps
end
And
'I should see "Sam" in team list as "Reporter"'
do
within
'.reporters'
do
user
=
User
.
find_by_name
(
"Sam"
)
within
".user_
#{
user
.
id
}
"
do
page
.
should
have_content
(
'Sam'
)
page
.
find
(
'#team_member_project_access'
).
value
.
should
==
access_value
(
:reporter
)
end
end
...
...
@@ -103,4 +111,10 @@ class ProjectTeamManagement < Spinach::FeatureSteps
click_link
(
'Remove user from team'
)
end
end
private
def
access_value
(
key
)
UsersProject
.
roles_hash
[
key
].
to_s
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment