Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-22 06:10:36 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-22 06:10:36 +0300
commit65da49eb0103df6d7b1401db94e5d322b6766df2 (patch)
tree4d1b3cff3a0e0c542c93526d7a6722c464ac9f20 /spec/frontend/boards/board_list_spec.js
parent1b3785910ee36281a08f968e0ac1af892bb96dd0 (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.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/spec/frontend/boards/board_list_spec.js b/spec/frontend/boards/board_list_spec.js
index 290c668cd75..ef5cc4c3cd1 100644
--- a/spec/frontend/boards/board_list_spec.js
+++ b/spec/frontend/boards/board_list_spec.js
@@ -1,8 +1,9 @@
-import { createLocalVue, mount } from '@vue/test-utils';
+import { createLocalVue, shallowMount } from '@vue/test-utils';
import Vuex from 'vuex';
import { useFakeRequestAnimationFrame } from 'helpers/fake_request_animation_frame';
import BoardCard from '~/boards/components/board_card.vue';
import BoardList from '~/boards/components/board_list.vue';
+import BoardNewIssue from '~/boards/components/board_new_issue.vue';
import eventHub from '~/boards/eventhub';
import defaultState from '~/boards/stores/state';
import { mockList, mockIssuesByListId, issues, mockIssues } from './mock_data';
@@ -38,6 +39,7 @@ const createComponent = ({
'gid://gitlab/List/1': {},
'gid://gitlab/List/2': {},
},
+ selectedBoardItems: [],
...state,
});
@@ -58,7 +60,7 @@ const createComponent = ({
list.issuesCount = 1;
}
- const component = mount(BoardList, {
+ const component = shallowMount(BoardList, {
localVue,
propsData: {
disabled: false,
@@ -74,6 +76,10 @@ const createComponent = ({
weightFeatureAvailable: false,
boardWeight: null,
},
+ stubs: {
+ BoardCard,
+ BoardNewIssue,
+ },
});
return component;
@@ -81,7 +87,10 @@ const createComponent = ({
describe('Board list component', () => {
let wrapper;
+
const findByTestId = (testId) => wrapper.find(`[data-testid="${testId}"]`);
+ const findIssueCountLoadingIcon = () => wrapper.find('[data-testid="count-loading-icon"]');
+
useFakeRequestAnimationFrame();
afterEach(() => {
@@ -189,7 +198,8 @@ describe('Board list component', () => {
wrapper.vm.showCount = true;
await wrapper.vm.$nextTick();
- expect(wrapper.find('.board-list-count .gl-spinner').exists()).toBe(true);
+
+ expect(findIssueCountLoadingIcon().exists()).toBe(true);
});
});