diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-05-17 21:25:13 +0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-05-23 02:39:49 +0300 |
commit | 2338785ec9fcacc43ba2098ab1485fca292c06cc (patch) | |
tree | 6a4bd9bed8d995c28bb1589ef861a92c517f6fac /spec/features/dashboard/milestone_filter_spec.rb | |
parent | 7f31768a7f1d311d7c8cedce045f5d918370b8c9 (diff) |
Use wait_for_requests to wait all JS request
Diffstat (limited to 'spec/features/dashboard/milestone_filter_spec.rb')
-rw-r--r-- | spec/features/dashboard/milestone_filter_spec.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/spec/features/dashboard/milestone_filter_spec.rb b/spec/features/dashboard/milestone_filter_spec.rb index d60a002a8d7..b5b92c36895 100644 --- a/spec/features/dashboard/milestone_filter_spec.rb +++ b/spec/features/dashboard/milestone_filter_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' 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) } @@ -28,14 +26,14 @@ describe 'Dashboard > milestone filter', :feature, :js do before do find(milestone_select).click - wait_for_ajax + wait_for_requests page.within('.dropdown-content') do click_link 'v1.0' end find(milestone_select).click - wait_for_ajax + wait_for_requests end it 'shows issues with Milestone v1.0' do @@ -48,9 +46,9 @@ describe 'Dashboard > milestone filter', :feature, :js do # 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) |