diff options
author | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2018-08-29 15:14:54 +0300 |
---|---|---|
committer | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2018-08-29 16:02:54 +0300 |
commit | 27aeaccb6cdf51294302cf1435b45900942145d7 (patch) | |
tree | 31167ae52f677a4effbe6cf5b70f65c95491afa3 | |
parent | 145925a50ced907d102144aa90b032e2ab525c16 (diff) |
rename to IssuableFilteredSearchTokenKeys
it's used for both issues and merge requests
-rw-r--r-- | app/assets/javascripts/filtered_search/filtered_search_manager.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/filtered_search/issuable_filtered_search_token_keys.js (renamed from app/assets/javascripts/filtered_search/issues_filtered_search_token_keys.js) | 4 | ||||
-rw-r--r-- | app/assets/javascripts/pages/groups/issues/index.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/pages/groups/merge_requests/index.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/pages/projects/issues/index/index.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/pages/projects/merge_requests/index/index.js | 4 | ||||
-rw-r--r-- | spec/javascripts/filtered_search/components/recent_searches_dropdown_content_spec.js | 6 | ||||
-rw-r--r-- | spec/javascripts/filtered_search/dropdown_user_spec.js | 4 | ||||
-rw-r--r-- | spec/javascripts/filtered_search/dropdown_utils_spec.js | 4 | ||||
-rw-r--r-- | spec/javascripts/filtered_search/filtered_search_manager_spec.js | 4 | ||||
-rw-r--r-- | spec/javascripts/filtered_search/filtered_search_tokenizer_spec.js | 4 |
11 files changed, 23 insertions, 23 deletions
diff --git a/app/assets/javascripts/filtered_search/filtered_search_manager.js b/app/assets/javascripts/filtered_search/filtered_search_manager.js index fc6e77e4047..d25f6f95b22 100644 --- a/app/assets/javascripts/filtered_search/filtered_search_manager.js +++ b/app/assets/javascripts/filtered_search/filtered_search_manager.js @@ -3,7 +3,7 @@ import { getParameterByName, getUrlParamsArray, } from '~/lib/utils/common_utils'; -import IssuesFilteredSearchTokenKeys from '~/filtered_search/issues_filtered_search_token_keys'; +import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys'; import { visitUrl } from '../lib/utils/url_utility'; import Flash from '../flash'; import FilteredSearchContainer from './container'; @@ -23,7 +23,7 @@ export default class FilteredSearchManager { isGroup = false, isGroupAncestor = true, isGroupDecendent = false, - filteredSearchTokenKeys = IssuesFilteredSearchTokenKeys, + filteredSearchTokenKeys = IssuableFilteredSearchTokenKeys, stateFiltersSelector = '.issues-state-filters', }) { this.isGroup = isGroup; diff --git a/app/assets/javascripts/filtered_search/issues_filtered_search_token_keys.js b/app/assets/javascripts/filtered_search/issuable_filtered_search_token_keys.js index 0865f28a2ab..cce2c07dc3e 100644 --- a/app/assets/javascripts/filtered_search/issues_filtered_search_token_keys.js +++ b/app/assets/javascripts/filtered_search/issuable_filtered_search_token_keys.js @@ -71,7 +71,7 @@ const conditions = [{ value: 'none', }]; -const IssuesFilteredSearchTokenKeys = +const IssuableFilteredSearchTokenKeys = new FilteredSearchTokenKeys(tokenKeys, alternativeTokenKeys, conditions); -export default IssuesFilteredSearchTokenKeys; +export default IssuableFilteredSearchTokenKeys; diff --git a/app/assets/javascripts/pages/groups/issues/index.js b/app/assets/javascripts/pages/groups/issues/index.js index 8a7fb7fff90..736c6a62610 100644 --- a/app/assets/javascripts/pages/groups/issues/index.js +++ b/app/assets/javascripts/pages/groups/issues/index.js @@ -1,13 +1,13 @@ import projectSelect from '~/project_select'; import initFilteredSearch from '~/pages/search/init_filtered_search'; import { FILTERED_SEARCH } from '~/pages/constants'; -import IssuesFilteredSearchTokenKeys from '~/filtered_search/issues_filtered_search_token_keys'; +import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys'; document.addEventListener('DOMContentLoaded', () => { initFilteredSearch({ page: FILTERED_SEARCH.ISSUES, isGroupDecendent: true, - filteredSearchTokenKeys: IssuesFilteredSearchTokenKeys, + filteredSearchTokenKeys: IssuableFilteredSearchTokenKeys, }); projectSelect(); }); diff --git a/app/assets/javascripts/pages/groups/merge_requests/index.js b/app/assets/javascripts/pages/groups/merge_requests/index.js index 02631985eac..b798a254459 100644 --- a/app/assets/javascripts/pages/groups/merge_requests/index.js +++ b/app/assets/javascripts/pages/groups/merge_requests/index.js @@ -1,13 +1,13 @@ import projectSelect from '~/project_select'; import initFilteredSearch from '~/pages/search/init_filtered_search'; -import IssuesFilteredSearchTokenKeys from '~/filtered_search/issues_filtered_search_token_keys'; +import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys'; import { FILTERED_SEARCH } from '~/pages/constants'; document.addEventListener('DOMContentLoaded', () => { initFilteredSearch({ page: FILTERED_SEARCH.MERGE_REQUESTS, isGroupDecendent: true, - filteredSearchTokenKeys: IssuesFilteredSearchTokenKeys, + filteredSearchTokenKeys: IssuableFilteredSearchTokenKeys, }); projectSelect(); }); diff --git a/app/assets/javascripts/pages/projects/issues/index/index.js b/app/assets/javascripts/pages/projects/issues/index/index.js index 113c521f3ba..23edbdc5cad 100644 --- a/app/assets/javascripts/pages/projects/issues/index/index.js +++ b/app/assets/javascripts/pages/projects/issues/index/index.js @@ -4,14 +4,14 @@ import IssuableIndex from '~/issuable_index'; import ShortcutsNavigation from '~/shortcuts_navigation'; import UsersSelect from '~/users_select'; import initFilteredSearch from '~/pages/search/init_filtered_search'; -import IssuesFilteredSearchTokenKeys from '~/filtered_search/issues_filtered_search_token_keys'; +import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys'; import { FILTERED_SEARCH } from '~/pages/constants'; import { ISSUABLE_INDEX } from '~/pages/projects/constants'; document.addEventListener('DOMContentLoaded', () => { initFilteredSearch({ page: FILTERED_SEARCH.ISSUES, - filteredSearchTokenKeys: IssuesFilteredSearchTokenKeys, + filteredSearchTokenKeys: IssuableFilteredSearchTokenKeys, }); new IssuableIndex(ISSUABLE_INDEX.ISSUE); diff --git a/app/assets/javascripts/pages/projects/merge_requests/index/index.js b/app/assets/javascripts/pages/projects/merge_requests/index/index.js index 187dbd64a8d..1fad0fb7297 100644 --- a/app/assets/javascripts/pages/projects/merge_requests/index/index.js +++ b/app/assets/javascripts/pages/projects/merge_requests/index/index.js @@ -2,14 +2,14 @@ import IssuableIndex from '~/issuable_index'; import ShortcutsNavigation from '~/shortcuts_navigation'; import UsersSelect from '~/users_select'; import initFilteredSearch from '~/pages/search/init_filtered_search'; -import IssuesFilteredSearchTokenKeys from '~/filtered_search/issues_filtered_search_token_keys'; +import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys'; import { FILTERED_SEARCH } from '~/pages/constants'; import { ISSUABLE_INDEX } from '~/pages/projects/constants'; document.addEventListener('DOMContentLoaded', () => { initFilteredSearch({ page: FILTERED_SEARCH.MERGE_REQUESTS, - filteredSearchTokenKeys: IssuesFilteredSearchTokenKeys, + filteredSearchTokenKeys: IssuableFilteredSearchTokenKeys, }); new IssuableIndex(ISSUABLE_INDEX.MERGE_REQUEST); // eslint-disable-line no-new new ShortcutsNavigation(); // eslint-disable-line no-new diff --git a/spec/javascripts/filtered_search/components/recent_searches_dropdown_content_spec.js b/spec/javascripts/filtered_search/components/recent_searches_dropdown_content_spec.js index 824cdf4c14b..9d670afe206 100644 --- a/spec/javascripts/filtered_search/components/recent_searches_dropdown_content_spec.js +++ b/spec/javascripts/filtered_search/components/recent_searches_dropdown_content_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; import eventHub from '~/filtered_search/event_hub'; import RecentSearchesDropdownContent from '~/filtered_search/components/recent_searches_dropdown_content.vue'; -import IssuesFilteredSearchTokenKeys from '~/filtered_search/issues_filtered_search_token_keys'; +import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys'; const createComponent = (propsData) => { const Component = Vue.extend(RecentSearchesDropdownContent); @@ -18,14 +18,14 @@ const trimMarkupWhitespace = text => text.replace(/(\n|\s)+/gm, ' ').trim(); describe('RecentSearchesDropdownContent', () => { const propsDataWithoutItems = { items: [], - allowedKeys: IssuesFilteredSearchTokenKeys.getKeys(), + allowedKeys: IssuableFilteredSearchTokenKeys.getKeys(), }; const propsDataWithItems = { items: [ 'foo', 'author:@root label:~foo bar', ], - allowedKeys: IssuesFilteredSearchTokenKeys.getKeys(), + allowedKeys: IssuableFilteredSearchTokenKeys.getKeys(), }; let vm; diff --git a/spec/javascripts/filtered_search/dropdown_user_spec.js b/spec/javascripts/filtered_search/dropdown_user_spec.js index 06d91a6de57..b48b1456eff 100644 --- a/spec/javascripts/filtered_search/dropdown_user_spec.js +++ b/spec/javascripts/filtered_search/dropdown_user_spec.js @@ -1,7 +1,7 @@ import DropdownUtils from '~/filtered_search/dropdown_utils'; import DropdownUser from '~/filtered_search/dropdown_user'; import FilteredSearchTokenizer from '~/filtered_search/filtered_search_tokenizer'; -import IssuesFilteredSearchTokenKeys from '~/filtered_search/issues_filtered_search_token_keys'; +import IssuableFilteredTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys'; describe('Dropdown User', () => { describe('getSearchInput', () => { @@ -14,7 +14,7 @@ describe('Dropdown User', () => { spyOn(DropdownUtils, 'getSearchInput').and.callFake(() => {}); dropdownUser = new DropdownUser({ - tokenKeys: IssuesFilteredSearchTokenKeys, + tokenKeys: IssuableFilteredTokenKeys, }); }); diff --git a/spec/javascripts/filtered_search/dropdown_utils_spec.js b/spec/javascripts/filtered_search/dropdown_utils_spec.js index 11360d8bd19..8792e99d461 100644 --- a/spec/javascripts/filtered_search/dropdown_utils_spec.js +++ b/spec/javascripts/filtered_search/dropdown_utils_spec.js @@ -1,6 +1,6 @@ import DropdownUtils from '~/filtered_search/dropdown_utils'; import FilteredSearchDropdownManager from '~/filtered_search/filtered_search_dropdown_manager'; -import IssuesFilteredSearchTokenKeys from '~/filtered_search/issues_filtered_search_token_keys'; +import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys'; import FilteredSearchSpecHelper from '../helpers/filtered_search_spec_helper'; describe('Dropdown Utils', () => { @@ -137,7 +137,7 @@ describe('Dropdown Utils', () => { `); input = document.getElementById('test'); - allowedKeys = IssuesFilteredSearchTokenKeys.getKeys(); + allowedKeys = IssuableFilteredSearchTokenKeys.getKeys(); }); function config() { diff --git a/spec/javascripts/filtered_search/filtered_search_manager_spec.js b/spec/javascripts/filtered_search/filtered_search_manager_spec.js index 63f2d2cfa0b..a03d5a31b41 100644 --- a/spec/javascripts/filtered_search/filtered_search_manager_spec.js +++ b/spec/javascripts/filtered_search/filtered_search_manager_spec.js @@ -1,7 +1,7 @@ import RecentSearchesService from '~/filtered_search/services/recent_searches_service'; import RecentSearchesServiceError from '~/filtered_search/services/recent_searches_service_error'; import RecentSearchesRoot from '~/filtered_search/recent_searches_root'; -import IssuesFilteredSearchTokenKeys from '~/filtered_search/issues_filtered_search_token_keys'; +import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys'; import '~/lib/utils/common_utils'; import DropdownUtils from '~/filtered_search/dropdown_utils'; import FilteredSearchVisualTokens from '~/filtered_search/filtered_search_visual_tokens'; @@ -86,7 +86,7 @@ describe('Filtered Search Manager', function () { expect(RecentSearchesService.isAvailable).toHaveBeenCalled(); expect(RecentSearchesStoreSpy).toHaveBeenCalledWith({ isLocalStorageAvailable, - allowedKeys: IssuesFilteredSearchTokenKeys.getKeys(), + allowedKeys: IssuableFilteredSearchTokenKeys.getKeys(), }); }); }); diff --git a/spec/javascripts/filtered_search/filtered_search_tokenizer_spec.js b/spec/javascripts/filtered_search/filtered_search_tokenizer_spec.js index 5bbba232300..4f9f546cbb5 100644 --- a/spec/javascripts/filtered_search/filtered_search_tokenizer_spec.js +++ b/spec/javascripts/filtered_search/filtered_search_tokenizer_spec.js @@ -1,8 +1,8 @@ -import IssuesFilteredSearchTokenKeys from '~/filtered_search/issues_filtered_search_token_keys'; +import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys'; import FilteredSearchTokenizer from '~/filtered_search/filtered_search_tokenizer'; describe('Filtered Search Tokenizer', () => { - const allowedKeys = IssuesFilteredSearchTokenKeys.getKeys(); + const allowedKeys = IssuableFilteredSearchTokenKeys.getKeys(); describe('processTokens', () => { it('returns for input containing only search value', () => { |