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
11988c5f
Commit
11988c5f
authored
Jun 01, 2021
by
Natalia Tepluhina
Committed by
Simon Knox
Jun 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed intersection observer behavior on boards list
parent
933ce128
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
13 deletions
+31
-13
app/assets/javascripts/boards/components/board_list.vue
app/assets/javascripts/boards/components/board_list.vue
+1
-1
spec/features/boards/boards_spec.rb
spec/features/boards/boards_spec.rb
+30
-12
No files found.
app/assets/javascripts/boards/components/board_list.vue
View file @
11988c5f
...
@@ -239,7 +239,7 @@ export default {
...
@@ -239,7 +239,7 @@ export default {
data-testid=
"count-loading-icon"
data-testid=
"count-loading-icon"
/>
/>
<span
v-if=
"showingAllItems"
>
{{
showingAllItemsText
}}
</span>
<span
v-if=
"showingAllItems"
>
{{
showingAllItemsText
}}
</span>
<gl-intersection-observer
v-else
@
update
=
"onReachingListBottom"
>
<gl-intersection-observer
v-else
@
appear
=
"onReachingListBottom"
>
<span>
{{
paginatedIssueText
}}
</span>
<span>
{{
paginatedIssueText
}}
</span>
</gl-intersection-observer>
</gl-intersection-observer>
</li>
</li>
...
...
spec/features/boards/boards_spec.rb
View file @
11988c5f
...
@@ -147,14 +147,23 @@ RSpec.describe 'Project issue boards', :js do
...
@@ -147,14 +147,23 @@ RSpec.describe 'Project issue boards', :js do
end
end
it
'infinite scrolls list'
do
it
'infinite scrolls list'
do
create_list
(
:labeled_issue
,
5
0
,
project:
project
,
labels:
[
planning
])
create_list
(
:labeled_issue
,
3
0
,
project:
project
,
labels:
[
planning
])
visit_project_board_path_without_query_limit
(
project
,
board
)
visit_project_board_path_without_query_limit
(
project
,
board
)
page
.
within
(
find
(
'.board:nth-child(2)'
))
do
page
.
within
(
find
(
'.board:nth-child(2)'
))
do
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'58'
)
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'38'
)
expect
(
page
).
to
have_selector
(
'.board-card'
,
count:
10
)
expect
(
page
).
to
have_content
(
'Showing 10 of 38 issues'
)
find
(
'.board .board-list'
)
inspect_requests
(
inject_headers:
{
'X-GITLAB-DISABLE-SQL-QUERY-LIMIT'
=>
'https://gitlab.com/gitlab-org/gitlab/-/issues/323426'
})
do
evaluate_script
(
"document.querySelectorAll('.board .board-list')[1].scrollTop = document.querySelectorAll('.board .board-list')[1].scrollHeight"
)
end
expect
(
page
).
to
have_selector
(
'.board-card'
,
count:
20
)
expect
(
page
).
to
have_selector
(
'.board-card'
,
count:
20
)
expect
(
page
).
to
have_content
(
'Showing 20 of
5
8 issues'
)
expect
(
page
).
to
have_content
(
'Showing 20 of
3
8 issues'
)
find
(
'.board .board-list'
)
find
(
'.board .board-list'
)
...
@@ -162,8 +171,8 @@ RSpec.describe 'Project issue boards', :js do
...
@@ -162,8 +171,8 @@ RSpec.describe 'Project issue boards', :js do
evaluate_script
(
"document.querySelectorAll('.board .board-list')[1].scrollTop = document.querySelectorAll('.board .board-list')[1].scrollHeight"
)
evaluate_script
(
"document.querySelectorAll('.board .board-list')[1].scrollTop = document.querySelectorAll('.board .board-list')[1].scrollHeight"
)
end
end
expect
(
page
).
to
have_selector
(
'.board-card'
,
count:
4
0
)
expect
(
page
).
to
have_selector
(
'.board-card'
,
count:
3
0
)
expect
(
page
).
to
have_content
(
'Showing
40 of 5
8 issues'
)
expect
(
page
).
to
have_content
(
'Showing
30 of 3
8 issues'
)
find
(
'.board .board-list'
)
find
(
'.board .board-list'
)
...
@@ -171,7 +180,7 @@ RSpec.describe 'Project issue boards', :js do
...
@@ -171,7 +180,7 @@ RSpec.describe 'Project issue boards', :js do
evaluate_script
(
"document.querySelectorAll('.board .board-list')[1].scrollTop = document.querySelectorAll('.board .board-list')[1].scrollHeight"
)
evaluate_script
(
"document.querySelectorAll('.board .board-list')[1].scrollTop = document.querySelectorAll('.board .board-list')[1].scrollHeight"
)
end
end
expect
(
page
).
to
have_selector
(
'.board-card'
,
count:
5
8
)
expect
(
page
).
to
have_selector
(
'.board-card'
,
count:
3
8
)
expect
(
page
).
to
have_content
(
'Showing all issues'
)
expect
(
page
).
to
have_content
(
'Showing all issues'
)
end
end
end
end
...
@@ -464,7 +473,7 @@ RSpec.describe 'Project issue boards', :js do
...
@@ -464,7 +473,7 @@ RSpec.describe 'Project issue boards', :js do
end
end
it
'infinite scrolls list with label filter'
do
it
'infinite scrolls list with label filter'
do
create_list
(
:labeled_issue
,
5
0
,
project:
project
,
labels:
[
planning
,
testing
])
create_list
(
:labeled_issue
,
3
0
,
project:
project
,
labels:
[
planning
,
testing
])
set_filter
(
"label"
,
testing
.
title
)
set_filter
(
"label"
,
testing
.
title
)
click_filter_link
(
testing
.
title
)
click_filter_link
(
testing
.
title
)
...
@@ -475,9 +484,18 @@ RSpec.describe 'Project issue boards', :js do
...
@@ -475,9 +484,18 @@ RSpec.describe 'Project issue boards', :js do
wait_for_requests
wait_for_requests
page
.
within
(
find
(
'.board:nth-child(2)'
))
do
page
.
within
(
find
(
'.board:nth-child(2)'
))
do
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'51'
)
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'31'
)
expect
(
page
).
to
have_selector
(
'.board-card'
,
count:
10
)
expect
(
page
).
to
have_content
(
'Showing 10 of 31 issues'
)
find
(
'.board .board-list'
)
inspect_requests
(
inject_headers:
{
'X-GITLAB-DISABLE-SQL-QUERY-LIMIT'
=>
'https://gitlab.com/gitlab-org/gitlab/-/issues/323426'
})
do
evaluate_script
(
"document.querySelectorAll('.board .board-list')[1].scrollTop = document.querySelectorAll('.board .board-list')[1].scrollHeight"
)
end
expect
(
page
).
to
have_selector
(
'.board-card'
,
count:
20
)
expect
(
page
).
to
have_selector
(
'.board-card'
,
count:
20
)
expect
(
page
).
to
have_content
(
'Showing 20 of
5
1 issues'
)
expect
(
page
).
to
have_content
(
'Showing 20 of
3
1 issues'
)
find
(
'.board .board-list'
)
find
(
'.board .board-list'
)
...
@@ -485,15 +503,15 @@ RSpec.describe 'Project issue boards', :js do
...
@@ -485,15 +503,15 @@ RSpec.describe 'Project issue boards', :js do
evaluate_script
(
"document.querySelectorAll('.board .board-list')[1].scrollTop = document.querySelectorAll('.board .board-list')[1].scrollHeight"
)
evaluate_script
(
"document.querySelectorAll('.board .board-list')[1].scrollTop = document.querySelectorAll('.board .board-list')[1].scrollHeight"
)
end
end
expect
(
page
).
to
have_selector
(
'.board-card'
,
count:
4
0
)
expect
(
page
).
to
have_selector
(
'.board-card'
,
count:
3
0
)
expect
(
page
).
to
have_content
(
'Showing
40 of 5
1 issues'
)
expect
(
page
).
to
have_content
(
'Showing
30 of 3
1 issues'
)
find
(
'.board .board-list'
)
find
(
'.board .board-list'
)
inspect_requests
(
inject_headers:
{
'X-GITLAB-DISABLE-SQL-QUERY-LIMIT'
=>
'https://gitlab.com/gitlab-org/gitlab/-/issues/323426'
})
do
inspect_requests
(
inject_headers:
{
'X-GITLAB-DISABLE-SQL-QUERY-LIMIT'
=>
'https://gitlab.com/gitlab-org/gitlab/-/issues/323426'
})
do
evaluate_script
(
"document.querySelectorAll('.board .board-list')[1].scrollTop = document.querySelectorAll('.board .board-list')[1].scrollHeight"
)
evaluate_script
(
"document.querySelectorAll('.board .board-list')[1].scrollTop = document.querySelectorAll('.board .board-list')[1].scrollHeight"
)
end
end
expect
(
page
).
to
have_selector
(
'.board-card'
,
count:
5
1
)
expect
(
page
).
to
have_selector
(
'.board-card'
,
count:
3
1
)
expect
(
page
).
to
have_content
(
'Showing all issues'
)
expect
(
page
).
to
have_content
(
'Showing all issues'
)
end
end
end
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