Commit 260a504c authored by Alfredo Sumaran's avatar Alfredo Sumaran

Add tests

parent 4e7c4d10
......@@ -6,7 +6,7 @@
if (this.filteredSearchInput) {
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.loadSearchParamsFromURL();
......
......@@ -801,4 +801,28 @@ describe 'Filter issues', js: true, feature: true do
expect(auto_discovery_params).to include('assignee_id' => [user.id.to_s])
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
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