summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorClement Ho <clemmakesapps@gmail.com>2017-02-08 19:35:23 +0000
committerClement Ho <clemmakesapps@gmail.com>2017-02-08 19:35:23 +0000
commit6d97120139cd5d07856b27b88386105acd6e7913 (patch)
treece5669923df05fe3fc9f94f2a72471784f9c9822 /spec
parentece75a89ffb29754c1e7fee8afe18c0a31551f6b (diff)
parent73bcfe324884aba19bc9d806514e8e9b910dfd8d (diff)
downloadgitlab-ce-6d97120139cd5d07856b27b88386105acd6e7913.tar.gz
Merge branch '27756-fix-json-404-response' into 'master'
Fixes ajax requests when current URL has a trailing slash Closes #27756 See merge request !9010
Diffstat (limited to 'spec')
-rw-r--r--spec/features/issues/filtered_search/filter_issues_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/features/issues/filtered_search/filter_issues_spec.rb b/spec/features/issues/filtered_search/filter_issues_spec.rb
index 3f70a6aa75f..6f7046c8461 100644
--- a/spec/features/issues/filtered_search/filter_issues_spec.rb
+++ b/spec/features/issues/filtered_search/filter_issues_spec.rb
@@ -801,4 +801,26 @@ 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)
+
+ 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)
+
+ within('#js-dropdown-label') do
+ expect(page).to have_selector('.filter-dropdown .filter-dropdown-item', count: 5)
+ end
+ end
+ end
end