diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2019-06-14 02:39:39 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2019-06-14 02:39:39 +0300 |
commit | 14b0a4627211dd123afe1381da5fe093408836ee (patch) | |
tree | 57ff8b4ac89771fdf5f836bc83da407d396683fb /spec/javascripts/filtered_search | |
parent | d8b361aff274e4b9c010a483add693af15b51371 (diff) |
Use scoped routes for labels and milestones
Update frontend code to use /-/ scope for milestones and labels routes
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/javascripts/filtered_search')
-rw-r--r-- | spec/javascripts/filtered_search/filtered_search_visual_tokens_spec.js | 4 | ||||
-rw-r--r-- | spec/javascripts/filtered_search/visual_token_value_spec.js | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/spec/javascripts/filtered_search/filtered_search_visual_tokens_spec.js b/spec/javascripts/filtered_search/filtered_search_visual_tokens_spec.js index a72ea6ab547..0ee13faf841 100644 --- a/spec/javascripts/filtered_search/filtered_search_visual_tokens_spec.js +++ b/spec/javascripts/filtered_search/filtered_search_visual_tokens_spec.js @@ -118,7 +118,7 @@ describe('Filtered Search Visual Tokens', () => { describe('getEndpointWithQueryParams', () => { it('returns `endpoint` string as is when second param `endpointQueryParams` is undefined, null or empty string', () => { - const endpoint = 'foo/bar/labels.json'; + const endpoint = 'foo/bar/-/labels.json'; expect(subject.getEndpointWithQueryParams(endpoint)).toBe(endpoint); expect(subject.getEndpointWithQueryParams(endpoint, null)).toBe(endpoint); @@ -126,7 +126,7 @@ describe('Filtered Search Visual Tokens', () => { }); it('returns `endpoint` string with values of `endpointQueryParams`', () => { - const endpoint = 'foo/bar/labels.json'; + const endpoint = 'foo/bar/-/labels.json'; const singleQueryParams = '{"foo":"true"}'; const multipleQueryParams = '{"foo":"true","bar":"true"}'; diff --git a/spec/javascripts/filtered_search/visual_token_value_spec.js b/spec/javascripts/filtered_search/visual_token_value_spec.js index 14217d460cc..d1d16afc977 100644 --- a/spec/javascripts/filtered_search/visual_token_value_spec.js +++ b/spec/javascripts/filtered_search/visual_token_value_spec.js @@ -156,9 +156,11 @@ describe('Filtered Search Visual Tokens', () => { const filteredSearchInput = document.querySelector('.filtered-search'); filteredSearchInput.dataset.baseEndpoint = dummyEndpoint; + filteredSearchInput.dataset.labelsEndpoint = `${dummyEndpoint}/-/labels`; + filteredSearchInput.dataset.milestonesEndpoint = `${dummyEndpoint}/-/milestones`; AjaxCache.internalStorage = {}; - AjaxCache.internalStorage[`${dummyEndpoint}/labels.json`] = labelData; + AjaxCache.internalStorage[`${filteredSearchInput.dataset.labelsEndpoint}.json`] = labelData; }); const parseColor = color => { |