mediawiki_selenium 0.2.4 → 0.2.5

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: bcb7891fbf75be73884f0199d9230a78b9b38685
4
- data.tar.gz: ad9e976abfa6a3cdb896fca5fa599e37f5e77b62
3
+ metadata.gz: ffe8c78e34aa74ad81455f7682b541885e0a878a
4
+ data.tar.gz: 93121410f05587f7af508b7c650c6feeb0421d07
5
5
  SHA512:
6
- metadata.gz: c2c9dc37b1c564a2069aa535b160e5e25db3c58d73b2dd920015f5f9df13ecc801a1bfdbadb16d0d2f4ced78227b9c40f1e8282e59d79a4688f6a02bfe5c0099
7
- data.tar.gz: a17df8fe567a3371203fd9adae423af42d7d5a1eb199e3da5c23d57451b65ba99adbe8ce9517fd001aaaf6164d4a952f36a69b649e70b541dd130e972607b025
6
+ metadata.gz: 726c8fa919d9375d9ade8a953080cfd7bb89fa14373f3c3cbfca2028f738c32657403ee2e1b69f645c0da73540c19ea3b12646a0bbc23741bbf0ef9967f5156c
7
+ data.tar.gz: 31e9d6c33688e8d7fd576fd2c38dba7d23a3da2b05bef915a6edecf21c29ebd42c7fa54732cf432ccf45182f0e873260af96f02a20e17527e7d019a5c21dcc71
@@ -9,25 +9,26 @@ mediawiki_selenium top-level directory and at
9
9
  https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/CREDITS.
10
10
  =end
11
11
 
12
+ Before("@custom-browser") do |scenario|
13
+ @scenario = scenario
14
+ end
15
+
12
16
  Before("@login") do
13
17
  ENV["MEDIAWIKI_PASSWORD"] = ENV[ENV["MEDIAWIKI_PASSWORD_VARIABLE"]] if ENV["MEDIAWIKI_PASSWORD_VARIABLE"]
14
18
  puts "MEDIAWIKI_USER environment variable is not defined! Please export a value for that variable before proceeding." unless ENV["MEDIAWIKI_USER"]
15
19
  puts "MEDIAWIKI_PASSWORD environment variable is not defined! Please export a value for that variable before proceeding." unless ENV["MEDIAWIKI_PASSWORD"]
16
20
  end
17
21
 
18
- def tagged_with?(scenario, tag)
19
- scenario.feature_tags.tags.map{|tag| tag.name}.include? tag
20
- end
21
22
  Before do |scenario|
22
23
  @random_string = Random.new.rand.to_s
23
24
  if ENV["REUSE_BROWSER"] == "true" and $browser # CirrusSearch and VisualEditor need this
24
25
  @browser = $browser
26
+ elsif scenario.source_tag_names.include? "@custom-browser"
27
+ # browser will be started in Cucumber step
25
28
  else
26
- unless tagged_with?(scenario, "@custom-browser")
27
- @browser = browser(environment, test_name(scenario), "default")
28
- $browser = @browser # CirrusSearch and VisualEditor need this
29
- $session_id = @browser.driver.instance_variable_get(:@bridge).session_id
30
- end
29
+ @browser = browser(environment, test_name(scenario), "default")
30
+ $browser = @browser # CirrusSearch and VisualEditor need this
31
+ $session_id = @browser.driver.instance_variable_get(:@bridge).session_id
31
32
  end
32
33
  end
33
34
 
@@ -10,5 +10,5 @@ https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/CREDITS.
10
10
  =end
11
11
 
12
12
  module MediawikiSelenium
13
- VERSION = "0.2.4"
13
+ VERSION = "0.2.5"
14
14
  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.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris McMahon