Change sleep to wait_for_ajax

This commit is contained in:
Phil Hughes 2016-08-18 14:08:01 +01:00
parent 0da7a892bb
commit 25465751c1
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,8 @@
require 'spec_helper'
feature 'Delete branch', feature: true, js: true do
include WaitForAjax
let(:project) { create(:project) }
let(:user) { create(:user) }
@ -15,7 +17,7 @@ feature 'Delete branch', feature: true, js: true do
expect(page).to have_selector('.tooltip')
first('.remove-row').click
sleep 1
wait_for_ajax
expect(page).not_to have_selector('.tooltip')
end