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
Léo-Paul Géneau
gitlab-ce
Commits
1faf67f0
Commit
1faf67f0
authored
Aug 10, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests for infinite scrolling lists
parent
f60a030e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
spec/features/boards/boards_spec.rb
spec/features/boards/boards_spec.rb
+44
-0
No files found.
spec/features/boards/boards_spec.rb
View file @
1faf67f0
...
...
@@ -93,6 +93,25 @@ describe 'Issue Boards', feature: true, js: true do
expect
(
page
).
to
have_selector
(
'.board'
,
count:
3
)
end
it
'infinite scrolls list'
do
50
.
times
do
create
(
:issue
,
project:
project
)
end
visit
namespace_project_board_path
(
project
.
namespace
,
project
)
sleep
1
page
.
within
(
first
(
'.board'
))
do
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'20'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
20
)
evaluate_script
(
"document.querySelectorAll('.board .board-list')[0].scrollTop = document.querySelectorAll('.board .board-list')[0].scrollHeight"
)
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'40'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
40
)
end
end
context
'backlog'
do
it
'shows issues in backlog with no labels'
do
page
.
within
(
first
(
'.board'
))
do
...
...
@@ -334,6 +353,31 @@ describe 'Issue Boards', feature: true, js: true do
end
end
it
'infinite scrolls list with label filter'
do
50
.
times
do
create
(
:labeled_issue
,
project:
project
,
labels:
[
testing
])
end
page
.
within
'.issues-filters'
do
click_button
(
'Label'
)
page
.
within
'.dropdown-menu-labels'
do
click_link
(
testing
.
title
)
find
(
'.dropdown-menu-close'
).
click
end
end
page
.
within
(
first
(
'.board'
))
do
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'20'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
20
)
evaluate_script
(
"document.querySelectorAll('.board .board-list')[0].scrollTop = document.querySelectorAll('.board .board-list')[0].scrollHeight"
)
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'40'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
40
)
end
end
it
'filters by multiple labels'
do
page
.
within
'.issues-filters'
do
click_button
(
'Label'
)
...
...
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