diff options
Diffstat (limited to 'spec/javascripts/search_autocomplete_spec.js')
-rw-r--r-- | spec/javascripts/search_autocomplete_spec.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/javascripts/search_autocomplete_spec.js b/spec/javascripts/search_autocomplete_spec.js index 7530fd2a43b..7a4ca587313 100644 --- a/spec/javascripts/search_autocomplete_spec.js +++ b/spec/javascripts/search_autocomplete_spec.js @@ -1,4 +1,4 @@ -/* eslint-disable no-var, one-var, no-unused-expressions, consistent-return, no-param-reassign, default-case, no-return-assign, object-shorthand, prefer-template, vars-on-top */ +/* eslint-disable no-var, one-var, no-unused-expressions, consistent-return, no-param-reassign, default-case, no-return-assign, object-shorthand, vars-on-top */ import $ from 'jquery'; import '~/gl_dropdown'; @@ -109,16 +109,16 @@ describe('Search autocomplete dropdown', () => { assertLinks = function(list, issuesPath, mrsPath) { if (issuesPath) { - const issuesAssignedToMeLink = `a[href="${issuesPath}/?assignee_id=${userId}"]`; - const issuesIHaveCreatedLink = `a[href="${issuesPath}/?author_id=${userId}"]`; + const issuesAssignedToMeLink = `a[href="${issuesPath}/?assignee_username=${userName}"]`; + const issuesIHaveCreatedLink = `a[href="${issuesPath}/?author_username=${userName}"]`; expect(list.find(issuesAssignedToMeLink).length).toBe(1); expect(list.find(issuesAssignedToMeLink).text()).toBe('Issues assigned to me'); expect(list.find(issuesIHaveCreatedLink).length).toBe(1); expect(list.find(issuesIHaveCreatedLink).text()).toBe("Issues I've created"); } - const mrsAssignedToMeLink = `a[href="${mrsPath}/?assignee_id=${userId}"]`; - const mrsIHaveCreatedLink = `a[href="${mrsPath}/?author_id=${userId}"]`; + const mrsAssignedToMeLink = `a[href="${mrsPath}/?assignee_username=${userName}"]`; + const mrsIHaveCreatedLink = `a[href="${mrsPath}/?author_username=${userName}"]`; expect(list.find(mrsAssignedToMeLink).length).toBe(1); expect(list.find(mrsAssignedToMeLink).text()).toBe('Merge requests assigned to me'); @@ -186,7 +186,7 @@ describe('Search autocomplete dropdown', () => { widget.searchInput.val('help'); widget.searchInput.triggerHandler('focus'); list = widget.wrap.find('.dropdown-menu').find('ul'); - link = "a[href='" + projectIssuesPath + '/?assignee_id=' + userId + "']"; + link = `a[href='${projectIssuesPath}/?assignee_username=${userName}']`; expect(list.find(link).length).toBe(0); }); |