diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-24 21:11:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-24 21:11:45 +0300 |
commit | 4bb797f25563205cf495f4dd5366e037e88831ab (patch) | |
tree | a345ddbd0e2464067323d3c6fd34960607ef4f44 /spec/frontend/search | |
parent | 40a4f37126bb1a1dd6b6f4b3c0ebb414a3e3908a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/search')
-rw-r--r-- | spec/frontend/search/sidebar/components/blobs_filters_spec.js | 39 |
1 files changed, 12 insertions, 27 deletions
diff --git a/spec/frontend/search/sidebar/components/blobs_filters_spec.js b/spec/frontend/search/sidebar/components/blobs_filters_spec.js index 729fae44c19..245ddb8f8bb 100644 --- a/spec/frontend/search/sidebar/components/blobs_filters_spec.js +++ b/spec/frontend/search/sidebar/components/blobs_filters_spec.js @@ -17,7 +17,7 @@ describe('GlobalSearch BlobsFilters', () => { currentScope: () => 'blobs', }; - const createComponent = ({ initialState = {}, searchBlobsHideArchivedProjects = true } = {}) => { + const createComponent = ({ initialState = {} } = {}) => { const store = new Vuex.Store({ state: { urlQuery: MOCK_QUERY, @@ -30,11 +30,6 @@ describe('GlobalSearch BlobsFilters', () => { wrapper = shallowMount(BlobsFilters, { store, - provide: { - glFeatures: { - searchBlobsHideArchivedProjects, - }, - }, }); }; @@ -42,29 +37,20 @@ describe('GlobalSearch BlobsFilters', () => { const findArchivedFilter = () => wrapper.findComponent(ArchivedFilter); const findDividers = () => wrapper.findAll('hr'); - describe.each` - description | searchBlobsHideArchivedProjects - ${'Renders correctly with Archived Filter enabled'} | ${true} - ${'Renders correctly with Archived Filter disabled'} | ${false} - `('$description', ({ searchBlobsHideArchivedProjects }) => { - beforeEach(() => { - createComponent({ - searchBlobsHideArchivedProjects, - }); - }); + beforeEach(() => { + createComponent({}); + }); - it('renders LanguageFilter', () => { - expect(findLanguageFilter().exists()).toBe(true); - }); + it('renders LanguageFilter', () => { + expect(findLanguageFilter().exists()).toBe(true); + }); - it(`renders correctly ArchivedFilter when searchBlobsHideArchivedProjects is ${searchBlobsHideArchivedProjects}`, () => { - expect(findArchivedFilter().exists()).toBe(searchBlobsHideArchivedProjects); - }); + it('renders ArchivedFilter', () => { + expect(findArchivedFilter().exists()).toBe(true); + }); - it('renders divider correctly', () => { - const dividersCount = searchBlobsHideArchivedProjects ? 1 : 0; - expect(findDividers()).toHaveLength(dividersCount); - }); + it('renders divider correctly', () => { + expect(findDividers()).toHaveLength(1); }); describe('Renders correctly in new nav', () => { @@ -74,7 +60,6 @@ describe('GlobalSearch BlobsFilters', () => { searchType: SEARCH_TYPE_ADVANCED, useSidebarNavigation: true, }, - searchBlobsHideArchivedProjects: true, }); }); |