summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorClement Ho <clemmakesapps@gmail.com>2017-02-08 19:35:23 +0000
committerJames Lopez <james@jameslopez.es>2017-02-15 09:40:02 +0100
commit7b53c26353a1dacb221be2b10c0473662e92fc00 (patch)
treee98700b07cc4c05f7923c63bb947994beef63800 /spec
parent6e8e2dacf6007fe27643188da4708fa702147e5d (diff)
downloadgitlab-ce-7b53c26353a1dacb221be2b10c0473662e92fc00.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