spec: restart driver with saucelabs & set custom timeout
Change-Id: Ib7dafd337a4226dc29772dd24f5c2bc13536ad61 Reviewed-on: https://gerrit.instructure.com/120858 Tested-by: Jenkins Reviewed-by: Robert Lamb <rlamb@instructure.com> Product-Review: Robert Lamb <rlamb@instructure.com> QA-Review: Robert Lamb <rlamb@instructure.com>
This commit is contained in:
parent
1d06e1776b
commit
dd18bdeca5
|
@ -188,5 +188,10 @@ shared_context "in-process server selenium tests" do
|
||||||
ensure
|
ensure
|
||||||
SeleniumDriverSetup.disallow_requests!
|
SeleniumDriverSetup.disallow_requests!
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if SeleniumDriverSetup.reset_driver_between_specs?
|
||||||
|
driver.quit
|
||||||
|
SeleniumDriverSetup.reset!
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -42,8 +42,8 @@ module SeleniumDriverSetup
|
||||||
# nothing should wait by default
|
# nothing should wait by default
|
||||||
implicit_wait: 0,
|
implicit_wait: 0,
|
||||||
# except finding elements
|
# except finding elements
|
||||||
finder: 5,
|
finder: CONFIG[:finder_timeout_seconds] || 5,
|
||||||
script: 5
|
script: CONFIG[:script_timeout_seconds] || 5
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
# If you have some really slow UI, you can temporarily override
|
# If you have some really slow UI, you can temporarily override
|
||||||
|
@ -91,6 +91,11 @@ module SeleniumDriverSetup
|
||||||
@driver = nil
|
@driver = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def reset_driver_between_specs?
|
||||||
|
SeleniumDriverSetup::CONFIG[:remote_url].present? &&
|
||||||
|
SeleniumDriverSetup::CONFIG[:remote_url].downcase.include?("saucelabs")
|
||||||
|
end
|
||||||
|
|
||||||
def run
|
def run
|
||||||
begin
|
begin
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in New Issue