Skip to content

Commit

Permalink
Merge pull request #13790 from code-dot-org/ui-502-retry
Browse files Browse the repository at this point in the history
Add retry on UI-test page load errors
  • Loading branch information
wjordan committed Mar 14, 2017
2 parents eb5fce2 + 05aac93 commit 01b6998
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dashboard/test/ui/step_definitions/steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,11 @@ def individual_steps(steps)
Given /^I am on "([^"]*)"$/ do |url|
check_window_for_js_errors('before navigation')
url = replace_hostname(url)
@browser.navigate.to url
refute_bad_gateway
refute_site_unreachable
Retryable.retryable(on: RSpec::Expectations::ExpectationNotMetError, sleep: 10, tries: 3) do
@browser.navigate.to url
refute_bad_gateway
refute_site_unreachable
end
install_js_error_recorder
end

Expand Down
1 change: 1 addition & 0 deletions dashboard/test/ui/support/connect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
require_relative '../../../../deployment'
require 'active_support/core_ext/object/blank'
require_relative '../utils/selenium_browser'
require 'retryable'

$browser_configs = JSON.load(open("browsers.json"))

Expand Down

0 comments on commit 01b6998

Please sign in to comment.