diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-05-03 09:27:03 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-05-03 09:27:03 +0000 |
commit | 6201f4c2b59748f14c4899af7077aee1cf751f04 (patch) | |
tree | c05596c611c732c3c027d47002079363e35b0d42 /features | |
parent | f930c66e2cd55b6760042e775d91df538a4dabf7 (diff) | |
parent | 11ad7444be81b656e8e2142ae24be0245be60a39 (diff) | |
download | gitlab-ce-6201f4c2b59748f14c4899af7077aee1cf751f04.tar.gz |
Merge branch '29836-try-waiting-for-ajax-in-addition-to-requests' into 'master'
Wait for AJAX requests at the JS level in addition to wait for requests at the middleware level
Closes #29836
See merge request !10688
Diffstat (limited to 'features')
-rw-r--r-- | features/support/env.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/features/support/env.rb b/features/support/env.rb index 06c804b1db7..92d13bea4b6 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -10,7 +10,7 @@ if ENV['CI'] Knapsack::Adapters::SpinachAdapter.bind end -%w(select2_helper test_env repo_helpers wait_for_ajax sidekiq).each do |f| +%w(select2_helper test_env repo_helpers wait_for_ajax wait_for_requests sidekiq).each do |f| require Rails.root.join('spec', 'support', f) end @@ -30,6 +30,13 @@ Spinach.hooks.before_run do include FactoryGirl::Syntax::Methods end +Spinach.hooks.after_feature do |feature_data| + if feature_data.scenarios.flat_map(&:tags).include?('javascript') + include WaitForRequests + wait_for_requests_complete + end +end + module StdoutReporterWithScenarioLocation # Override the standard reporter to show filename and line number next to each # scenario for easy, focused re-runs |