diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-16 12:13:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-16 12:13:21 +0300 |
commit | 2c90b9b579fbfe3db191a032d2cb176761605a02 (patch) | |
tree | d9819280a1ec64ff82c31ce6081e00745a9648b4 /spec/frontend/boards/components | |
parent | ccca6cec346d169fa2521c390760af9bd885ea77 (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 | 26 |
1 files changed, 20 insertions, 6 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 200469b3f2a..45c5c87d800 100644 --- a/spec/frontend/boards/components/issue_board_filtered_search_spec.js +++ b/spec/frontend/boards/components/issue_board_filtered_search_spec.js @@ -11,11 +11,11 @@ describe('IssueBoardFilter', () => { const findBoardsFilteredSearch = () => wrapper.findComponent(BoardFilteredSearch); - const createComponent = ({ epicFeatureAvailable = false } = {}) => { + const createComponent = ({ isSignedIn = false } = {}) => { wrapper = shallowMount(IssueBoardFilteredSpec, { propsData: { fullPath: 'gitlab-org', boardType: 'group' }, provide: { - epicFeatureAvailable, + isSignedIn, }, }); }; @@ -45,10 +45,24 @@ describe('IssueBoardFilter', () => { expect(findBoardsFilteredSearch().exists()).toBe(true); }); - it('passes the correct tokens to BoardFilteredSearch', () => { - const tokens = mockTokens(fetchLabelsSpy, fetchAuthorsSpy, wrapper.vm.fetchMilestones); + it.each` + isSignedIn + ${true} + ${false} + `( + 'passes the correct tokens to BoardFilteredSearch when user sign in is $isSignedIn', + ({ isSignedIn }) => { + createComponent({ isSignedIn }); - expect(findBoardsFilteredSearch().props('tokens')).toEqual(tokens); - }); + const tokens = mockTokens( + fetchLabelsSpy, + fetchAuthorsSpy, + wrapper.vm.fetchMilestones, + isSignedIn, + ); + + expect(findBoardsFilteredSearch().props('tokens')).toEqual(tokens); + }, + ); }); }); |