sauce 3.5.11 → 3.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sauce/config.rb +1 -1
- data/lib/sauce/selenium.rb +4 -1
- data/lib/sauce/version.rb +2 -2
- data/lib/tasks/parallel_testing.rb +4 -0
- data/spec/cucumber_helper.rb +1 -0
- data/spec/sauce/capybara_spec.rb +9 -1
- data/spec/sauce/config/config_spec.rb +8 -0
- data/spec/sauce/cucumber_spec.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb68d5c93618cb4fd253d65a734e56a0196c4435
|
4
|
+
data.tar.gz: 881b581436a2377732a29c4d4eb656eafadf8f16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e71c4675a1c2061c4520afe6065ee4f7c8f4e7c450763fdaecaa16112e4fd8f6d279aa54e3a8373ad908c0e39cfd9aa34de11c036e124d70f975fcb1ef1d5620
|
7
|
+
data.tar.gz: c427e7e8d19676701a03ecaa7c25085435a4a8605eed5556964b3bbf675e097bab2128d15481772ac4fb600c6a675b8a1317c4bd0ce144ab32a8d3c3be8a87a1
|
data/lib/sauce/config.rb
CHANGED
@@ -70,7 +70,7 @@ module Sauce
|
|
70
70
|
selenium-version command-timeout prerun prerun-args screen-resolution
|
71
71
|
disable-popup-handler avoid-proxy public name iedriver-version parent-tunnel
|
72
72
|
time-zone device-orientation record-logs webdriver-remote-quiet-exceptions
|
73
|
-
iedriver-version
|
73
|
+
iedriver-version chromeOptions
|
74
74
|
}
|
75
75
|
|
76
76
|
def self.get_application_port
|
data/lib/sauce/selenium.rb
CHANGED
@@ -56,9 +56,12 @@ module Sauce
|
|
56
56
|
http_client = ::Selenium::WebDriver::Remote::Http::Persistent.new
|
57
57
|
http_client.timeout = 300 # Browser launch can take a while
|
58
58
|
|
59
|
+
desired_capabilities = @config.to_desired_capabilities
|
60
|
+
Sauce.logger.debug "Desired Capabilities at creation: #{desired_capabilities}"
|
61
|
+
|
59
62
|
@driver = Sauce.webdriver_method.call(:remote,
|
60
63
|
:url => "http://#{@config.username}:#{@config.access_key}@#{@config.host}:#{@config.port}/wd/hub",
|
61
|
-
:desired_capabilities =>
|
64
|
+
:desired_capabilities => desired_capabilities,
|
62
65
|
:http_client => http_client)
|
63
66
|
http_client.timeout = 90 # Once the browser is up, commands should time out reasonably
|
64
67
|
|
data/lib/sauce/version.rb
CHANGED
@@ -76,6 +76,10 @@ def run_parallel_tests(t, args, command)
|
|
76
76
|
skip_check = (skip_check_string == 'true')
|
77
77
|
|
78
78
|
warn_of_skipped_parallel_processes if skip_check
|
79
|
+
|
80
|
+
if defined? WebMock
|
81
|
+
WebMock.disable! if ENV['DISABLE_WEBMOCK_FOR_RAKE'] == 'true'
|
82
|
+
end
|
79
83
|
|
80
84
|
if((ParallelTests.number_of_running_processes == 0) || skip_check)
|
81
85
|
username = ENV["SAUCE_USERNAME"].to_s
|
data/spec/cucumber_helper.rb
CHANGED
data/spec/sauce/capybara_spec.rb
CHANGED
@@ -312,7 +312,13 @@ describe Sauce::Capybara do
|
|
312
312
|
Sauce.driver_pool[Thread.current.object_id] = nil
|
313
313
|
end
|
314
314
|
|
315
|
-
|
315
|
+
xit "should use one of the Sauce Connect ports", :capybara_version => ["2.5.0", "2.9.9"], :js => true do
|
316
|
+
reset_capybara(2.5)
|
317
|
+
used_port = Capybara.current_session.server.port
|
318
|
+
Sauce::Config::POTENTIAL_PORTS.should include used_port
|
319
|
+
end
|
320
|
+
|
321
|
+
it "should use one of the Sauce Connect ports", :capybara_version => [2, "2.4.9"], :js => true do
|
316
322
|
reset_capybara(2.0)
|
317
323
|
used_port = Capybara.current_session.server.port
|
318
324
|
Sauce::Config::POTENTIAL_PORTS.should include used_port
|
@@ -371,6 +377,8 @@ describe Sauce::Capybara do
|
|
371
377
|
config.automatic_reload = true
|
372
378
|
config.ignore_hidden_elements = true
|
373
379
|
config.server_port = nil
|
380
|
+
when capy_version >= 2.5
|
381
|
+
config.default_max_wait_time = 2
|
374
382
|
end
|
375
383
|
|
376
384
|
config.run_server = true
|
@@ -209,6 +209,14 @@ describe Sauce::Config do
|
|
209
209
|
|
210
210
|
it { should have_key :'iedriver-version' }
|
211
211
|
end
|
212
|
+
|
213
|
+
context 'chromeOptions' do
|
214
|
+
subject do
|
215
|
+
Sauce::Config.new('chromeOptions' => 'some_setting').to_desired_capabilities
|
216
|
+
end
|
217
|
+
|
218
|
+
it { should have_key :'chromeOptions' }
|
219
|
+
end
|
212
220
|
end
|
213
221
|
|
214
222
|
context 'with a :name set' do
|
data/spec/sauce/cucumber_spec.rb
CHANGED
@@ -62,6 +62,7 @@ module Sauce::Capybara
|
|
62
62
|
let(:driver) do
|
63
63
|
driver = double('Sauce::Selenium2 Driver')
|
64
64
|
driver.stub(:finish!)
|
65
|
+
driver.stub(:session_id).and_return(session_id)
|
65
66
|
driver.stub_chain(:browser, :quit)
|
66
67
|
driver.stub_chain(:browser, :session_id).and_return(session_id)
|
67
68
|
driver
|
@@ -71,7 +72,8 @@ module Sauce::Capybara
|
|
71
72
|
# Need to create our nice mocked Capybara driver
|
72
73
|
Capybara.stub_chain(:current_session, :driver).and_return(driver)
|
73
74
|
SauceWhisk::Job.stub(:new).and_return(nil)
|
74
|
-
Sauce::Selenium2.stub(:new).with(anything).and_return
|
75
|
+
Sauce::Selenium2.stub(:new).with(anything).and_return driver
|
76
|
+
|
75
77
|
Sauce.config do |c|
|
76
78
|
c[:browsers] = [
|
77
79
|
["OS X 10.8", "Safari", "6"],
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sauce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Lacey
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date:
|
17
|
+
date: 2016-01-20 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: rspec
|