mediawiki_selenium 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/RELEASES.md +4 -0
- data/UPGRADE.md +3 -3
- data/lib/mediawiki_selenium/remote_browser_factory.rb +4 -5
- data/lib/mediawiki_selenium/version.rb +1 -1
- data/spec/remote_browser_factory_spec.rb +40 -0
- 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: c55bb41a3040b8fe13f7959cb9471870fb964c47
|
4
|
+
data.tar.gz: d8dee93ee8a956288de1ae1e412e3512a2427689
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86045429284cab2eea77d9c5a2a8f76e7922d982c5ebb728e644ceea15b7126085a26872dd4790fe147f5bfd25f01e77a6baad6d4cbe515de1303dcc5b28fe5f
|
7
|
+
data.tar.gz: fc39ea530db1f558c0f61261b012e555bc6bc308b3ec17ce53330ae3a872f59f1fbbe28dda10c351d66b6dac982f74190ac5326cdee9bd1b50797ab6ff44968d
|
data/RELEASES.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
## Release notes
|
2
2
|
|
3
|
+
### 1.6.2 2015-10-23
|
4
|
+
* Fixed undefined `last_session_ids=` method bug in `RemoteBrowserFactory`
|
5
|
+
which entirely broke SauceLabs use in previous 1.6.x versions
|
6
|
+
|
3
7
|
### 1.6.1 2015-09-29
|
4
8
|
* Fixed bug in `UserFactory#user` and `UserFactory#password` that caused the
|
5
9
|
incorrect resolution of alternative users/passwords when in the context of
|
data/UPGRADE.md
CHANGED
@@ -3,14 +3,14 @@
|
|
3
3
|
You can check your current version by running `bundle list mediawiki_selenium`
|
4
4
|
in the root directory of your project.
|
5
5
|
|
6
|
-
## From 1.x releases to 1.6.
|
6
|
+
## From 1.x releases to 1.6.x
|
7
7
|
|
8
8
|
### Update your `Gemfile`
|
9
9
|
|
10
10
|
First, update the `Gemfile` in your project's root directory to specify the
|
11
11
|
new version.
|
12
12
|
|
13
|
-
gem 'mediawiki_selenium', '~> 1.6.
|
13
|
+
gem 'mediawiki_selenium', '~> 1.6.2'
|
14
14
|
|
15
15
|
### Update `require` paths in `env.rb`
|
16
16
|
|
@@ -37,7 +37,7 @@ if they don't apply to your test cases. The only must have is the first
|
|
37
37
|
First, update the `Gemfile` in your project's root directory to specify the
|
38
38
|
new version.
|
39
39
|
|
40
|
-
gem 'mediawiki_selenium', '~> 1.6.
|
40
|
+
gem 'mediawiki_selenium', '~> 1.6.2'
|
41
41
|
|
42
42
|
### Upgrade gems and dependencies
|
43
43
|
|
@@ -45,13 +45,12 @@ module MediawikiSelenium
|
|
45
45
|
def teardown(env, status)
|
46
46
|
artifacts = super
|
47
47
|
|
48
|
-
|
48
|
+
RemoteBrowserFactory.last_session_ids = []
|
49
49
|
|
50
50
|
each do |browser|
|
51
51
|
sid = browser.driver.session_id
|
52
|
-
|
53
|
-
|
54
|
-
key = url.password
|
52
|
+
username = env.lookup(:sauce_ondemand_username)
|
53
|
+
key = env.lookup(:sauce_ondemand_access_key)
|
55
54
|
|
56
55
|
RestClient::Request.execute(
|
57
56
|
method: :put,
|
@@ -66,7 +65,7 @@ module MediawikiSelenium
|
|
66
65
|
}.to_json
|
67
66
|
)
|
68
67
|
|
69
|
-
|
68
|
+
RemoteBrowserFactory.last_session_ids << sid
|
70
69
|
|
71
70
|
artifacts["http://saucelabs.com/jobs/#{sid}"] = 'text/url'
|
72
71
|
end
|
@@ -1,4 +1,6 @@
|
|
1
|
+
require 'rest_client'
|
1
2
|
require 'spec_helper'
|
3
|
+
|
2
4
|
require 'mediawiki_selenium/browser_factory/base'
|
3
5
|
|
4
6
|
module MediawikiSelenium
|
@@ -46,5 +48,43 @@ module MediawikiSelenium
|
|
46
48
|
end
|
47
49
|
end
|
48
50
|
end
|
51
|
+
|
52
|
+
describe '#teardown' do
|
53
|
+
subject { factory.teardown(env, status) }
|
54
|
+
|
55
|
+
let(:config) do
|
56
|
+
{
|
57
|
+
sauce_ondemand_username: 'foo',
|
58
|
+
sauce_ondemand_access_key: 'bar',
|
59
|
+
build_number: 'b123'
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
let(:env) { Environment.new(config) }
|
64
|
+
let(:status) { :passed }
|
65
|
+
|
66
|
+
before do
|
67
|
+
browser = double('Watir::Browser')
|
68
|
+
driver = double('Selenium::WebDriver::Driver')
|
69
|
+
|
70
|
+
expect(factory).to receive(:each).and_yield(browser)
|
71
|
+
expect(browser).to receive(:driver).and_return(driver)
|
72
|
+
expect(driver).to receive(:session_id).and_return('123')
|
73
|
+
end
|
74
|
+
|
75
|
+
it 'updates the SauceLabs session for each browser and returns the URL as an artifact' do
|
76
|
+
expect(RestClient::Request).to receive(:execute).with(
|
77
|
+
method: :put,
|
78
|
+
url: 'https://saucelabs.com/rest/v1/foo/jobs/123',
|
79
|
+
user: 'foo',
|
80
|
+
password: 'bar',
|
81
|
+
headers: { content_type: 'application/json' },
|
82
|
+
payload: '{"public":true,"passed":true,"build":"b123"}'
|
83
|
+
)
|
84
|
+
|
85
|
+
expect(subject).to include('http://saucelabs.com/jobs/123')
|
86
|
+
expect(subject['http://saucelabs.com/jobs/123']).to eq('text/url')
|
87
|
+
end
|
88
|
+
end
|
49
89
|
end
|
50
90
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mediawiki_selenium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris McMahon
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2015-
|
16
|
+
date: 2015-10-26 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: cucumber
|