mediawiki-selenium 0.1.17 → 0.1.18pre1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c4a10c5746c6c8a1b401d4f0d0878127d381b3b2
4
- data.tar.gz: b22975aff748b90c5b2e808ddb03d2900f64976f
3
+ metadata.gz: 84f241a0f439cd39868bee710c212cb5a576041d
4
+ data.tar.gz: a1ef6cc71d1232fa8af316873fc5ccd21866a65d
5
5
  SHA512:
6
- metadata.gz: 0a2008e8b08f41995f1b673543a33b5d702ded22e7f2d723c9dcb56a32be43dfb62797973634eed83b2879f090215124ee2071398acc9ac137a7d4201c5602aa
7
- data.tar.gz: e8dd32927c100c9d4cf930784c263bd2961859fffce69d1b07e0b4ea4e5241245de5264e35ea0e3c22e6744ed090791c320798f27b9a80b17c8e0b0f7e30ad98
6
+ metadata.gz: e530b8fdce20aadc4ea49da6b5cafc435b97dbbceb2a7c5600af38661d391b754471f6d4b5d6d73dd08255b6cdc403f3a4574d8f2b2a3b4aea9ce53ebc301990
7
+ data.tar.gz: 2ae2fc043eef8f0110515422fe51815f7d3996c2a0e575e19a6fa501be2eba3ecd16a56a874f922de3d14a9a58a0057ba8b08ed988fae20b7a4b2cf8d0d1a5dd
data/docs/jobs.md CHANGED
@@ -217,13 +217,6 @@
217
217
  - MediaWiki user: Uls
218
218
  - MediaWiki password variable: MEDIAWIKI_PASSWORD_ULS_WMFLABS_ORG
219
219
 
220
- ## UniversalLanguageSelector-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_8
221
- - Browser Label: internet_explorer_8
222
- - bundle exec cucumber: --tags @en.wikipedia.beta.wmflabs.org
223
- - MediaWiki URL: en.wikipedia.beta.wmflabs.org
224
- - MediaWiki user: Uls
225
- - MediaWiki password variable: MEDIAWIKI_PASSWORD_ULS_WMFLABS_ORG
226
-
227
220
  ## UniversalLanguageSelector-sandbox.translatewiki.net-linux-firefox
228
221
  - bundle exec cucumber: --tags @sandbox.translatewiki.net
229
222
  - MediaWiki URL: sandbox.translatewiki.net
@@ -75,44 +75,8 @@ RestClient::Request.execute(
75
75
  )
76
76
  end
77
77
  def sauce_browser(test_name, language)
78
- browsers = {
79
-
80
- "chrome" =>
81
- {"name" => "chrome",
82
- "platform" => "Linux",
83
- "version" => nil},
84
-
85
- "firefox" =>
86
- {"name" => "firefox",
87
- "platform" => "Linux",
88
- "version" => 26},
89
-
90
- "internet_explorer_6" =>
91
- {"name" => "internet_explorer",
92
- "platform" => "Windows XP",
93
- "version"=> 6},
94
-
95
- "internet_explorer_7" =>
96
- {"name" => "internet_explorer",
97
- "platform" => "Windows XP",
98
- "version"=> 7},
99
-
100
- "internet_explorer_8" =>
101
- {"name" => "internet_explorer",
102
- "platform" => "Windows XP",
103
- "version"=> 8},
104
-
105
- "internet_explorer_9" =>
106
- {"name" => "internet_explorer",
107
- "platform" => "Windows 7",
108
- "version"=> 9},
109
-
110
- "internet_explorer_10" =>
111
- {"name" => "internet_explorer",
112
- "platform" => "Windows 8",
113
- "version"=> 10}}
114
-
115
- browser_label = browsers[ENV["BROWSER_LABEL"]]
78
+ config = YAML.load_file("config/config.yml")
79
+ browser_label = config[ENV["BROWSER_LABEL"]]
116
80
 
117
81
  if language == "default"
118
82
  caps = Selenium::WebDriver::Remote::Capabilities.send(browser_label["name"])
@@ -9,6 +9,8 @@ mediawiki-selenium top-level directory and at
9
9
  https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/CREDITS.
10
10
  =end
11
11
 
12
+ config = YAML.load_file("config/config.yml")
13
+
12
14
  Before("@login") do
13
15
  ENV["MEDIAWIKI_PASSWORD"] = ENV[ENV["MEDIAWIKI_PASSWORD_VARIABLE"]] if ENV["MEDIAWIKI_PASSWORD_VARIABLE"]
14
16
  puts "MEDIAWIKI_USER environment variable is not defined! Please export a value for that variable before proceeding." unless ENV["MEDIAWIKI_USER"]
@@ -16,6 +18,7 @@ Before("@login") do
16
18
  end
17
19
 
18
20
  Before do |scenario|
21
+ @config = config
19
22
  @random_string = Random.new.rand.to_s
20
23
  if ENV["REUSE_BROWSER"] == "true" and $browser # CirrusSearch and VisualEditor need this
21
24
  @browser = $browser
@@ -13,8 +13,43 @@ require "cucumber/formatter/junit"
13
13
 
14
14
  module Cucumber::Formatter
15
15
  class Sauce < Junit
16
+
17
+ private
18
+
19
+ def build_testcase(duration, status, exception = nil, suffix = "")
20
+ @time += duration
21
+ classname = @feature_name
22
+ name = "#{@scenario}#{suffix}"
23
+ pending = [:pending, :undefined].include?(status) && (!@options[:strict])
24
+
25
+ @builder.testcase(:classname => classname, :name => name, :time => "%.6f" % duration) do
26
+ if status == :skipped || pending
27
+ @builder.skipped
28
+ @skipped += 1
29
+ elsif status != :passed
30
+ @builder.failure(:message => "#{status.to_s} #{name}", :type => status.to_s) do
31
+ @builder.cdata! @output
32
+ @builder.cdata!(format_exception(exception)) if exception
33
+ end
34
+ @failures += 1
35
+ elsif status == :passed
36
+ @builder.passed(:message => "#{status.to_s} #{name}", :type => status.to_s) do
37
+ @builder.cdata! @output
38
+ @builder.cdata!("Sauce Labs job URL: http://saucelabs.com/jobs/#{$session_id}\n")
39
+ end
40
+ end
41
+ @builder.tag!('system-out')
42
+ @builder.tag!('system-err')
43
+ end
44
+ @tests += 1
45
+ end
46
+
16
47
  def format_exception(exception)
17
- sauce_job_page = "Sauce Labs job URL: http://saucelabs.com/jobs/#{$session_id}\n"
48
+ if $session_id
49
+ sauce_job_page = "Sauce Labs job URL: http://saucelabs.com/jobs/#{$session_id}\n"
50
+ else
51
+ sauce_job_page = "Uh-oh. Could not find link to Sauce Labs job URL."
52
+ end
18
53
  ([sauce_job_page] + ["#{exception.message} (#{exception.class})"] + exception.backtrace).join("\n")
19
54
  end
20
55
  end
@@ -11,6 +11,6 @@ https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/CREDITS.
11
11
 
12
12
  module Mediawiki
13
13
  module Selenium
14
- VERSION = "0.1.17"
14
+ VERSION = "0.1.18pre1"
15
15
  end
16
16
  end
@@ -17,11 +17,11 @@ makes it easy to update the shared code.}
17
17
  spec.files = `git ls-files`.split($/)
18
18
  spec.require_paths = ["lib"]
19
19
 
20
- spec.add_runtime_dependency "cucumber"
21
- spec.add_runtime_dependency "json"
22
- spec.add_runtime_dependency "net-http-persistent"
23
- spec.add_runtime_dependency "page-object"
24
- spec.add_runtime_dependency "rest-client"
25
- spec.add_runtime_dependency "rspec-expectations"
26
- spec.add_runtime_dependency "syntax"
20
+ spec.add_runtime_dependency "cucumber", '~> 0'
21
+ spec.add_runtime_dependency "json", '~> 0'
22
+ spec.add_runtime_dependency "net-http-persistent", '~> 0'
23
+ spec.add_runtime_dependency "page-object", '~> 0'
24
+ spec.add_runtime_dependency "rest-client", '~> 0'
25
+ spec.add_runtime_dependency "rspec-expectations", '~> 0'
26
+ spec.add_runtime_dependency "syntax", '~> 0'
27
27
  end
metadata CHANGED
@@ -1,111 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mediawiki-selenium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.17
4
+ version: 0.1.18pre1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zeljko Filipin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-28 00:00:00.000000000 Z
11
+ date: 2014-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: json
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: net-http-persistent
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: page-object
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rest-client
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec-expectations
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: syntax
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  description: |-
@@ -149,9 +149,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
149
149
  version: '0'
150
150
  required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  requirements:
152
- - - ">="
152
+ - - ">"
153
153
  - !ruby/object:Gem::Version
154
- version: '0'
154
+ version: 1.3.1
155
155
  requirements: []
156
156
  rubyforge_project:
157
157
  rubygems_version: 2.2.0