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/users | |
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/users')
-rw-r--r-- | spec/features/users/projects_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/users/snippets_spec.rb | 6 |
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) |