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
23bfa7a3
Commit
23bfa7a3
authored
Mar 23, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update milestone spec
parent
84f124a1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
12 deletions
+42
-12
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
+41
-11
No files found.
app/views/shared/issuable/_filter.html.haml
View file @
23bfa7a3
...
...
@@ -41,7 +41,7 @@
=
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"
,
=
dropdown_tag
(
"Milestone"
,
options:
{
title:
"Assign milestone"
,
toggle_class:
'js-milestone-select'
,
filter:
true
,
dropdown_class:
"dropdown-menu-selectable
dropdown-menu-milestone
"
,
placeholder:
"Search milestones"
,
data:
{
show_no:
true
,
field_name:
"update[milestone_id]"
,
project_id:
@project
.
id
,
milestones:
namespace_project_milestones_path
(
@project
.
namespace
,
@project
,
:json
),
use_id:
true
}
})
=
hidden_field_tag
'update[issues_ids]'
,
[]
=
hidden_field_tag
:state_event
,
params
[
:state_event
]
...
...
spec/features/issues/update_issues_spec.rb
View file @
23bfa7a3
...
...
@@ -5,12 +5,12 @@ feature 'Multiple issue updating from issues#index', feature: true do
let!
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let!
(
:user
)
{
create
(
:user
)}
context
'status update'
,
js:
true
do
before
do
project
.
team
<<
[
user
,
:master
]
login_as
(
user
)
end
context
'status'
,
js:
true
do
it
'should be set to closed'
do
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
...
...
@@ -37,12 +37,7 @@ 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
context
'assignee'
,
js:
true
do
it
'should update to current user'
do
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
...
...
@@ -73,6 +68,37 @@ feature 'Multiple issue updating from issues#index', feature: true do
end
end
context
'milestone'
,
js:
true
do
let
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
it
'should update milestone'
do
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
find
(
'#check_all_issues'
).
click
find
(
'.issues_bulk_update .js-milestone-select'
).
click
find
(
'.dropdown-menu-milestone a'
,
text:
milestone
.
title
).
click
click_update_issues_button
expect
(
find
(
'.issue'
)).
to
have_content
milestone
.
title
end
it
'should set to no milestone'
do
create_with_milestone
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
expect
(
first
(
'.issue'
)).
to
have_content
milestone
.
title
find
(
'#check_all_issues'
).
click
find
(
'.issues_bulk_update .js-milestone-select'
).
click
find
(
'.dropdown-menu-milestone a'
,
text:
"No Milestone"
).
click
click_update_issues_button
expect
(
first
(
'.issue'
)).
to_not
have_content
milestone
.
title
end
end
def
create_closed
create
(
:issue
,
project:
project
,
state: :closed
)
end
...
...
@@ -81,6 +107,10 @@ feature 'Multiple issue updating from issues#index', feature: true do
create
(
:issue
,
project:
project
,
assignee:
user
)
end
def
create_with_milestone
create
(
:issue
,
project:
project
,
milestone:
milestone
)
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