diff options
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/test_env.rb | 4 | ||||
-rw-r--r-- | spec/support/wait_for_ajax.rb | 11 |
2 files changed, 14 insertions, 1 deletions
diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb index 787670e9297..4f4743bff6d 100644 --- a/spec/support/test_env.rb +++ b/spec/support/test_env.rb @@ -12,6 +12,7 @@ module TestEnv 'fix' => '48f0be4', 'improve/awesome' => '5937ac0', 'markdown' => '0ed8c6c', + 'lfs' => 'be93687', 'master' => '5937ac0', "'test'" => 'e56497b', } @@ -21,7 +22,8 @@ module TestEnv # We currently only need a subset of the branches FORKED_BRANCH_SHA = { 'add-submodule-version-bump' => '3f547c08', - 'master' => '5937ac0' + 'master' => '5937ac0', + 'remove-submodule' => '2a33e0c0' } # Test environment diff --git a/spec/support/wait_for_ajax.rb b/spec/support/wait_for_ajax.rb new file mode 100644 index 00000000000..692d219e9f1 --- /dev/null +++ b/spec/support/wait_for_ajax.rb @@ -0,0 +1,11 @@ +module WaitForAjax + def wait_for_ajax + Timeout.timeout(Capybara.default_wait_time) do + loop until finished_all_ajax_requests? + end + end + + def finished_all_ajax_requests? + page.evaluate_script('jQuery.active').zero? + end +end |