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
Jérome Perrin
gitlab-ce
Commits
b7e2be24
Commit
b7e2be24
authored
Mar 30, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix adding new members to group
parent
3371e40b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
1 deletion
+35
-1
app/views/groups/group_members/_new_group_member.html.haml
app/views/groups/group_members/_new_group_member.html.haml
+1
-1
features/groups.feature
features/groups.feature
+8
-0
features/steps/groups.rb
features/steps/groups.rb
+26
-0
No files found.
app/views/groups/group_members/_new_group_member.html.haml
View file @
b7e2be24
=
form_for
@group_member
,
url:
group_group_members_path
(
@group
),
html:
{
class:
'form-horizontal users-group-form'
}
do
|
f
|
=
form_for
@group_member
,
url:
group_group_members_path
(
@group
),
html:
{
class:
'form-horizontal users-group-form'
}
do
|
f
|
.form-group
.form-group
=
f
.
label
:user_ids
,
"People"
,
class:
'control-label'
=
f
.
label
:user_ids
,
"People"
,
class:
'control-label'
.col-sm-10
=
users_select_tag
(
:user_ids
,
multiple:
true
,
class:
'input-large'
)
.col-sm-10
=
users_select_tag
(
:user_ids
,
multiple:
true
,
class:
'input-large'
,
scope: :all
)
.form-group
.form-group
=
f
.
label
:access_level
,
"Group Access"
,
class:
'control-label'
=
f
.
label
:access_level
,
"Group Access"
,
class:
'control-label'
...
...
features/groups.feature
View file @
b7e2be24
...
@@ -47,6 +47,14 @@ Feature: Groups
...
@@ -47,6 +47,14 @@ Feature: Groups
Then
I should not see group
"Owned"
avatar
Then
I should not see group
"Owned"
avatar
And
I should not see the
"Remove avatar"
button
And
I should not see the
"Remove avatar"
button
@javascript
Scenario
:
Add user to group
Given
gitlab user
"Mike"
When
I visit group
"Owned"
members page
And
I click link
"Add members"
When
I select
"Mike"
as
"Reporter"
Then
I should see
"Mike"
in team list as
"Reporter"
# Leave
# Leave
@javascript
@javascript
...
...
features/steps/groups.rb
View file @
b7e2be24
...
@@ -5,6 +5,32 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
...
@@ -5,6 +5,32 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
include
SharedUser
include
SharedUser
include
Select2Helper
include
Select2Helper
step
'gitlab user "Mike"'
do
create
(
:user
,
name:
"Mike"
)
end
step
'I click link "Add members"'
do
find
(
:css
,
'button.btn-new'
).
click
end
step
'I select "Mike" as "Reporter"'
do
user
=
User
.
find_by
(
name:
"Mike"
)
within
".users-group-form"
do
select2
(
user
.
id
,
from:
"#user_ids"
,
multiple:
true
)
select
"Reporter"
,
from:
"access_level"
end
click_button
"Add users to group"
end
step
'I should see "Mike" in team list as "Reporter"'
do
within
'.well-list'
do
page
.
should
have_content
(
'Mike'
)
page
.
should
have_content
(
'Reporter'
)
end
end
step
'I should see group "Owned" projects list'
do
step
'I should see group "Owned" projects list'
do
Group
.
find_by
(
name:
"Owned"
).
projects
.
each
do
|
project
|
Group
.
find_by
(
name:
"Owned"
).
projects
.
each
do
|
project
|
page
.
should
have_link
project
.
name
page
.
should
have_link
project
.
name
...
...
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