Merge branch 'mr-creation-source-project-filtering' into 'master'
Fixed source projects not filtering Closes #52728 See merge request gitlab-org/gitlab-ce!22515
This commit is contained in:
commit
93b246ecf4
|
@ -40,7 +40,7 @@ export default function initCompareAutocomplete(limitTo = null, clickHandler = (
|
|||
},
|
||||
selectable: true,
|
||||
filterable: true,
|
||||
filterRemote: true,
|
||||
filterRemote: !!$dropdown.data('refsUrl'),
|
||||
fieldName: $dropdown.data('fieldName'),
|
||||
filterInput: 'input[type="search"]',
|
||||
renderRow: function(ref) {
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fixed source project not filtering in merge request creation compare form
|
||||
merge_request:
|
||||
author:
|
||||
type: fixed
|
|
@ -28,4 +28,29 @@ describe 'Merge request > User creates MR' do
|
|||
it_behaves_like 'a creatable merge request'
|
||||
end
|
||||
end
|
||||
|
||||
context 'source project', :js do
|
||||
let(:user) { create(:user) }
|
||||
let(:target_project) { create(:project, :public, :repository) }
|
||||
let(:source_project) { target_project }
|
||||
|
||||
before do
|
||||
source_project.add_maintainer(user)
|
||||
|
||||
sign_in(user)
|
||||
visit project_new_merge_request_path(
|
||||
target_project,
|
||||
merge_request: {
|
||||
source_project_id: source_project.id,
|
||||
target_project_id: target_project.id
|
||||
})
|
||||
end
|
||||
|
||||
it 'filters source project' do
|
||||
find('.js-source-project').click
|
||||
find('.dropdown-source-project input').set('source')
|
||||
|
||||
expect(find('.dropdown-source-project .dropdown-content')).not_to have_content(source_project.name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue