mediawiki-selenium 0.0.6 → 0.0.7

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: 0dcef54dd1a6ef4602f00366025727fe350eecc7
4
- data.tar.gz: a96f8a05184055b00287ec52e61671f6fca1dcfd
3
+ metadata.gz: fc997d25060c62cb87658cc4aaf40194881a1eb4
4
+ data.tar.gz: 6de96e176f7e710414cc455e697d74a94b0e0b3b
5
5
  SHA512:
6
- metadata.gz: 57646104f01e3f842dfaf9e5d977092f65f7955cb331757123fb144e83d58e87074aa4b765f14b6ad90cf182dc7e70e2f3851b9cbc882f3d2815718cc296b6e8
7
- data.tar.gz: 5540a18845d53b99263294b5ed790d509bee133a5e95c1ae80ae60944b1b542ec4749ac96c79ec9d101f0a127621d154505b34de1a39c799f1b5f045166dad58
6
+ metadata.gz: 0dc75d585940b0b7142d40dd492c47320f125bd3371684f65cc25cc44bb8d89f6a56447f7357b887f2d809e0fbfdd17453ded24863bf64aaa0460b31ca6d4ce2
7
+ data.tar.gz: 2ab1deb00f460804aa248e3aa54eb2a332b187fbeb79cb89864e7ecbc1770c5a655983f6065a3c4cdfc17815fa503b265a865f53168f5f997f2cdf4907df0d33
@@ -91,7 +91,6 @@ def sauce_browser(test_name, language)
91
91
 
92
92
  browser
93
93
  end
94
-
95
94
  def test_name(scenario)
96
95
  if scenario.respond_to? :feature
97
96
  "#{scenario.feature.name}: #{scenario.name}"
@@ -115,8 +114,10 @@ end
115
114
  Before do |scenario|
116
115
  @config = config
117
116
  @random_string = Random.new.rand.to_s
118
- @browser = browser(environment, test_name(scenario), 'default') unless @language
119
- $session_id = @browser.driver.instance_variable_get(:@bridge).session_id
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
120
121
  end
121
122
 
122
123
  After do |scenario|
@@ -126,3 +127,22 @@ After do |scenario|
126
127
  end
127
128
  @browser.close unless ENV['KEEP_BROWSER_OPEN'] == 'true'
128
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
@@ -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.0.6"
14
+ VERSION = "0.0.7"
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.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zeljko Filipin