diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-09 12:11:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-09 12:11:03 +0300 |
commit | 3d233a67cf4ab39773e3ee10a09df9eb7c3b4167 (patch) | |
tree | 66a33a656fb9d69c5e11e56cc5c7d20f2f5d064d /spec/frontend/boards/board_list_spec.js | |
parent | 130e0444c6e5498ea95d38dd96bf758a724e2345 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/boards/board_list_spec.js')
-rw-r--r-- | spec/frontend/boards/board_list_spec.js | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/spec/frontend/boards/board_list_spec.js b/spec/frontend/boards/board_list_spec.js index 6f623eab1af..1981ed5ab7f 100644 --- a/spec/frontend/boards/board_list_spec.js +++ b/spec/frontend/boards/board_list_spec.js @@ -38,7 +38,7 @@ describe('Board list component', () => { describe('When Expanded', () => { beforeEach(() => { - wrapper = createComponent(); + wrapper = createComponent({ issuesCount: 1 }); }); it('renders component', () => { @@ -97,14 +97,6 @@ describe('Board list component', () => { await wrapper.vm.$nextTick(); expect(wrapper.find('.board-list-count').attributes('data-issue-id')).toBe('-1'); }); - - it('shows how many more issues to load', async () => { - wrapper.vm.showCount = true; - wrapper.setProps({ list: { issuesCount: 20 } }); - - await wrapper.vm.$nextTick(); - expect(wrapper.find('.board-list-count').text()).toBe('Showing 1 of 20 issues'); - }); }); describe('load more issues', () => { @@ -113,9 +105,7 @@ describe('Board list component', () => { }; beforeEach(() => { - wrapper = createComponent({ - listProps: { issuesCount: 25 }, - }); + wrapper = createComponent(); }); it('does not load issues if already loading', () => { @@ -131,13 +121,27 @@ describe('Board list component', () => { it('shows loading more spinner', async () => { wrapper = createComponent({ state: { listsFlags: { 'gid://gitlab/List/1': { isLoadingMore: true } } }, + data: { + showCount: true, + }, }); - wrapper.vm.showCount = true; await wrapper.vm.$nextTick(); expect(findIssueCountLoadingIcon().exists()).toBe(true); }); + + it('shows how many more issues to load', async () => { + // wrapper.vm.showCount = true; + wrapper = createComponent({ + data: { + showCount: true, + }, + }); + + await wrapper.vm.$nextTick(); + expect(wrapper.find('.board-list-count').text()).toBe('Showing 1 of 20 issues'); + }); }); describe('max issue count warning', () => { |