summaryrefslogtreecommitdiff
path: root/spec/javascripts/search_autocomplete_spec.js
diff options
context:
space:
mode:
authorJohann Hubert Sonntagbauer <johann.sonntagbauer@gmail.com>2018-10-09 20:03:09 +0200
committerJohann Hubert Sonntagbauer <johann.sonntagbauer@gmail.com>2018-10-17 06:57:29 +0200
commit6f5723a169b5d400c136dbd844fc54c68e5f8563 (patch)
treee7bad2648366ed5943293655a0abe23367e869a6 /spec/javascripts/search_autocomplete_spec.js
parent28d412e5b2b8499fba22e8fabb1d44f44449228e (diff)
downloadgitlab-ce-6f5723a169b5d400c136dbd844fc54c68e5f8563.tar.gz
enable jasmine/new-line-before-expect
Diffstat (limited to 'spec/javascripts/search_autocomplete_spec.js')
-rw-r--r--spec/javascripts/search_autocomplete_spec.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/javascripts/search_autocomplete_spec.js b/spec/javascripts/search_autocomplete_spec.js
index bc1bb50dc5c..7530fd2a43b 100644
--- a/spec/javascripts/search_autocomplete_spec.js
+++ b/spec/javascripts/search_autocomplete_spec.js
@@ -111,6 +111,7 @@ describe('Search autocomplete dropdown', () => {
if (issuesPath) {
const issuesAssignedToMeLink = `a[href="${issuesPath}/?assignee_id=${userId}"]`;
const issuesIHaveCreatedLink = `a[href="${issuesPath}/?author_id=${userId}"]`;
+
expect(list.find(issuesAssignedToMeLink).length).toBe(1);
expect(list.find(issuesAssignedToMeLink).text()).toBe('Issues assigned to me');
expect(list.find(issuesIHaveCreatedLink).length).toBe(1);
@@ -118,6 +119,7 @@ describe('Search autocomplete dropdown', () => {
}
const mrsAssignedToMeLink = `a[href="${mrsPath}/?assignee_id=${userId}"]`;
const mrsIHaveCreatedLink = `a[href="${mrsPath}/?author_id=${userId}"]`;
+
expect(list.find(mrsAssignedToMeLink).length).toBe(1);
expect(list.find(mrsAssignedToMeLink).text()).toBe('Merge requests assigned to me');
expect(list.find(mrsIHaveCreatedLink).length).toBe(1);
@@ -185,7 +187,8 @@ describe('Search autocomplete dropdown', () => {
widget.searchInput.triggerHandler('focus');
list = widget.wrap.find('.dropdown-menu').find('ul');
link = "a[href='" + projectIssuesPath + '/?assignee_id=' + userId + "']";
- return expect(list.find(link).length).toBe(0);
+
+ expect(list.find(link).length).toBe(0);
});
it('should not submit the search form when selecting an autocomplete row with the keyboard', function() {