mediawiki-selenium 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: be6715f3523b3ff7b9fe5f10736d619973f3a0f3
4
- data.tar.gz: cbe18f76fcfd8e25aa2cd3e6422f8bf9d04ff913
3
+ metadata.gz: d8ad7e6cc48f2352af33df5d0987c48ae695b1b3
4
+ data.tar.gz: 43933c40add6ac0bd4e1d380cb5a73b02e8cf5d9
5
5
  SHA512:
6
- metadata.gz: dadac8b3b08bd338dc479b85cd4d76f0807d7b8034d6524b615e4ff88e9d8fd05e145186b7fa57d36796e9c0bfee9f206f0b16798bc5d319a664aeee6e6b3639
7
- data.tar.gz: 48a0799883915952a855a1e94c108c71947b1d0b118d2d5d6e6ec8759821893b76b742c04ba104018e05b2b5c54e96d25c3fbf088487da251d4aa787ae1af8fe
6
+ metadata.gz: 8dd0b43f5937440a797504ad153da4b2097894437a0fd0816bc63b60eac353d18c9ed47080372ca575aeba236c3e6c2c8b8aa90a32f1761c4dee3ebf28b351cb
7
+ data.tar.gz: bb70995b6f9d7943f1d03cf084069481b76679b2ded51c971d229d12f4e81f9a58baadf4067f45a92fc89db21eefb591e6c06898afe1d424c52fbb571b3b8eae
@@ -98,51 +98,3 @@ def test_name(scenario)
98
98
  "#{scenario.scenario_outline.feature.name}: #{scenario.scenario_outline.name}: #{scenario.name}"
99
99
  end
100
100
  end
101
-
102
- config = YAML.load_file('config/config.yml')
103
-
104
- Before('@login') do
105
- puts "MEDIAWIKI_USER environment variable is not defined! Please export a value for that variable before proceeding." unless ENV['MEDIAWIKI_USER']
106
- puts "MEDIAWIKI_PASSWORD environment variable is not defined! Please export a value for that variable before proceeding." unless ENV['MEDIAWIKI_PASSWORD']
107
- end
108
-
109
- Before('@language') do |scenario|
110
- @language = true
111
- @scenario = scenario
112
- end
113
-
114
- Before do |scenario|
115
- @config = config
116
- @random_string = Random.new.rand.to_s
117
- unless @language # only UniversalLanguageSelector needs this
118
- @browser = browser(environment, test_name(scenario), 'default')
119
- $session_id = @browser.driver.instance_variable_get(:@bridge).session_id
120
- end
121
- end
122
-
123
- After do |scenario|
124
- if environment == :saucelabs
125
- sauce_api(%Q{{"passed": #{scenario.passed?}}})
126
- sauce_api(%Q{{"public": true}})
127
- end
128
- @browser.close unless ENV['KEEP_BROWSER_OPEN'] == 'true'
129
- end
130
-
131
- # only UniversalLanguageSelector needs this
132
-
133
- Before('@uls-in-personal-only') do |scenario|
134
- if uls_position() != 'personal'
135
- scenario.skip_invoke!
136
- end
137
- end
138
-
139
- Before('@uls-in-sidebar-only') do |scenario|
140
- if uls_position() != 'interlanguage'
141
- scenario.skip_invoke!
142
- end
143
- end
144
-
145
- After('@reset-preferences-after') do |scenario|
146
- visit(ResetPreferencesPage)
147
- on(ResetPreferencesPage).submit_element.click
148
- end
@@ -0,0 +1,58 @@
1
+ =begin
2
+ This file is subject to the license terms in the LICENSE file found in the
3
+ mediawiki-selenium top-level directory of and at
4
+ https://github.com/zeljkofilipin/mediawiki-selenium/blob/master/LICENSE. No part of
5
+ mediawiki-selenium, including this file, may be copied, modified, propagated, or
6
+ distributed except according to the terms contained in the LICENSE file.
7
+ Copyright 2013 by the Mediawiki developers. See the CREDITS file in the
8
+ mediawiki-selenium top-level directory and at
9
+ https://github.com/zeljkofilipin/mediawiki-selenium/blob/master//CREDITS.
10
+ =end
11
+
12
+ config = YAML.load_file('config/config.yml')
13
+
14
+ Before('@login') do
15
+ puts "MEDIAWIKI_USER environment variable is not defined! Please export a value for that variable before proceeding." unless ENV['MEDIAWIKI_USER']
16
+ puts "MEDIAWIKI_PASSWORD environment variable is not defined! Please export a value for that variable before proceeding." unless ENV['MEDIAWIKI_PASSWORD']
17
+ end
18
+
19
+ Before('@language') do |scenario|
20
+ @language = true
21
+ @scenario = scenario
22
+ end
23
+
24
+ Before do |scenario|
25
+ @config = config
26
+ @random_string = Random.new.rand.to_s
27
+ unless @language # only UniversalLanguageSelector needs this
28
+ @browser = browser(environment, test_name(scenario), 'default')
29
+ $session_id = @browser.driver.instance_variable_get(:@bridge).session_id
30
+ end
31
+ end
32
+
33
+ After do |scenario|
34
+ if environment == :saucelabs
35
+ sauce_api(%Q{{"passed": #{scenario.passed?}}})
36
+ sauce_api(%Q{{"public": true}})
37
+ end
38
+ @browser.close unless ENV['KEEP_BROWSER_OPEN'] == 'true'
39
+ end
40
+
41
+ # only UniversalLanguageSelector needs this
42
+
43
+ Before('@uls-in-personal-only') do |scenario|
44
+ if uls_position() != 'personal'
45
+ scenario.skip_invoke!
46
+ end
47
+ end
48
+
49
+ Before('@uls-in-sidebar-only') do |scenario|
50
+ if uls_position() != 'interlanguage'
51
+ scenario.skip_invoke!
52
+ end
53
+ end
54
+
55
+ After('@reset-preferences-after') do |scenario|
56
+ visit(ResetPreferencesPage)
57
+ on(ResetPreferencesPage).submit_element.click
58
+ end
@@ -11,6 +11,6 @@ https://github.com/zeljkofilipin/mediawiki-selenium/blob/master//CREDITS.
11
11
 
12
12
  module Mediawiki
13
13
  module Selenium
14
- VERSION = "0.1.0"
14
+ VERSION = "0.1.1"
15
15
  end
16
16
  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: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zeljko Filipin
@@ -55,6 +55,7 @@ files:
55
55
  - Rakefile
56
56
  - lib/mediawiki/selenium.rb
57
57
  - lib/mediawiki/selenium/env.rb
58
+ - lib/mediawiki/selenium/hooks.rb
58
59
  - lib/mediawiki/selenium/sauce.rb
59
60
  - lib/mediawiki/selenium/version.rb
60
61
  - mediawiki-selenium.gemspec