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
ed9bf0b1
Commit
ed9bf0b1
authored
Aug 18, 2016
by
Ruben Davila
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'ce/8-11-stable' into 8-11-stable-ee
parents
dd217c35
d774ba35
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
7 deletions
+33
-7
app/assets/javascripts/boards/vue_resource_interceptor.js.es6
...assets/javascripts/boards/vue_resource_interceptor.js.es6
+5
-3
app/views/shared/issuable/_filter.html.haml
app/views/shared/issuable/_filter.html.haml
+3
-3
spec/features/boards/boards_spec.rb
spec/features/boards/boards_spec.rb
+25
-1
No files found.
app/assets/javascripts/boards/vue_resource_interceptor.js.es6
View file @
ed9bf0b1
Vue.http.interceptors.push((request, next) => {
Vue.activeResources = Vue.activeResources ? Vue.activeResources + 1 : 1;
setTimeout(() => {
Vue.activeResources--;
}, 500);
Vue.nextTick(() => {
setTimeout(() => {
Vue.activeResources--;
}, 500);
});
next();
});
app/views/shared/issuable/_filter.html.haml
View file @
ed9bf0b1
...
...
@@ -39,9 +39,7 @@
=
weight
.pull-right
-
if
controller
.
controller_name
!=
'boards'
=
render
'shared/sort_dropdown'
-
if
can?
(
current_user
,
:admin_list
,
@project
)
-
if
controller
.
controller_name
==
'boards'
&&
can?
(
current_user
,
:admin_list
,
@project
)
.dropdown
%button
.btn.btn-create.js-new-board-list
{
type:
"button"
,
data:
{
toggle:
"dropdown"
,
labels:
labels_filter_path
,
project_id:
@project
.
try
(
:id
)
}
}
Create new list
...
...
@@ -50,6 +48,8 @@
-
if
can?
(
current_user
,
:admin_label
,
@project
)
=
render
partial:
"shared/issuable/label_page_create"
=
dropdown_loading
-
else
=
render
'shared/sort_dropdown'
-
if
controller
.
controller_name
==
'issues'
.issues_bulk_update.hide
...
...
spec/features/boards/boards_spec.rb
View file @
ed9bf0b1
...
...
@@ -147,6 +147,7 @@ describe 'Issue Boards', feature: true, js: true do
expect
(
page
).
to
have_selector
(
'.card'
,
count:
20
)
evaluate_script
(
"document.querySelectorAll('.board .board-list')[0].scrollTop = document.querySelectorAll('.board .board-list')[0].scrollHeight"
)
wait_for_vue_resource
(
spinner:
false
)
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'40'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
40
)
...
...
@@ -165,6 +166,8 @@ describe 'Issue Boards', feature: true, js: true do
page
.
within
(
find
(
'.board'
,
match: :first
))
do
find
(
'.form-control'
).
set
issue1
.
title
wait_for_vue_resource
(
spinner:
false
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
1
)
end
end
...
...
@@ -176,7 +179,11 @@ describe 'Issue Boards', feature: true, js: true do
expect
(
page
).
to
have_selector
(
'.card'
,
count:
1
)
find
(
'.board-search-clear-btn'
).
click
end
wait_for_vue_resource
page
.
within
(
find
(
'.board'
,
match: :first
))
do
expect
(
page
).
to
have_selector
(
'.card'
,
count:
6
)
end
end
...
...
@@ -189,6 +196,8 @@ describe 'Issue Boards', feature: true, js: true do
expect
(
page
).
to
have_selector
(
'.card'
,
count:
5
)
end
wait_for_vue_resource
page
.
within
(
find
(
'.board:nth-child(2)'
))
do
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'3'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
3
)
...
...
@@ -263,6 +272,7 @@ describe 'Issue Boards', feature: true, js: true do
context
'new list'
do
it
'shows all labels in new list dropdown'
do
click_button
'Create new list'
wait_for_ajax
page
.
within
(
'.dropdown-menu-issues-board-new'
)
do
expect
(
page
).
to
have_content
(
planning
.
title
)
...
...
@@ -273,6 +283,7 @@ describe 'Issue Boards', feature: true, js: true do
it
'creates new list for label'
do
click_button
'Create new list'
wait_for_ajax
page
.
within
(
'.dropdown-menu-issues-board-new'
)
do
click_link
testing
.
title
...
...
@@ -285,6 +296,7 @@ describe 'Issue Boards', feature: true, js: true do
it
'creates new list for Backlog label'
do
click_button
'Create new list'
wait_for_ajax
page
.
within
(
'.dropdown-menu-issues-board-new'
)
do
click_link
backlog
.
title
...
...
@@ -297,6 +309,7 @@ describe 'Issue Boards', feature: true, js: true do
it
'creates new list for Done label'
do
click_button
'Create new list'
wait_for_ajax
page
.
within
(
'.dropdown-menu-issues-board-new'
)
do
click_link
done
.
title
...
...
@@ -314,6 +327,7 @@ describe 'Issue Boards', feature: true, js: true do
end
click_button
'Create new list'
wait_for_ajax
page
.
within
(
'.dropdown-menu-issues-board-new'
)
do
click_link
testing
.
title
...
...
@@ -333,6 +347,7 @@ describe 'Issue Boards', feature: true, js: true do
it
'filters by author'
do
page
.
within
'.issues-filters'
do
click_button
(
'Author'
)
wait_for_ajax
page
.
within
'.dropdown-menu-author'
do
click_link
(
user2
.
name
)
...
...
@@ -358,6 +373,7 @@ describe 'Issue Boards', feature: true, js: true do
it
'filters by assignee'
do
page
.
within
'.issues-filters'
do
click_button
(
'Assignee'
)
wait_for_ajax
page
.
within
'.dropdown-menu-assignee'
do
click_link
(
user
.
name
)
...
...
@@ -383,6 +399,7 @@ describe 'Issue Boards', feature: true, js: true do
it
'filters by milestone'
do
page
.
within
'.issues-filters'
do
click_button
(
'Milestone'
)
wait_for_ajax
page
.
within
'.milestone-filter'
do
click_link
(
milestone
.
title
)
...
...
@@ -408,6 +425,7 @@ describe 'Issue Boards', feature: true, js: true do
it
'filters by label'
do
page
.
within
'.issues-filters'
do
click_button
(
'Label'
)
wait_for_ajax
page
.
within
'.dropdown-menu-labels'
do
click_link
(
testing
.
title
)
...
...
@@ -436,6 +454,7 @@ describe 'Issue Boards', feature: true, js: true do
page
.
within
'.issues-filters'
do
click_button
(
'Label'
)
wait_for_ajax
page
.
within
'.dropdown-menu-labels'
do
click_link
(
testing
.
title
)
...
...
@@ -460,8 +479,9 @@ describe 'Issue Boards', feature: true, js: true do
it
'filters by multiple labels'
do
page
.
within
'.issues-filters'
do
click_button
(
'Label'
)
wait_for_ajax
page
.
within
'.dropdown-menu-labels'
do
page
.
within
(
find
(
'.dropdown-menu-labels'
))
do
click_link
(
testing
.
title
)
wait_for_vue_resource
(
spinner:
false
)
click_link
(
bug
.
title
)
...
...
@@ -486,6 +506,7 @@ describe 'Issue Boards', feature: true, js: true do
it
'filters by no label'
do
page
.
within
'.issues-filters'
do
click_button
(
'Label'
)
wait_for_ajax
page
.
within
'.dropdown-menu-labels'
do
click_link
(
"No Label"
)
...
...
@@ -510,10 +531,13 @@ describe 'Issue Boards', feature: true, js: true do
it
'filters by clicking label button on issue'
do
page
.
within
(
find
(
'.board'
,
match: :first
))
do
expect
(
page
).
to
have_selector
(
'.card'
,
count:
6
)
expect
(
find
(
'.card'
,
match: :first
)).
to
have_content
(
bug
.
title
)
click_button
(
bug
.
title
)
wait_for_vue_resource
(
spinner:
false
)
end
wait_for_vue_resource
page
.
within
(
find
(
'.board'
,
match: :first
))
do
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'1'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
1
)
...
...
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