diff options
Diffstat (limited to 'spec/frontend/boards/components/board_filtered_search_spec.js')
-rw-r--r-- | spec/frontend/boards/components/board_filtered_search_spec.js | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/spec/frontend/boards/components/board_filtered_search_spec.js b/spec/frontend/boards/components/board_filtered_search_spec.js index b858d6e95a0..ea551e94f2f 100644 --- a/spec/frontend/boards/components/board_filtered_search_spec.js +++ b/spec/frontend/boards/components/board_filtered_search_spec.js @@ -18,7 +18,7 @@ describe('BoardFilteredSearch', () => { { icon: 'labels', title: __('Label'), - type: 'label_name', + type: 'label', operators: [ { value: '=', description: 'is' }, { value: '!=', description: 'is not' }, @@ -31,7 +31,7 @@ describe('BoardFilteredSearch', () => { { icon: 'pencil', title: __('Author'), - type: 'author_username', + type: 'author', operators: [ { value: '=', description: 'is' }, { value: '!=', description: 'is not' }, @@ -97,7 +97,7 @@ describe('BoardFilteredSearch', () => { createComponent({ props: { eeFilters: { labelName: ['label'] } } }); expect(findFilteredSearch().props('initialFilterValue')).toEqual([ - { type: 'label_name', value: { data: 'label', operator: '=' } }, + { type: 'label', value: { data: 'label', operator: '=' } }, ]); }); }); @@ -117,12 +117,14 @@ describe('BoardFilteredSearch', () => { it('sets the url params to the correct results', async () => { const mockFilters = [ - { type: 'author_username', value: { data: 'root', operator: '=' } }, - { type: 'label_name', value: { data: 'label', operator: '=' } }, - { type: 'label_name', value: { data: 'label2', operator: '=' } }, - { type: 'milestone_title', value: { data: 'New Milestone', operator: '=' } }, - { type: 'types', value: { data: 'INCIDENT', operator: '=' } }, + { type: 'author', value: { data: 'root', operator: '=' } }, + { type: 'label', value: { data: 'label', operator: '=' } }, + { type: 'label', value: { data: 'label2', operator: '=' } }, + { type: 'milestone', value: { data: 'New Milestone', operator: '=' } }, + { type: 'type', value: { data: 'INCIDENT', operator: '=' } }, { type: 'weight', value: { data: '2', operator: '=' } }, + { type: 'iteration', value: { data: '3341', operator: '=' } }, + { type: 'release', value: { data: 'v1.0.0', operator: '=' } }, ]; jest.spyOn(urlUtility, 'updateHistory'); findFilteredSearch().vm.$emit('onFilter', mockFilters); @@ -131,7 +133,7 @@ describe('BoardFilteredSearch', () => { title: '', replace: true, url: - 'http://test.host/?author_username=root&label_name[]=label&label_name[]=label2&milestone_title=New+Milestone&types=INCIDENT&weight=2', + 'http://test.host/?author_username=root&label_name[]=label&label_name[]=label2&milestone_title=New+Milestone&iteration_id=3341&types=INCIDENT&weight=2&release_tag=v1.0.0', }); }); }); @@ -145,8 +147,8 @@ describe('BoardFilteredSearch', () => { it('passes the correct props to FilterSearchBar', () => { expect(findFilteredSearch().props('initialFilterValue')).toEqual([ - { type: 'author_username', value: { data: 'root', operator: '=' } }, - { type: 'label_name', value: { data: 'label', operator: '=' } }, + { type: 'author', value: { data: 'root', operator: '=' } }, + { type: 'label', value: { data: 'label', operator: '=' } }, ]); }); }); |