diff options
Diffstat (limited to 'spec/frontend/header_search/mock_data.js')
-rw-r--r-- | spec/frontend/header_search/mock_data.js | 78 |
1 files changed, 77 insertions, 1 deletions
diff --git a/spec/frontend/header_search/mock_data.js b/spec/frontend/header_search/mock_data.js index 915b3a4a678..1d980679547 100644 --- a/spec/frontend/header_search/mock_data.js +++ b/spec/frontend/header_search/mock_data.js @@ -46,22 +46,27 @@ export const MOCK_SEARCH_CONTEXT = { export const MOCK_DEFAULT_SEARCH_OPTIONS = [ { + html_id: 'default-issues-assigned', title: MSG_ISSUES_ASSIGNED_TO_ME, url: `${MOCK_ISSUE_PATH}/?assignee_username=${MOCK_USERNAME}`, }, { + html_id: 'default-issues-created', title: MSG_ISSUES_IVE_CREATED, url: `${MOCK_ISSUE_PATH}/?author_username=${MOCK_USERNAME}`, }, { + html_id: 'default-mrs-assigned', title: MSG_MR_ASSIGNED_TO_ME, url: `${MOCK_MR_PATH}/?assignee_username=${MOCK_USERNAME}`, }, { + html_id: 'default-mrs-reviewer', title: MSG_MR_IM_REVIEWER, url: `${MOCK_MR_PATH}/?reviewer_username=${MOCK_USERNAME}`, }, { + html_id: 'default-mrs-created', title: MSG_MR_IVE_CREATED, url: `${MOCK_MR_PATH}/?author_username=${MOCK_USERNAME}`, }, @@ -69,22 +74,25 @@ export const MOCK_DEFAULT_SEARCH_OPTIONS = [ export const MOCK_SCOPED_SEARCH_OPTIONS = [ { + html_id: 'scoped-in-project', scope: MOCK_PROJECT.name, description: MSG_IN_PROJECT, url: MOCK_PROJECT.path, }, { + html_id: 'scoped-in-group', scope: MOCK_GROUP.name, description: MSG_IN_GROUP, url: MOCK_GROUP.path, }, { + html_id: 'scoped-in-all', description: MSG_IN_ALL_GITLAB, url: MOCK_ALL_PATH, }, ]; -export const MOCK_AUTOCOMPLETE_OPTIONS = [ +export const MOCK_AUTOCOMPLETE_OPTIONS_RES = [ { category: 'Projects', id: 1, @@ -92,19 +100,49 @@ export const MOCK_AUTOCOMPLETE_OPTIONS = [ url: 'project/1', }, { + category: 'Groups', + id: 1, + label: 'MockGroup1', + url: 'group/1', + }, + { category: 'Projects', id: 2, label: 'MockProject2', url: 'project/2', }, { + category: 'Help', + label: 'GitLab Help', + url: 'help/gitlab', + }, +]; + +export const MOCK_AUTOCOMPLETE_OPTIONS = [ + { + category: 'Projects', + html_id: 'autocomplete-Projects-0', + id: 1, + label: 'MockProject1', + url: 'project/1', + }, + { category: 'Groups', + html_id: 'autocomplete-Groups-1', id: 1, label: 'MockGroup1', url: 'group/1', }, { + category: 'Projects', + html_id: 'autocomplete-Projects-2', + id: 2, + label: 'MockProject2', + url: 'project/2', + }, + { category: 'Help', + html_id: 'autocomplete-Help-3', label: 'GitLab Help', url: 'help/gitlab', }, @@ -116,12 +154,16 @@ export const MOCK_GROUPED_AUTOCOMPLETE_OPTIONS = [ data: [ { category: 'Projects', + html_id: 'autocomplete-Projects-0', + id: 1, label: 'MockProject1', url: 'project/1', }, { category: 'Projects', + html_id: 'autocomplete-Projects-2', + id: 2, label: 'MockProject2', url: 'project/2', @@ -133,6 +175,8 @@ export const MOCK_GROUPED_AUTOCOMPLETE_OPTIONS = [ data: [ { category: 'Groups', + html_id: 'autocomplete-Groups-1', + id: 1, label: 'MockGroup1', url: 'group/1', @@ -144,9 +188,41 @@ export const MOCK_GROUPED_AUTOCOMPLETE_OPTIONS = [ data: [ { category: 'Help', + html_id: 'autocomplete-Help-3', + label: 'GitLab Help', url: 'help/gitlab', }, ], }, ]; + +export const MOCK_SORTED_AUTOCOMPLETE_OPTIONS = [ + { + category: 'Projects', + html_id: 'autocomplete-Projects-0', + id: 1, + label: 'MockProject1', + url: 'project/1', + }, + { + category: 'Projects', + html_id: 'autocomplete-Projects-2', + id: 2, + label: 'MockProject2', + url: 'project/2', + }, + { + category: 'Groups', + html_id: 'autocomplete-Groups-1', + id: 1, + label: 'MockGroup1', + url: 'group/1', + }, + { + category: 'Help', + html_id: 'autocomplete-Help-3', + label: 'GitLab Help', + url: 'help/gitlab', + }, +]; |