Commit 7b16c01d authored by Alfredo Sumaran's avatar Alfredo Sumaran

Add tests

parent 9659f7bf
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
if (this.filteredSearchInput) { if (this.filteredSearchInput) {
this.tokenizer = gl.FilteredSearchTokenizer; this.tokenizer = gl.FilteredSearchTokenizer;
this.dropdownManager = new gl.FilteredSearchDropdownManager(this.filteredSearchInput.getAttribute('data-base-endpoint')); this.dropdownManager = new gl.FilteredSearchDropdownManager(this.filteredSearchInput.getAttribute('data-base-endpoint') || '');
this.bindEvents(); this.bindEvents();
this.loadSearchParamsFromURL(); this.loadSearchParamsFromURL();
......
...@@ -801,4 +801,28 @@ describe 'Filter issues', js: true, feature: true do ...@@ -801,4 +801,28 @@ describe 'Filter issues', js: true, feature: true do
expect(auto_discovery_params).to include('assignee_id' => [user.id.to_s]) expect(auto_discovery_params).to include('assignee_id' => [user.id.to_s])
end end
end end
context 'URL has a trailing slash' do
before do
visit "#{namespace_project_issues_path(project.namespace, project)}/"
end
it 'milestone dropdown loads milestones' do
input_filtered_search("milestone:", submit: false)
sleep 1
within('#js-dropdown-milestone') do
expect(page).to have_selector('.filter-dropdown .filter-dropdown-item', count: 2)
end
end
it 'label dropdown load labels' do
input_filtered_search("label:", submit: false)
sleep 1
within('#js-dropdown-label') do
expect(page).to have_selector('.filter-dropdown .filter-dropdown-item', count: 5)
end
end
end
end end
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