mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-20 14:11:11 +00:00
Merge branch 'compare-remote-search' into 'master'
Enabled remote filter in compare dropdowns Closes #29545 See merge request !9997
This commit is contained in:
@ -18,7 +18,8 @@ window.CompareAutocomplete = (function() {
|
||||
return $.ajax({
|
||||
url: $dropdown.data('refs-url'),
|
||||
data: {
|
||||
ref: $dropdown.data('ref')
|
||||
ref: $dropdown.data('ref'),
|
||||
search: term,
|
||||
}
|
||||
}).done(function(refs) {
|
||||
return callback(refs);
|
||||
@ -26,7 +27,7 @@ window.CompareAutocomplete = (function() {
|
||||
},
|
||||
selectable: true,
|
||||
filterable: true,
|
||||
filterByText: true,
|
||||
filterRemote: true,
|
||||
fieldName: $dropdown.data('field-name'),
|
||||
filterInput: 'input[type="search"]',
|
||||
renderRow: function(ref) {
|
||||
|
@ -26,6 +26,14 @@ describe "Compare", js: true do
|
||||
click_button "Compare"
|
||||
expect(page).to have_content "Commits"
|
||||
end
|
||||
|
||||
it "filters branches" do
|
||||
select_using_dropdown("from", "wip")
|
||||
|
||||
find(".js-compare-from-dropdown .compare-dropdown-toggle").click
|
||||
|
||||
expect(find(".js-compare-from-dropdown .dropdown-content")).to have_selector("li", count: 3)
|
||||
end
|
||||
end
|
||||
|
||||
describe "tags" do
|
||||
|
Reference in New Issue
Block a user