Commit 04977296 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Sort project select dropdown by similarity

This falls back to ID sorting when the feature flag is disabled
parent ad01acf3
......@@ -64,10 +64,10 @@ export default {
this.groupId,
term,
{
search_namespaces: true,
with_issues_enabled: true,
with_shared: false,
include_subgroups: true,
order_by: 'similarity',
...additionalAttrs,
},
projects => {
......
......@@ -54,11 +54,11 @@ const projectSelect = () => {
this.groupId,
query.term,
{
search_namespaces: true,
with_issues_enabled: this.withIssuesEnabled,
with_merge_requests_enabled: this.withMergeRequestsEnabled,
with_shared: this.withShared,
include_subgroups: this.includeProjectsInSubgroups,
order_by: 'similarity',
},
projectsCallback,
);
......
......@@ -110,8 +110,6 @@ RSpec.describe 'Group issues page' do
find('.empty-state .js-lazy-loaded')
find('.new-project-item-link').click
find('.select2-input').set(group.name)
page.within('.select2-results') do
expect(page).to have_content(project.full_name)
expect(page).not_to have_content(project_with_issues_disabled.full_name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment