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 +4 -4
- data/lib/mediawiki_selenium/support/hooks.rb +9 -8
- 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: ffe8c78e34aa74ad81455f7682b541885e0a878a
|
4
|
+
data.tar.gz: 93121410f05587f7af508b7c650c6feeb0421d07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
27
|
-
|
28
|
-
|
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
|
|