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
1
Merge Requests
1
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
nexedi
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
19 deletions
+5
-19
app/views/team_members/_team_member.html.haml
app/views/team_members/_team_member.html.haml
+1
-1
features/steps/project/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
-
user
=
member
.
user
-
allow_admin
=
current_user_can_admin_project
-
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
.pull-right
-
if
allow_admin
-
if
allow_admin
.pull-left
.pull-left
...
...
features/steps/project/project_team_management.rb
View file @
d274ca38
...
@@ -30,35 +30,27 @@ class ProjectTeamManagement < Spinach::FeatureSteps
...
@@ -30,35 +30,27 @@ class ProjectTeamManagement < Spinach::FeatureSteps
end
end
Then
'I should see "Mike" in team list as "Reporter"'
do
Then
'I should see "Mike" in team list as "Reporter"'
do
user
=
User
.
find_by_name
(
"Mike"
)
within
".access-reporter"
do
within
"#user_
#{
user
.
id
}
"
do
page
.
should
have_content
(
'Mike'
)
page
.
should
have_content
(
'Mike'
)
page
.
find
(
'#team_member_project_access'
).
value
.
should
==
access_value
(
:reporter
)
end
end
end
end
Given
'I should see "Sam" in team list as "Developer"'
do
Given
'I should see "Sam" in team list as "Developer"'
do
user
=
User
.
find_by_name
(
"Sam"
)
within
".access-developer"
do
within
"#user_
#{
user
.
id
}
"
do
page
.
should
have_content
(
'Sam'
)
page
.
should
have_content
(
'Sam'
)
page
.
find
(
'#team_member_project_access'
).
value
.
should
==
access_value
(
:developer
)
end
end
end
end
And
'I change "Sam" role to "Reporter"'
do
And
'I change "Sam" role to "Reporter"'
do
user
=
User
.
find_by_name
(
"Sam"
)
user
=
User
.
find_by_name
(
"Sam"
)
within
"
.
user_
#{
user
.
id
}
"
do
within
"
#
user_
#{
user
.
id
}
"
do
select
"Reporter"
,
from:
"team_member_project_access"
select
"Reporter"
,
from:
"team_member_project_access"
end
end
end
end
And
'I should see "Sam" in team list as "Reporter"'
do
And
'I should see "Sam" in team list as "Reporter"'
do
user
=
User
.
find_by_name
(
"Sam"
)
within
".access-reporter"
do
within
".user_
#{
user
.
id
}
"
do
page
.
should
have_content
(
'Sam'
)
page
.
should
have_content
(
'Sam'
)
page
.
find
(
'#team_member_project_access'
).
value
.
should
==
access_value
(
:reporter
)
end
end
end
end
...
@@ -111,10 +103,4 @@ class ProjectTeamManagement < Spinach::FeatureSteps
...
@@ -111,10 +103,4 @@ class ProjectTeamManagement < Spinach::FeatureSteps
click_link
(
'Remove user from team'
)
click_link
(
'Remove user from team'
)
end
end
end
end
private
def
access_value
(
key
)
UsersProject
.
roles_hash
[
key
].
to_s
end
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