summaryrefslogtreecommitdiff
path: root/spec/features/dashboard
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-05-12 14:55:07 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-05-12 14:55:07 +0000
commit75807f2ac9151847544594cb2bd12c73edeebe0a (patch)
tree5de76e54cd38ffd59e1de34b4c7bd06b24c5fa10 /spec/features/dashboard
parentc266b5f57a09c13feef9c066856715f339076285 (diff)
parent4c9264b695c2d44cc1c43febc88fc167786a4b52 (diff)
downloadgitlab-ce-75807f2ac9151847544594cb2bd12c73edeebe0a.tar.gz
Merge branch 'improve-milestone_filter_spec-wait_for_ajax-correct-flow' into 'master'
Fix milestone_filter_spec.rb See merge request !11329
Diffstat (limited to 'spec/features/dashboard')
-rw-r--r--spec/features/dashboard/milestone_filter_spec.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/spec/features/dashboard/milestone_filter_spec.rb b/spec/features/dashboard/milestone_filter_spec.rb
index e9ca7fd50e7..d60a002a8d7 100644
--- a/spec/features/dashboard/milestone_filter_spec.rb
+++ b/spec/features/dashboard/milestone_filter_spec.rb
@@ -1,6 +1,8 @@
require 'spec_helper'
-describe 'Dashboard > milestone filter', feature: true, js: true do
+describe 'Dashboard > milestone filter', :feature, :js do
+ include WaitForAjax
+
let(:user) { create(:user) }
let(:project) { create(:project, name: 'test', namespace: user.namespace) }
let(:milestone) { create(:milestone, title: "v1.0", project: project) }
@@ -26,30 +28,29 @@ describe 'Dashboard > milestone filter', feature: true, js: true do
before do
find(milestone_select).click
+ wait_for_ajax
page.within('.dropdown-content') do
click_link 'v1.0'
end
find(milestone_select).click
+ wait_for_ajax
end
it 'shows issues with Milestone v1.0' do
expect(find('.issues-list')).to have_selector('.issue', count: 1)
-
- find(milestone_select).click
-
expect(find('.dropdown-content')).to have_selector('a.is-active', count: 1)
end
it 'should not change active Milestone unless clicked' do
- find(milestone_select).trigger('click')
-
expect(find('.dropdown-content')).to have_selector('a.is-active', count: 1)
# open & close dropdown
find('.dropdown-menu-close').click
+
expect(find('.milestone-filter')).not_to have_selector('.dropdown.open')
+
find(milestone_select).click
expect(find('.dropdown-content')).to have_selector('a.is-active', count: 1)