diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-05-17 15:25:13 -0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-05-22 20:39:49 -0300 |
commit | 2338785ec9fcacc43ba2098ab1485fca292c06cc (patch) | |
tree | 6a4bd9bed8d995c28bb1589ef861a92c517f6fac /spec/features/snippets | |
parent | 7f31768a7f1d311d7c8cedce045f5d918370b8c9 (diff) | |
download | gitlab-ce-2338785ec9fcacc43ba2098ab1485fca292c06cc.tar.gz |
Use wait_for_requests to wait all JS requestwait-for-ajax-handling-all-js-requests
Diffstat (limited to 'spec/features/snippets')
-rw-r--r-- | spec/features/snippets/create_snippet_spec.rb | 4 | ||||
-rw-r--r-- | spec/features/snippets/notes_on_personal_snippets_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/snippets/public_snippets_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/snippets/show_spec.rb | 10 |
4 files changed, 9 insertions, 9 deletions
diff --git a/spec/features/snippets/create_snippet_spec.rb b/spec/features/snippets/create_snippet_spec.rb index 9409c323288..31a2d4ae984 100644 --- a/spec/features/snippets/create_snippet_spec.rb +++ b/spec/features/snippets/create_snippet_spec.rb @@ -13,7 +13,7 @@ feature 'Create Snippet', :js, feature: true do end click_button 'Create snippet' - wait_for_ajax + wait_for_requests expect(page).to have_content('My Snippet Title') expect(page).to have_content('Hello World!') @@ -27,7 +27,7 @@ feature 'Create Snippet', :js, feature: true do end click_button 'Create snippet' - wait_for_ajax + wait_for_requests expect(page).to have_content('My Snippet Title') expect(page).to have_content('snippet+file+name') diff --git a/spec/features/snippets/notes_on_personal_snippets_spec.rb b/spec/features/snippets/notes_on_personal_snippets_spec.rb index 698eb46573f..f7afc174019 100644 --- a/spec/features/snippets/notes_on_personal_snippets_spec.rb +++ b/spec/features/snippets/notes_on_personal_snippets_spec.rb @@ -93,7 +93,7 @@ describe 'Comments on personal snippets', :js, feature: true do click_on 'Remove comment' end - wait_for_ajax + wait_for_requests expect(page).not_to have_selector("#notes-list li#note_#{snippet_notes[0].id}") end diff --git a/spec/features/snippets/public_snippets_spec.rb b/spec/features/snippets/public_snippets_spec.rb index 2df483818c3..afd945a8555 100644 --- a/spec/features/snippets/public_snippets_spec.rb +++ b/spec/features/snippets/public_snippets_spec.rb @@ -5,7 +5,7 @@ feature 'Public Snippets', :js, feature: true do public_snippet = create(:personal_snippet, :public) visit snippet_path(public_snippet) - wait_for_ajax + wait_for_requests expect(page).to have_content(public_snippet.content) end diff --git a/spec/features/snippets/show_spec.rb b/spec/features/snippets/show_spec.rb index e36cf547f80..95fc1d2bb62 100644 --- a/spec/features/snippets/show_spec.rb +++ b/spec/features/snippets/show_spec.rb @@ -11,7 +11,7 @@ feature 'Snippet', :js, feature: true do before do visit snippet_path(snippet) - wait_for_ajax + wait_for_requests end it 'displays the blob' do @@ -42,7 +42,7 @@ feature 'Snippet', :js, feature: true do before do visit snippet_path(snippet) - wait_for_ajax + wait_for_requests end it 'displays the blob using the rich viewer' do @@ -72,7 +72,7 @@ feature 'Snippet', :js, feature: true do before do find('.js-blob-viewer-switch-btn[data-viewer=simple]').click - wait_for_ajax + wait_for_requests end it 'displays the blob using the simple viewer' do @@ -93,7 +93,7 @@ feature 'Snippet', :js, feature: true do before do find('.js-blob-viewer-switch-btn[data-viewer=rich]').click - wait_for_ajax + wait_for_requests end it 'displays the blob using the rich viewer' do @@ -114,7 +114,7 @@ feature 'Snippet', :js, feature: true do before do visit snippet_path(snippet, anchor: 'L1') - wait_for_ajax + wait_for_requests end it 'displays the blob using the simple viewer' do |