BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
d274ca38
Commit
d274ca38
authored
Jun 19, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix random failing tests with project teams
parent
6e35acef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
19 deletions
+5
-19
_team_member.html.haml
app/views/team_members/_team_member.html.haml
+1
-1
project_team_management.rb
features/steps/project/project_team_management.rb
+4
-18
No files found.
app/views/team_members/_team_member.html.haml
View file @
d274ca38
-
user
=
member
.
user
-
allow_admin
=
current_user_can_admin_project
%li
{
id:
dom_id
(
user
),
class:
"team_member_row
user_#{user.id
}"
}
%li
{
id:
dom_id
(
user
),
class:
"team_member_row
access-#{member.human_access.downcase
}"
}
.pull-right
-
if
allow_admin
.pull-left
...
...
features/steps/project/project_team_management.rb
View file @
d274ca38
...
...
@@ -30,35 +30,27 @@ class ProjectTeamManagement < Spinach::FeatureSteps
end
Then
'I should see "Mike" in team list as "Reporter"'
do
user
=
User
.
find_by_name
(
"Mike"
)
within
"#user_
#{
user
.
id
}
"
do
within
".access-reporter"
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
user
=
User
.
find_by_name
(
"Sam"
)
within
"#user_
#{
user
.
id
}
"
do
within
".access-developer"
do
page
.
should
have_content
(
'Sam'
)
page
.
find
(
'#team_member_project_access'
).
value
.
should
==
access_value
(
:developer
)
end
end
And
'I change "Sam" role to "Reporter"'
do
user
=
User
.
find_by_name
(
"Sam"
)
within
"
.
user_
#{
user
.
id
}
"
do
within
"
#
user_
#{
user
.
id
}
"
do
select
"Reporter"
,
from:
"team_member_project_access"
end
end
And
'I should see "Sam" in team list as "Reporter"'
do
user
=
User
.
find_by_name
(
"Sam"
)
within
".user_
#{
user
.
id
}
"
do
within
".access-reporter"
do
page
.
should
have_content
(
'Sam'
)
page
.
find
(
'#team_member_project_access'
).
value
.
should
==
access_value
(
:reporter
)
end
end
...
...
@@ -111,10 +103,4 @@ 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