Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOswaldo Ferreira <oswaldo@gitlab.com>2017-05-17 21:25:13 +0300
committerOswaldo Ferreira <oswaldo@gitlab.com>2017-05-23 02:39:49 +0300
commit2338785ec9fcacc43ba2098ab1485fca292c06cc (patch)
tree6a4bd9bed8d995c28bb1589ef861a92c517f6fac /spec/features/users
parent7f31768a7f1d311d7c8cedce045f5d918370b8c9 (diff)
Use wait_for_requests to wait all JS request
Diffstat (limited to 'spec/features/users')
-rw-r--r--spec/features/users/projects_spec.rb2
-rw-r--r--spec/features/users/snippets_spec.rb6
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/features/users/projects_spec.rb b/spec/features/users/projects_spec.rb
index 373b64808f8..67ce4b44464 100644
--- a/spec/features/users/projects_spec.rb
+++ b/spec/features/users/projects_spec.rb
@@ -16,7 +16,7 @@ describe 'Projects tab on a user profile', :feature, :js do
click_link('Personal projects')
end
- wait_for_ajax
+ wait_for_requests
end
it 'paginates results' do
diff --git a/spec/features/users/snippets_spec.rb b/spec/features/users/snippets_spec.rb
index 4efbd672322..2e388115633 100644
--- a/spec/features/users/snippets_spec.rb
+++ b/spec/features/users/snippets_spec.rb
@@ -11,7 +11,7 @@ describe 'Snippets tab on a user profile', feature: true, js: true do
allow(Snippet).to receive(:default_per_page).and_return(1)
visit user_path(user)
page.within('.user-profile-nav') { click_link 'Snippets' }
- wait_for_ajax
+ wait_for_requests
end
it_behaves_like 'paginated snippets', remote: true
@@ -27,7 +27,7 @@ describe 'Snippets tab on a user profile', feature: true, js: true do
login_as(:user)
visit user_path(user)
page.within('.user-profile-nav') { click_link 'Snippets' }
- wait_for_ajax
+ wait_for_requests
expect(page).to have_selector('.snippet-row', count: 2)
@@ -38,7 +38,7 @@ describe 'Snippets tab on a user profile', feature: true, js: true do
it 'contains only public snippets of a user when a user is not logged in' do
visit user_path(user)
page.within('.user-profile-nav') { click_link 'Snippets' }
- wait_for_ajax
+ wait_for_requests
expect(page).to have_selector('.snippet-row', count: 1)
expect(page).to have_content(public_snippet.title)