diff options
author | Johann Hubert Sonntagbauer <johann.sonntagbauer@gmail.com> | 2018-10-09 20:01:49 +0300 |
---|---|---|
committer | Johann Hubert Sonntagbauer <johann.sonntagbauer@gmail.com> | 2018-10-09 20:01:49 +0300 |
commit | 2a76e04091211c03684d236230331d6eabdf748e (patch) | |
tree | 8e1d9bbe0391095cf1c1a183a4e12315558b9c78 /spec/javascripts/search_autocomplete_spec.js | |
parent | 10836664487a771319e2d97dd7b9011dcd017f14 (diff) |
enable jasmine/new-line-between-declarations
Diffstat (limited to 'spec/javascripts/search_autocomplete_spec.js')
-rw-r--r-- | spec/javascripts/search_autocomplete_spec.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/javascripts/search_autocomplete_spec.js b/spec/javascripts/search_autocomplete_spec.js index b96023a33c4..bc1bb50dc5c 100644 --- a/spec/javascripts/search_autocomplete_spec.js +++ b/spec/javascripts/search_autocomplete_spec.js @@ -140,6 +140,7 @@ describe('Search autocomplete dropdown', () => { removeBodyAttributes(); window.gon = {}; }); + it('should show Dashboard specific dropdown menu', function() { var list; addBodyAttributes(); @@ -148,6 +149,7 @@ describe('Search autocomplete dropdown', () => { list = widget.wrap.find('.dropdown-menu').find('ul'); return assertLinks(list, dashboardIssuesPath, dashboardMRsPath); }); + it('should show Group specific dropdown menu', function() { var list; addBodyAttributes('group'); @@ -156,6 +158,7 @@ describe('Search autocomplete dropdown', () => { list = widget.wrap.find('.dropdown-menu').find('ul'); return assertLinks(list, groupIssuesPath, groupMRsPath); }); + it('should show Project specific dropdown menu', function() { var list; addBodyAttributes('project'); @@ -164,6 +167,7 @@ describe('Search autocomplete dropdown', () => { list = widget.wrap.find('.dropdown-menu').find('ul'); return assertLinks(list, projectIssuesPath, projectMRsPath); }); + it('should show only Project mergeRequest dropdown menu items when project issues are disabled', function() { addBodyAttributes('project'); disableProjectIssues(); @@ -172,6 +176,7 @@ describe('Search autocomplete dropdown', () => { const list = widget.wrap.find('.dropdown-menu').find('ul'); assertLinks(list, null, projectMRsPath); }); + it('should not show category related menu if there is text in the input', function() { var link, list; addBodyAttributes('project'); @@ -182,6 +187,7 @@ describe('Search autocomplete dropdown', () => { link = "a[href='" + projectIssuesPath + '/?assignee_id=' + userId + "']"; return expect(list.find(link).length).toBe(0); }); + it('should not submit the search form when selecting an autocomplete row with the keyboard', function() { var ENTER = 13; var DOWN = 40; |