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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
84f124a1
Commit
84f124a1
authored
Mar 23, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assignee tests
parent
7e2806a1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
1 deletion
+41
-1
app/views/shared/issuable/_filter.html.haml
app/views/shared/issuable/_filter.html.haml
+1
-1
spec/features/issues/update_issues_spec.rb
spec/features/issues/update_issues_spec.rb
+40
-0
No files found.
app/views/shared/issuable/_filter.html.haml
View file @
84f124a1
...
...
@@ -38,7 +38,7 @@
%li
%a
{
href:
"#"
,
data:
{
id:
"close"
}}
Closed
.filter-item.inline
=
dropdown_tag
(
"Assignee"
,
options:
{
toggle_class:
"js-user-search"
,
title:
"Assign to"
,
filter:
true
,
dropdown_class:
"dropdown-menu-user dropdown-menu-selectable"
,
=
dropdown_tag
(
"Assignee"
,
options:
{
toggle_class:
"js-user-search
js-update-assignee
"
,
title:
"Assign to"
,
filter:
true
,
dropdown_class:
"dropdown-menu-user dropdown-menu-selectable"
,
placeholder:
"Search authors"
,
data:
{
first_user:
(
current_user
.
username
if
current_user
),
null_user:
true
,
current_user:
true
,
project_id:
@project
.
id
,
field_name:
"update[assignee_id]"
}
})
.filter-item.inline
=
dropdown_tag
(
"Milestone"
,
options:
{
title:
"Assign milestone"
,
toggle_class:
'js-milestone-select'
,
filter:
true
,
dropdown_class:
"dropdown-menu-selectable"
,
...
...
spec/features/issues/update_issues_spec.rb
View file @
84f124a1
...
...
@@ -37,10 +37,50 @@ feature 'Multiple issue updating from issues#index', feature: true do
end
end
context
'assignee update'
,
js:
true
do
before
do
project
.
team
<<
[
user
,
:master
]
login_as
(
user
)
end
it
'should update to current user'
do
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
find
(
'#check_all_issues'
).
click
find
(
'.js-update-assignee'
).
click
find
(
'.dropdown-menu-user-link'
,
text:
user
.
username
).
click
click_update_issues_button
page
.
within
(
'.issue .controls'
)
do
expect
(
find
(
'.author_link'
)[
"data-original-title"
]).
to
have_content
(
user
.
name
)
end
end
it
'should update to unassigned'
do
create_assigned
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
find
(
'#check_all_issues'
).
click
find
(
'.js-update-assignee'
).
click
find
(
'.dropdown-menu-user-link'
,
text:
"Unassigned"
).
click
click_update_issues_button
within
first
(
'.issue .controls'
)
do
expect
(
page
).
to
have_no_selector
(
'.author_link'
)
end
end
end
def
create_closed
create
(
:issue
,
project:
project
,
state: :closed
)
end
def
create_assigned
create
(
:issue
,
project:
project
,
assignee:
user
)
end
def
click_update_issues_button
find
(
'.update_selected_issues'
).
click
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