summaryrefslogtreecommitdiff
path: root/spec/support/time_tracking_shared_examples.rb
diff options
context:
space:
mode:
authorOswaldo Ferreira <oswaldo@gitlab.com>2017-05-17 15:25:13 -0300
committerOswaldo Ferreira <oswaldo@gitlab.com>2017-05-22 20:39:49 -0300
commit2338785ec9fcacc43ba2098ab1485fca292c06cc (patch)
tree6a4bd9bed8d995c28bb1589ef861a92c517f6fac /spec/support/time_tracking_shared_examples.rb
parent7f31768a7f1d311d7c8cedce045f5d918370b8c9 (diff)
downloadgitlab-ce-2338785ec9fcacc43ba2098ab1485fca292c06cc.tar.gz
Use wait_for_requests to wait all JS requestwait-for-ajax-handling-all-js-requests
Diffstat (limited to 'spec/support/time_tracking_shared_examples.rb')
-rw-r--r--spec/support/time_tracking_shared_examples.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/support/time_tracking_shared_examples.rb b/spec/support/time_tracking_shared_examples.rb
index 84ef46ffa27..b407b8097d2 100644
--- a/spec/support/time_tracking_shared_examples.rb
+++ b/spec/support/time_tracking_shared_examples.rb
@@ -8,7 +8,7 @@ shared_examples 'issuable time tracker' do
it 'updates the sidebar component when estimate is added' do
submit_time('/estimate 3w 1d 1h')
- wait_for_ajax
+ wait_for_requests
page.within '.time-tracking-estimate-only-pane' do
expect(page).to have_content '3w 1d 1h'
end
@@ -17,7 +17,7 @@ shared_examples 'issuable time tracker' do
it 'updates the sidebar component when spent is added' do
submit_time('/spend 3w 1d 1h')
- wait_for_ajax
+ wait_for_requests
page.within '.time-tracking-spend-only-pane' do
expect(page).to have_content '3w 1d 1h'
end
@@ -27,7 +27,7 @@ shared_examples 'issuable time tracker' do
submit_time('/estimate 3w 1d 1h')
submit_time('/spend 3w 1d 1h')
- wait_for_ajax
+ wait_for_requests
page.within '.time-tracking-comparison-pane' do
expect(page).to have_content '3w 1d 1h'
end
@@ -81,5 +81,5 @@ end
def submit_time(slash_command)
fill_in 'note[note]', with: slash_command
find('.js-comment-submit-button').trigger('click')
- wait_for_ajax
+ wait_for_requests
end