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
Tatuya Kamada
gitlab-ce
Commits
c4fc17f2
Commit
c4fc17f2
authored
Jan 27, 2017
by
Phil Hughes
Committed by
Fatih Acet
Feb 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Boards spec update to take into account removed backlog
parent
f99a1edf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
146 deletions
+73
-146
app/assets/javascripts/boards/components/issue_card_inner.js.es6
...ets/javascripts/boards/components/issue_card_inner.js.es6
+1
-1
spec/features/boards/boards_spec.rb
spec/features/boards/boards_spec.rb
+72
-145
No files found.
app/assets/javascripts/boards/components/issue_card_inner.js.es6
View file @
c4fc17f2
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
<div>
<div>
<h4 class="card-title">
<h4 class="card-title">
<i
<i
class="fa fa-eye-
flash
"
class="fa fa-eye-
slash confidential-icon
"
v-if="issue.confidential"></i>
v-if="issue.confidential"></i>
<a
<a
:href="issueLinkBase + '/' + issue.id"
:href="issueLinkBase + '/' + issue.id"
...
...
spec/features/boards/boards_spec.rb
View file @
c4fc17f2
...
@@ -20,7 +20,7 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -20,7 +20,7 @@ describe 'Issue Boards', feature: true, js: true do
before
do
before
do
visit
namespace_project_board_path
(
project
.
namespace
,
project
,
board
)
visit
namespace_project_board_path
(
project
.
namespace
,
project
,
board
)
wait_for_vue_resource
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'.board'
,
count:
3
)
expect
(
page
).
to
have_selector
(
'.board'
,
count:
2
)
end
end
it
'shows blank state'
do
it
'shows blank state'
do
...
@@ -31,18 +31,18 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -31,18 +31,18 @@ describe 'Issue Boards', feature: true, js: true do
page
.
within
(
find
(
'.board-blank-state'
))
do
page
.
within
(
find
(
'.board-blank-state'
))
do
click_button
(
"Nevermind, I'll use my own"
)
click_button
(
"Nevermind, I'll use my own"
)
end
end
expect
(
page
).
to
have_selector
(
'.board'
,
count:
2
)
expect
(
page
).
to
have_selector
(
'.board'
,
count:
1
)
end
end
it
'creates default lists'
do
it
'creates default lists'
do
lists
=
[
'
Backlog'
,
'
To Do'
,
'Doing'
,
'Done'
]
lists
=
[
'To Do'
,
'Doing'
,
'Done'
]
page
.
within
(
find
(
'.board-blank-state'
))
do
page
.
within
(
find
(
'.board-blank-state'
))
do
click_button
(
'Add default lists'
)
click_button
(
'Add default lists'
)
end
end
wait_for_vue_resource
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'.board'
,
count:
4
)
expect
(
page
).
to
have_selector
(
'.board'
,
count:
3
)
page
.
all
(
'.board'
).
each_with_index
do
|
list
,
i
|
page
.
all
(
'.board'
).
each_with_index
do
|
list
,
i
|
expect
(
list
.
find
(
'.board-title'
)).
to
have_content
(
lists
[
i
])
expect
(
list
.
find
(
'.board-title'
)).
to
have_content
(
lists
[
i
])
...
@@ -64,42 +64,41 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -64,42 +64,41 @@ describe 'Issue Boards', feature: true, js: true do
let!
(
:list1
)
{
create
(
:list
,
board:
board
,
label:
planning
,
position:
0
)
}
let!
(
:list1
)
{
create
(
:list
,
board:
board
,
label:
planning
,
position:
0
)
}
let!
(
:list2
)
{
create
(
:list
,
board:
board
,
label:
development
,
position:
1
)
}
let!
(
:list2
)
{
create
(
:list
,
board:
board
,
label:
development
,
position:
1
)
}
let!
(
:confidential_issue
)
{
create
(
:
issue
,
:confidential
,
project:
project
,
author:
user
)
}
let!
(
:confidential_issue
)
{
create
(
:
labeled_issue
,
:confidential
,
project:
project
,
author:
user
,
labels:
[
planning
]
)
}
let!
(
:issue1
)
{
create
(
:
issue
,
project:
project
,
assignee:
user
)
}
let!
(
:issue1
)
{
create
(
:
labeled_issue
,
project:
project
,
assignee:
user
,
labels:
[
planning
]
)
}
let!
(
:issue2
)
{
create
(
:
issue
,
project:
project
,
author:
user2
)
}
let!
(
:issue2
)
{
create
(
:
labeled_issue
,
project:
project
,
author:
user2
,
labels:
[
planning
]
)
}
let!
(
:issue3
)
{
create
(
:
issue
,
project:
project
)
}
let!
(
:issue3
)
{
create
(
:
labeled_issue
,
project:
project
,
labels:
[
planning
]
)
}
let!
(
:issue4
)
{
create
(
:
issue
,
project:
project
)
}
let!
(
:issue4
)
{
create
(
:
labeled_issue
,
project:
project
,
labels:
[
planning
]
)
}
let!
(
:issue5
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
planning
],
milestone:
milestone
)
}
let!
(
:issue5
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
planning
],
milestone:
milestone
)
}
let!
(
:issue6
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
planning
,
development
])
}
let!
(
:issue6
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
planning
,
development
])
}
let!
(
:issue7
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
development
])
}
let!
(
:issue7
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
development
])
}
let!
(
:issue8
)
{
create
(
:closed_issue
,
project:
project
)
}
let!
(
:issue8
)
{
create
(
:closed_issue
,
project:
project
)
}
let!
(
:issue9
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
testing
,
bug
,
accepting
])
}
let!
(
:issue9
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
planning
,
testing
,
bug
,
accepting
])
}
before
do
before
do
visit
namespace_project_board_path
(
project
.
namespace
,
project
,
board
)
visit
namespace_project_board_path
(
project
.
namespace
,
project
,
board
)
wait_for_vue_resource
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'.board'
,
count:
4
)
expect
(
page
).
to
have_selector
(
'.board'
,
count:
3
)
expect
(
find
(
'.board:nth-child(1)'
)).
to
have_selector
(
'.card'
)
expect
(
find
(
'.board:nth-child(1)'
)).
to
have_selector
(
'.card'
)
expect
(
find
(
'.board:nth-child(2)'
)).
to
have_selector
(
'.card'
)
expect
(
find
(
'.board:nth-child(2)'
)).
to
have_selector
(
'.card'
)
expect
(
find
(
'.board:nth-child(3)'
)).
to
have_selector
(
'.card'
)
expect
(
find
(
'.board:nth-child(3)'
)).
to
have_selector
(
'.card'
)
expect
(
find
(
'.board:nth-child(4)'
)).
to
have_selector
(
'.card'
)
end
end
it
'shows lists'
do
it
'shows lists'
do
expect
(
page
).
to
have_selector
(
'.board'
,
count:
4
)
expect
(
page
).
to
have_selector
(
'.board'
,
count:
3
)
end
end
it
'shows description tooltip on list title'
do
it
'shows description tooltip on list title'
do
page
.
within
(
'.board:nth-child(
2
)'
)
do
page
.
within
(
'.board:nth-child(
1
)'
)
do
expect
(
find
(
'.board-title span.has-tooltip'
)[
:title
]).
to
eq
(
'Test'
)
expect
(
find
(
'.board-title span.has-tooltip'
)[
:title
]).
to
eq
(
'Test'
)
end
end
end
end
it
'shows issues in lists'
do
it
'shows issues in lists'
do
wait_for_board_cards
(
1
,
8
)
wait_for_board_cards
(
2
,
2
)
wait_for_board_cards
(
2
,
2
)
wait_for_board_cards
(
3
,
2
)
end
end
it
'shows confidential issues with icon'
do
it
'shows confidential issues with icon'
do
...
@@ -108,19 +107,6 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -108,19 +107,6 @@ describe 'Issue Boards', feature: true, js: true do
end
end
end
end
it
'search backlog list'
do
page
.
within
(
'#js-boards-search'
)
do
find
(
'.form-control'
).
set
(
issue1
.
title
)
end
wait_for_vue_resource
expect
(
find
(
'.board:nth-child(1)'
)).
to
have_selector
(
'.card'
,
count:
1
)
expect
(
find
(
'.board:nth-child(2)'
)).
to
have_selector
(
'.card'
,
count:
0
)
expect
(
find
(
'.board:nth-child(3)'
)).
to
have_selector
(
'.card'
,
count:
0
)
expect
(
find
(
'.board:nth-child(4)'
)).
to
have_selector
(
'.card'
,
count:
0
)
end
it
'search done list'
do
it
'search done list'
do
page
.
within
(
'#js-boards-search'
)
do
page
.
within
(
'#js-boards-search'
)
do
find
(
'.form-control'
).
set
(
issue8
.
title
)
find
(
'.form-control'
).
set
(
issue8
.
title
)
...
@@ -130,8 +116,7 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -130,8 +116,7 @@ describe 'Issue Boards', feature: true, js: true do
expect
(
find
(
'.board:nth-child(1)'
)).
to
have_selector
(
'.card'
,
count:
0
)
expect
(
find
(
'.board:nth-child(1)'
)).
to
have_selector
(
'.card'
,
count:
0
)
expect
(
find
(
'.board:nth-child(2)'
)).
to
have_selector
(
'.card'
,
count:
0
)
expect
(
find
(
'.board:nth-child(2)'
)).
to
have_selector
(
'.card'
,
count:
0
)
expect
(
find
(
'.board:nth-child(3)'
)).
to
have_selector
(
'.card'
,
count:
0
)
expect
(
find
(
'.board:nth-child(3)'
)).
to
have_selector
(
'.card'
,
count:
1
)
expect
(
find
(
'.board:nth-child(4)'
)).
to
have_selector
(
'.card'
,
count:
1
)
end
end
it
'search list'
do
it
'search list'
do
...
@@ -141,157 +126,135 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -141,157 +126,135 @@ describe 'Issue Boards', feature: true, js: true do
wait_for_vue_resource
wait_for_vue_resource
expect
(
find
(
'.board:nth-child(1)'
)).
to
have_selector
(
'.card'
,
count:
0
)
expect
(
find
(
'.board:nth-child(1)'
)).
to
have_selector
(
'.card'
,
count:
1
)
expect
(
find
(
'.board:nth-child(2)'
)).
to
have_selector
(
'.card'
,
count:
1
)
expect
(
find
(
'.board:nth-child(2)'
)).
to
have_selector
(
'.card'
,
count:
0
)
expect
(
find
(
'.board:nth-child(3)'
)).
to
have_selector
(
'.card'
,
count:
0
)
expect
(
find
(
'.board:nth-child(3)'
)).
to
have_selector
(
'.card'
,
count:
0
)
expect
(
find
(
'.board:nth-child(4)'
)).
to
have_selector
(
'.card'
,
count:
0
)
end
end
it
'allows user to delete board'
do
it
'allows user to delete board'
do
page
.
within
(
find
(
'.board:nth-child(
2
)'
))
do
page
.
within
(
find
(
'.board:nth-child(
1
)'
))
do
find
(
'.board-delete'
).
click
find
(
'.board-delete'
).
click
end
end
wait_for_vue_resource
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'.board'
,
count:
3
)
expect
(
page
).
to
have_selector
(
'.board'
,
count:
2
)
end
end
it
'removes checkmark in new list dropdown after deleting'
do
it
'removes checkmark in new list dropdown after deleting'
do
click_button
'Add list'
click_button
'Add list'
wait_for_ajax
wait_for_ajax
page
.
within
(
find
(
'.board:nth-child(
2
)'
))
do
page
.
within
(
find
(
'.board:nth-child(
1
)'
))
do
find
(
'.board-delete'
).
click
find
(
'.board-delete'
).
click
end
end
wait_for_vue_resource
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'.board'
,
count:
3
)
expect
(
page
).
to
have_selector
(
'.board'
,
count:
2
)
expect
(
find
(
".js-board-list-
#{
planning
.
id
}
"
,
visible:
false
)).
not_to
have_css
(
'.is-active'
)
end
end
it
'infinite scrolls list'
do
it
'infinite scrolls list'
do
50
.
times
do
50
.
times
do
create
(
:
issue
,
project:
project
)
create
(
:
labeled_issue
,
project:
project
,
labels:
[
planning
]
)
end
end
visit
namespace_project_board_path
(
project
.
namespace
,
project
,
board
)
visit
namespace_project_board_path
(
project
.
namespace
,
project
,
board
)
wait_for_vue_resource
wait_for_vue_resource
page
.
within
(
find
(
'.board'
,
match: :first
))
do
page
.
within
(
find
(
'.board'
,
match: :first
))
do
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'5
6
'
)
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'5
8
'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
20
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
20
)
expect
(
page
).
to
have_content
(
'Showing 20 of 5
6
issues'
)
expect
(
page
).
to
have_content
(
'Showing 20 of 5
8
issues'
)
evaluate_script
(
"document.querySelectorAll('.board .board-list')[0].scrollTop = document.querySelectorAll('.board .board-list')[0].scrollHeight"
)
evaluate_script
(
"document.querySelectorAll('.board .board-list')[0].scrollTop = document.querySelectorAll('.board .board-list')[0].scrollHeight"
)
wait_for_vue_resource
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'.card'
,
count:
40
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
40
)
expect
(
page
).
to
have_content
(
'Showing 40 of 5
6
issues'
)
expect
(
page
).
to
have_content
(
'Showing 40 of 5
8
issues'
)
evaluate_script
(
"document.querySelectorAll('.board .board-list')[0].scrollTop = document.querySelectorAll('.board .board-list')[0].scrollHeight"
)
evaluate_script
(
"document.querySelectorAll('.board .board-list')[0].scrollTop = document.querySelectorAll('.board .board-list')[0].scrollHeight"
)
wait_for_vue_resource
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'.card'
,
count:
5
6
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
5
8
)
expect
(
page
).
to
have_content
(
'Showing all issues'
)
expect
(
page
).
to
have_content
(
'Showing all issues'
)
end
end
end
end
context
'backlog'
do
it
'shows issues in backlog with no labels'
do
wait_for_board_cards
(
1
,
6
)
end
it
'moves issue from backlog into list'
do
drag_to
(
list_to_index:
1
)
wait_for_vue_resource
wait_for_board_cards
(
1
,
5
)
wait_for_board_cards
(
2
,
3
)
end
end
context
'done'
do
context
'done'
do
it
'shows list of done issues'
do
it
'shows list of done issues'
do
wait_for_board_cards
(
4
,
1
)
wait_for_board_cards
(
3
,
1
)
wait_for_ajax
wait_for_ajax
end
end
it
'moves issue to done'
do
it
'moves issue to done'
do
drag_to
(
list_from_index:
0
,
list_to_index:
3
)
drag_to
(
list_from_index:
0
,
list_to_index:
2
)
wait_for_board_cards
(
1
,
5
)
wait_for_board_cards
(
1
,
7
)
wait_for_board_cards
(
2
,
2
)
wait_for_board_cards
(
2
,
2
)
wait_for_board_cards
(
3
,
2
)
wait_for_board_cards
(
3
,
2
)
wait_for_board_cards
(
4
,
2
)
expect
(
find
(
'.board:nth-child(1)'
)).
not_to
have_content
(
issue9
.
title
)
expect
(
find
(
'.board:nth-child(1)'
)).
not_to
have_content
(
issue9
.
title
)
expect
(
find
(
'.board:nth-child(
4
)'
)).
to
have_selector
(
'.card'
,
count:
2
)
expect
(
find
(
'.board:nth-child(
3
)'
)).
to
have_selector
(
'.card'
,
count:
2
)
expect
(
find
(
'.board:nth-child(
4
)'
)).
to
have_content
(
issue9
.
title
)
expect
(
find
(
'.board:nth-child(
3
)'
)).
to
have_content
(
issue9
.
title
)
expect
(
find
(
'.board:nth-child(
4
)'
)).
not_to
have_content
(
planning
.
title
)
expect
(
find
(
'.board:nth-child(
3
)'
)).
not_to
have_content
(
planning
.
title
)
end
end
it
'removes all of the same issue to done'
do
it
'removes all of the same issue to done'
do
drag_to
(
list_from_index:
1
,
list_to_index:
3
)
drag_to
(
list_from_index:
0
,
list_to_index:
2
)
wait_for_board_cards
(
1
,
6
)
wait_for_board_cards
(
1
,
7
)
wait_for_board_cards
(
2
,
1
)
wait_for_board_cards
(
2
,
2
)
wait_for_board_cards
(
3
,
1
)
wait_for_board_cards
(
3
,
2
)
wait_for_board_cards
(
4
,
2
)
expect
(
find
(
'.board:nth-child(
2)'
)).
not_to
have_content
(
issue6
.
title
)
expect
(
find
(
'.board:nth-child(
1)'
)).
not_to
have_content
(
issue9
.
title
)
expect
(
find
(
'.board:nth-child(
4)'
)).
to
have_content
(
issue6
.
title
)
expect
(
find
(
'.board:nth-child(
3)'
)).
to
have_content
(
issue9
.
title
)
expect
(
find
(
'.board:nth-child(
4
)'
)).
not_to
have_content
(
planning
.
title
)
expect
(
find
(
'.board:nth-child(
3
)'
)).
not_to
have_content
(
planning
.
title
)
end
end
end
end
context
'lists'
do
context
'lists'
do
it
'changes position of list'
do
it
'changes position of list'
do
drag_to
(
list_from_index:
1
,
list_to_index:
2
,
selector:
'.board-header'
)
drag_to
(
list_from_index:
1
,
list_to_index:
0
,
selector:
'.board-header'
)
wait_for_board_cards
(
1
,
6
)
wait_for_board_cards
(
1
,
2
)
wait_for_board_cards
(
2
,
2
)
wait_for_board_cards
(
2
,
8
)
wait_for_board_cards
(
3
,
2
)
wait_for_board_cards
(
3
,
1
)
wait_for_board_cards
(
4
,
1
)
expect
(
find
(
'.board:nth-child(
2
)'
)).
to
have_content
(
development
.
title
)
expect
(
find
(
'.board:nth-child(
1
)'
)).
to
have_content
(
development
.
title
)
expect
(
find
(
'.board:nth-child(
2
)'
)).
to
have_content
(
planning
.
title
)
expect
(
find
(
'.board:nth-child(
1
)'
)).
to
have_content
(
planning
.
title
)
end
end
it
'issue moves between lists'
do
it
'issue moves between lists'
do
drag_to
(
list_from_index:
1
,
card_index:
1
,
list_to_index:
2
)
drag_to
(
list_from_index:
0
,
card_index:
1
,
list_to_index:
1
)
wait_for_board_cards
(
1
,
6
)
wait_for_board_cards
(
1
,
7
)
wait_for_board_cards
(
2
,
1
)
wait_for_board_cards
(
2
,
2
)
wait_for_board_cards
(
3
,
3
)
wait_for_board_cards
(
3
,
1
)
wait_for_board_cards
(
4
,
1
)
expect
(
find
(
'.board:nth-child(
3
)'
)).
to
have_content
(
issue6
.
title
)
expect
(
find
(
'.board:nth-child(
2
)'
)).
to
have_content
(
issue6
.
title
)
expect
(
find
(
'.board:nth-child(
3
)'
).
all
(
'.card'
).
last
).
not_to
have_content
(
development
.
title
)
expect
(
find
(
'.board:nth-child(
2
)'
).
all
(
'.card'
).
last
).
not_to
have_content
(
development
.
title
)
end
end
it
'issue moves between lists'
do
it
'issue moves between lists'
do
drag_to
(
list_from_index:
2
,
list_to_index:
1
)
drag_to
(
list_from_index:
1
,
list_to_index:
0
)
wait_for_board_cards
(
1
,
6
)
wait_for_board_cards
(
1
,
9
)
wait_for_board_cards
(
2
,
3
)
wait_for_board_cards
(
2
,
1
)
wait_for_board_cards
(
3
,
1
)
wait_for_board_cards
(
3
,
1
)
wait_for_board_cards
(
4
,
1
)
expect
(
find
(
'.board:nth-child(
2
)'
)).
to
have_content
(
issue7
.
title
)
expect
(
find
(
'.board:nth-child(
1
)'
)).
to
have_content
(
issue7
.
title
)
expect
(
find
(
'.board:nth-child(
2
)'
).
all
(
'.card'
).
first
).
not_to
have_content
(
planning
.
title
)
expect
(
find
(
'.board:nth-child(
1
)'
).
all
(
'.card'
).
first
).
not_to
have_content
(
planning
.
title
)
end
end
it
'issue moves from done'
do
it
'issue moves from done'
do
drag_to
(
list_from_index:
3
,
list_to_index:
1
)
drag_to
(
list_from_index:
2
,
list_to_index:
1
)
expect
(
find
(
'.board:nth-child(2)'
)).
to
have_content
(
issue8
.
title
)
expect
(
find
(
'.board:nth-child(2)'
)).
to
have_content
(
issue8
.
title
)
wait_for_board_cards
(
1
,
6
)
wait_for_board_cards
(
1
,
8
)
wait_for_board_cards
(
2
,
3
)
wait_for_board_cards
(
2
,
3
)
wait_for_board_cards
(
3
,
2
)
wait_for_board_cards
(
3
,
0
)
wait_for_board_cards
(
4
,
0
)
end
end
context
'issue card'
do
context
'issue card'
do
...
@@ -324,7 +287,7 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -324,7 +287,7 @@ describe 'Issue Boards', feature: true, js: true do
wait_for_vue_resource
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'.board'
,
count:
5
)
expect
(
page
).
to
have_selector
(
'.board'
,
count:
4
)
end
end
it
'creates new list for Backlog label'
do
it
'creates new list for Backlog label'
do
...
@@ -337,7 +300,7 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -337,7 +300,7 @@ describe 'Issue Boards', feature: true, js: true do
wait_for_vue_resource
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'.board'
,
count:
5
)
expect
(
page
).
to
have_selector
(
'.board'
,
count:
4
)
end
end
it
'creates new list for Done label'
do
it
'creates new list for Done label'
do
...
@@ -350,7 +313,7 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -350,7 +313,7 @@ describe 'Issue Boards', feature: true, js: true do
wait_for_vue_resource
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'.board'
,
count:
5
)
expect
(
page
).
to
have_selector
(
'.board'
,
count:
4
)
end
end
it
'keeps dropdown open after adding new list'
do
it
'keeps dropdown open after adding new list'
do
...
@@ -366,21 +329,6 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -366,21 +329,6 @@ describe 'Issue Boards', feature: true, js: true do
expect
(
find
(
'.issue-boards-search'
)).
to
have_selector
(
'.open'
)
expect
(
find
(
'.issue-boards-search'
)).
to
have_selector
(
'.open'
)
end
end
it
'moves issues from backlog into new list'
do
wait_for_board_cards
(
1
,
6
)
click_button
'Add list'
wait_for_ajax
page
.
within
(
'.dropdown-menu-issues-board-new'
)
do
click_link
testing
.
title
end
wait_for_vue_resource
wait_for_board_cards
(
1
,
5
)
end
it
'creates new list from a new label'
do
it
'creates new list from a new label'
do
click_button
'Add list'
click_button
'Add list'
...
@@ -397,7 +345,7 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -397,7 +345,7 @@ describe 'Issue Boards', feature: true, js: true do
wait_for_ajax
wait_for_ajax
wait_for_vue_resource
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'.board'
,
count:
5
)
expect
(
page
).
to
have_selector
(
'.board'
,
count:
4
)
end
end
end
end
end
end
...
@@ -418,7 +366,7 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -418,7 +366,7 @@ describe 'Issue Boards', feature: true, js: true do
wait_for_vue_resource
wait_for_vue_resource
wait_for_board_cards
(
1
,
1
)
wait_for_board_cards
(
1
,
1
)
wait_for_empty_boards
((
2
..
4
))
wait_for_empty_boards
((
2
..
3
))
end
end
it
'filters by assignee'
do
it
'filters by assignee'
do
...
@@ -437,7 +385,7 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -437,7 +385,7 @@ describe 'Issue Boards', feature: true, js: true do
wait_for_vue_resource
wait_for_vue_resource
wait_for_board_cards
(
1
,
1
)
wait_for_board_cards
(
1
,
1
)
wait_for_empty_boards
((
2
..
4
))
wait_for_empty_boards
((
2
..
3
))
end
end
it
'filters by milestone'
do
it
'filters by milestone'
do
...
@@ -454,10 +402,9 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -454,10 +402,9 @@ describe 'Issue Boards', feature: true, js: true do
end
end
wait_for_vue_resource
wait_for_vue_resource
wait_for_board_cards
(
1
,
0
)
wait_for_board_cards
(
1
,
1
)
wait_for_board_cards
(
2
,
1
)
wait_for_board_cards
(
2
,
0
)
wait_for_board_cards
(
3
,
0
)
wait_for_board_cards
(
3
,
0
)
wait_for_board_cards
(
4
,
0
)
end
end
it
'filters by label'
do
it
'filters by label'
do
...
@@ -474,7 +421,7 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -474,7 +421,7 @@ describe 'Issue Boards', feature: true, js: true do
wait_for_vue_resource
wait_for_vue_resource
wait_for_board_cards
(
1
,
1
)
wait_for_board_cards
(
1
,
1
)
wait_for_empty_boards
((
2
..
4
))
wait_for_empty_boards
((
2
..
3
))
end
end
it
'filters by label with space after reload'
do
it
'filters by label with space after reload'
do
...
@@ -530,7 +477,7 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -530,7 +477,7 @@ describe 'Issue Boards', feature: true, js: true do
it
'infinite scrolls list with label filter'
do
it
'infinite scrolls list with label filter'
do
50
.
times
do
50
.
times
do
create
(
:labeled_issue
,
project:
project
,
labels:
[
testing
])
create
(
:labeled_issue
,
project:
project
,
labels:
[
planning
,
testing
])
end
end
page
.
within
'.issues-filters'
do
page
.
within
'.issues-filters'
do
...
@@ -580,32 +527,12 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -580,32 +527,12 @@ describe 'Issue Boards', feature: true, js: true do
wait_for_vue_resource
wait_for_vue_resource
wait_for_board_cards
(
1
,
1
)
wait_for_board_cards
(
1
,
1
)
wait_for_empty_boards
((
2
..
4
))
wait_for_empty_boards
((
2
..
3
))
end
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"
)
wait_for_vue_resource
find
(
'.dropdown-menu-close'
).
click
end
end
wait_for_vue_resource
wait_for_board_cards
(
1
,
5
)
wait_for_board_cards
(
2
,
0
)
wait_for_board_cards
(
3
,
0
)
wait_for_board_cards
(
4
,
1
)
end
end
it
'filters by clicking label button on issue'
do
it
'filters by clicking label button on issue'
do
page
.
within
(
find
(
'.board'
,
match: :first
))
do
page
.
within
(
find
(
'.board'
,
match: :first
))
do
expect
(
page
).
to
have_selector
(
'.card'
,
count:
6
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
8
)
expect
(
find
(
'.card'
,
match: :first
)).
to
have_content
(
bug
.
title
)
expect
(
find
(
'.card'
,
match: :first
)).
to
have_content
(
bug
.
title
)
click_button
(
bug
.
title
)
click_button
(
bug
.
title
)
wait_for_vue_resource
wait_for_vue_resource
...
@@ -614,7 +541,7 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -614,7 +541,7 @@ describe 'Issue Boards', feature: true, js: true do
wait_for_vue_resource
wait_for_vue_resource
wait_for_board_cards
(
1
,
1
)
wait_for_board_cards
(
1
,
1
)
wait_for_empty_boards
((
2
..
4
))
wait_for_empty_boards
((
2
..
3
))
page
.
within
(
'.labels-filter'
)
do
page
.
within
(
'.labels-filter'
)
do
expect
(
find
(
'.dropdown-toggle-text'
)).
to
have_content
(
bug
.
title
)
expect
(
find
(
'.dropdown-toggle-text'
)).
to
have_content
(
bug
.
title
)
...
...
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