summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-08-19 20:23:56 +0100
committerPhil Hughes <me@iamphill.com>2016-08-31 09:47:25 +0100
commit105c80b6be3ae0bb550f455d0fcb1d4fe34462b5 (patch)
tree01e152ca5c13e8874e2bb1d3977857a841125401 /spec
parent4f341ed85b5fb37250799ec13948bbe88074d376 (diff)
downloadgitlab-ce-105c80b6be3ae0bb550f455d0fcb1d4fe34462b5.tar.gz
Shows count at bottom of list
Only visible when scrollable area is larger than height
Diffstat (limited to 'spec')
-rw-r--r--spec/features/boards/boards_spec.rb15
-rw-r--r--spec/javascripts/boards/mock_data.js.es615
2 files changed, 24 insertions, 6 deletions
diff --git a/spec/features/boards/boards_spec.rb b/spec/features/boards/boards_spec.rb
index e150610b3eb..c6c2e2095df 100644
--- a/spec/features/boards/boards_spec.rb
+++ b/spec/features/boards/boards_spec.rb
@@ -184,11 +184,19 @@ describe 'Issue Boards', feature: true, js: true do
page.within(find('.board', match: :first)) do
expect(page.find('.board-header')).to have_content('56')
expect(page).to have_selector('.card', count: 20)
+ expect(page).to have_content('Showing 20 of 56 issues')
evaluate_script("document.querySelectorAll('.board .board-list')[0].scrollTop = document.querySelectorAll('.board .board-list')[0].scrollHeight")
wait_for_vue_resource(spinner: false)
expect(page).to have_selector('.card', count: 40)
+ expect(page).to have_content('Showing 40 of 56 issues')
+
+ evaluate_script("document.querySelectorAll('.board .board-list')[0].scrollTop = document.querySelectorAll('.board .board-list')[0].scrollHeight")
+ wait_for_vue_resource(spinner: false)
+
+ expect(page).to have_selector('.card', count: 56)
+ expect(page).to have_content('Showing all issues')
end
end
@@ -480,10 +488,17 @@ describe 'Issue Boards', feature: true, js: true do
page.within(find('.board', match: :first)) do
expect(page.find('.board-header')).to have_content('51')
expect(page).to have_selector('.card', count: 20)
+ expect(page).to have_content('Showing 20 of 51 issues')
evaluate_script("document.querySelectorAll('.board .board-list')[0].scrollTop = document.querySelectorAll('.board .board-list')[0].scrollHeight")
expect(page).to have_selector('.card', count: 40)
+ expect(page).to have_content('Showing 40 of 51 issues')
+
+ evaluate_script("document.querySelectorAll('.board .board-list')[0].scrollTop = document.querySelectorAll('.board .board-list')[0].scrollHeight")
+
+ expect(page).to have_selector('.card', count: 51)
+ expect(page).to have_content('Showing all issues')
end
end
diff --git a/spec/javascripts/boards/mock_data.js.es6 b/spec/javascripts/boards/mock_data.js.es6
index 0c37ec8354f..f3797ed44d4 100644
--- a/spec/javascripts/boards/mock_data.js.es6
+++ b/spec/javascripts/boards/mock_data.js.es6
@@ -26,12 +26,15 @@ const listObjDuplicate = {
const BoardsMockData = {
'GET': {
- '/test/issue-boards/board/lists{/id}/issues': [{
- title: 'Testing',
- iid: 1,
- confidential: false,
- labels: []
- }]
+ '/test/issue-boards/board/lists{/id}/issues': {
+ issues: [{
+ title: 'Testing',
+ iid: 1,
+ confidential: false,
+ labels: []
+ }],
+ size: 1
+ }
},
'POST': {
'/test/issue-boards/board/lists{/id}': listObj