mediawiki-selenium 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mediawiki/selenium/env.rb +9 -1
- data/lib/mediawiki/selenium/hooks.rb +1 -0
- data/lib/mediawiki/selenium/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7501ab3bba4da5dfaa544718171c9b4b566bd9b
|
4
|
+
data.tar.gz: 548654bddc85fd7348fa3ebeb3513f3f1f6b56bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d00878b27280b2128a4a6759fee11be34658dd05bc09692a62ec83a1cd001b70e5b5e283062ffedeef5af6da49aafedd02ff2eba844ccafa3d5a9983952101d
|
7
|
+
data.tar.gz: a5687247a63240570d75f4a566d8741c8e7836b8b5d77ac5719a182d1a7e95de68e666772d4c90ae003d6ae0a485836c8510b454467e0d0906d6f9fe7635cb8c
|
@@ -13,6 +13,7 @@ https://github.com/zeljkofilipin/mediawiki-selenium/blob/master//CREDITS.
|
|
13
13
|
require 'bundler/setup'
|
14
14
|
require 'page-object'
|
15
15
|
require 'page-object/page_factory'
|
16
|
+
require 'rest_client'
|
16
17
|
require 'watir-webdriver'
|
17
18
|
require 'yaml'
|
18
19
|
|
@@ -54,7 +55,14 @@ def local_browser(language)
|
|
54
55
|
end
|
55
56
|
end
|
56
57
|
def sauce_api(json)
|
57
|
-
|
58
|
+
RestClient::Request.execute(
|
59
|
+
:method => :put,
|
60
|
+
:url => "https://saucelabs.com/rest/v1/#{ENV['SAUCE_ONDEMAND_USERNAME']}/jobs/#{$session_id}",
|
61
|
+
:user => ENV['SAUCE_ONDEMAND_USERNAME'],
|
62
|
+
:password => ENV['SAUCE_ONDEMAND_ACCESS_KEY'],
|
63
|
+
:headers => {:content_type => "application/json"},
|
64
|
+
:payload => json
|
65
|
+
)
|
58
66
|
end
|
59
67
|
def sauce_browser(test_name, language)
|
60
68
|
config = YAML.load_file('config/config.yml')
|
@@ -34,6 +34,7 @@ After do |scenario|
|
|
34
34
|
if environment == :saucelabs
|
35
35
|
sauce_api(%Q{{"passed": #{scenario.passed?}}})
|
36
36
|
sauce_api(%Q{{"public": true}})
|
37
|
+
sauce_api(%Q{{"build": #{ENV['BUILD_NUMBER']}}}) if ENV['BUILD_NUMBER']
|
37
38
|
end
|
38
39
|
@browser.close unless ENV['KEEP_BROWSER_OPEN'] == 'true' or ENV['REUSE_BROWSER'] == 'true' # only CirrusSearch needs ENV['REUSE_BROWSER']
|
39
40
|
end
|