diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 12:12:43 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 12:12:43 +0300 |
commit | c2afac6a378d1aaaa7448892d042cdb59ee2c290 (patch) | |
tree | c624974ccaa54f42570ae505357ce6c86a7cb42d /spec/frontend/boards/components | |
parent | e020b4e98e8e51f1dc65dc32c5189b83585cbe81 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/boards/components')
-rw-r--r-- | spec/frontend/boards/components/issue_board_filtered_search_spec.js | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/spec/frontend/boards/components/issue_board_filtered_search_spec.js b/spec/frontend/boards/components/issue_board_filtered_search_spec.js index b6de46f8db8..6f71949260e 100644 --- a/spec/frontend/boards/components/issue_board_filtered_search_spec.js +++ b/spec/frontend/boards/components/issue_board_filtered_search_spec.js @@ -9,28 +9,33 @@ jest.mock('~/boards/issue_board_filters'); describe('IssueBoardFilter', () => { let wrapper; - const createComponent = () => { + const createComponent = ({ epicFeatureAvailable = false } = {}) => { wrapper = shallowMount(IssueBoardFilteredSpec, { - props: { fullPath: '', boardType: '' }, + propsData: { fullPath: 'gitlab-org', boardType: 'group' }, + provide: { + epicFeatureAvailable, + }, }); }; + let fetchAuthorsSpy; + let fetchLabelsSpy; + beforeEach(() => { + fetchAuthorsSpy = jest.fn(); + fetchLabelsSpy = jest.fn(); + + issueBoardFilters.mockReturnValue({ + fetchAuthors: fetchAuthorsSpy, + fetchLabels: fetchLabelsSpy, + }); + }); + afterEach(() => { wrapper.destroy(); }); describe('default', () => { - let fetchAuthorsSpy; - let fetchLabelsSpy; beforeEach(() => { - fetchAuthorsSpy = jest.fn(); - fetchLabelsSpy = jest.fn(); - - issueBoardFilters.mockReturnValue({ - fetchAuthors: fetchAuthorsSpy, - fetchLabels: fetchLabelsSpy, - }); - createComponent(); }); |