lapis_lazuli 0.8.3 → 0.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lapis_lazuli/browser.rb +17 -12
- data/lib/lapis_lazuli/generators/cucumber/template/Gemfile +0 -8
- data/lib/lapis_lazuli/generators/cucumber/template/README.md +1 -2
- data/lib/lapis_lazuli/generators/cucumber/template/features/step_definitions/interaction_steps.rb +1 -0
- data/lib/lapis_lazuli/generators/cucumber/template/features/support/env.rb +1 -4
- data/lib/lapis_lazuli/version.rb +1 -1
- data/lib/lapis_lazuli/world/config.rb +6 -5
- data/test/Gemfile +5 -3
- metadata +2 -3
- data/lib/lapis_lazuli/generators/cucumber/template/features/support/transition.rb +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2bebf64aeca1c948f45544ac60273db8c0c8fabe
|
4
|
+
data.tar.gz: 1777385b63b22f4c3f50fdbd9d16a56b59446dd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5152719d302e2bfe8bee2c05824f399d1b4c1bc2cf16f338b9c86dc83cfd37ba73e25d1f695e06e7799abe7c6786f18dd747934b6762a08630985116fc2b5ca7
|
7
|
+
data.tar.gz: de3bf954373b2e550b39f49e908d2a1d989753746cf5f56a983ed947f990b0a230f97884a03b4a5f422e6fc674682aee5d12f153abfb3cfd6c6e710fee12a719
|
data/lib/lapis_lazuli/browser.rb
CHANGED
@@ -6,10 +6,6 @@
|
|
6
6
|
# All rights reserved.
|
7
7
|
#
|
8
8
|
|
9
|
-
require 'selenium-webdriver'
|
10
|
-
require 'watir-webdriver'
|
11
|
-
require "watir-webdriver/extensions/alerts"
|
12
|
-
|
13
9
|
require "lapis_lazuli/ast"
|
14
10
|
|
15
11
|
# Modules
|
@@ -50,7 +46,7 @@ module LapisLazuli
|
|
50
46
|
def browsers
|
51
47
|
return @@browsers
|
52
48
|
end
|
53
|
-
|
49
|
+
|
54
50
|
def add_browser(b)
|
55
51
|
# Add destructor for all browsers
|
56
52
|
Runtime.instance.set_if(self, :browsers, LapisLazuli::Browser.method(:close_all))
|
@@ -267,6 +263,15 @@ module LapisLazuli
|
|
267
263
|
# Create a new browser depending on settings
|
268
264
|
# Always cached the supplied arguments
|
269
265
|
def create_driver(browser_wanted=nil, optional_data=nil)
|
266
|
+
# Run-time dependency.
|
267
|
+
begin
|
268
|
+
require 'selenium-webdriver'
|
269
|
+
require 'watir-webdriver'
|
270
|
+
require "watir-webdriver/extensions/alerts"
|
271
|
+
rescue LoadError => err
|
272
|
+
raise LoadError, "#{err}: you need to add 'watir-webdriver', 'watir-webdriver-performance' and 'watir-scroll' to your Gemfile before using the browser."
|
273
|
+
end
|
274
|
+
|
270
275
|
# No browser? Does the config have a browser? Default to firefox
|
271
276
|
if browser_wanted.nil?
|
272
277
|
browser_wanted = world.env_or_config('browser', 'firefox')
|
@@ -276,29 +281,29 @@ module LapisLazuli
|
|
276
281
|
case browser_wanted.to_s.downcase
|
277
282
|
when 'chrome'
|
278
283
|
# Check Platform running script
|
279
|
-
b = :chrome
|
284
|
+
b = [:chrome]
|
280
285
|
when 'safari'
|
281
|
-
b = :safari
|
286
|
+
b = [:safari]
|
282
287
|
when 'ie'
|
283
288
|
require 'rbconfig'
|
284
289
|
if (RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/)
|
285
|
-
b = :ie
|
290
|
+
b = [:ie]
|
286
291
|
else
|
287
292
|
world.error("You can't run IE tests on non-Windows machine")
|
288
293
|
end
|
289
294
|
when 'ios'
|
290
295
|
if RUBY_PLATFORM.downcase.include?("darwin")
|
291
|
-
b = :iphone
|
296
|
+
b = [:iphone]
|
292
297
|
else
|
293
298
|
world.error("You can't run IOS tests on non-mac machine")
|
294
299
|
end
|
295
300
|
when 'remote'
|
296
|
-
b = :remote
|
301
|
+
b = [:remote]
|
297
302
|
else
|
298
|
-
b = :firefox
|
303
|
+
b = [:firefox, marionette: true]
|
299
304
|
end
|
300
305
|
|
301
|
-
args =
|
306
|
+
args = b
|
302
307
|
@browser_name = b.to_s
|
303
308
|
if b == :remote
|
304
309
|
# Get the config
|
@@ -1,16 +1,9 @@
|
|
1
1
|
source 'http://rubygems.org'
|
2
2
|
|
3
|
-
|
4
3
|
# Add following two lines to your ~/.gemrc or /etc/gemrc:
|
5
4
|
# install: --no-rdoc --no-ri
|
6
5
|
# update: --no-rdoc --no-ri
|
7
6
|
|
8
|
-
# Install helper libraries
|
9
|
-
gem 'rspec'
|
10
|
-
gem 'gherkin'
|
11
|
-
gem 'xml-simple'
|
12
|
-
gem 'mechanize'
|
13
|
-
|
14
7
|
# Debuggers
|
15
8
|
platforms :ruby_18, :ruby_19 do
|
16
9
|
gem 'debugger'
|
@@ -26,7 +19,6 @@ platforms :mswin, :mingw do
|
|
26
19
|
gem 'term-ansicolor'
|
27
20
|
end
|
28
21
|
|
29
|
-
|
30
22
|
# Install all the webdriver gems and cucumber
|
31
23
|
gem 'watir-webdriver'
|
32
24
|
gem 'watir-webdriver-performance'
|
@@ -16,10 +16,9 @@ Author: "<%= config[:user] %>" <<%= config[:email] %>>
|
|
16
16
|
|
17
17
|
$ bundle install
|
18
18
|
|
19
|
-
- Run cucumber
|
19
|
+
- Run cucumber through bundler:
|
20
20
|
|
21
21
|
$ bundle exec cucumber
|
22
|
-
$ bundle exec regressinator legacy cucumber
|
23
22
|
|
24
23
|
# Contributing
|
25
24
|
|
data/lib/lapis_lazuli/version.rb
CHANGED
@@ -50,11 +50,6 @@ module WorldModule
|
|
50
50
|
|
51
51
|
load_config(Config.config_file)
|
52
52
|
|
53
|
-
if @config.nil?
|
54
|
-
warn "Could not load configuration from: #{Config.config_file}"
|
55
|
-
@config = {}
|
56
|
-
end
|
57
|
-
|
58
53
|
@metadata = Runtime.instance.set_if(self, :metadata) do
|
59
54
|
log.debug "Creating metadata storage"
|
60
55
|
Storage.new("metadata")
|
@@ -152,6 +147,12 @@ module WorldModule
|
|
152
147
|
raise "Error loading file: #{filename} #{err}"
|
153
148
|
end
|
154
149
|
|
150
|
+
# Fix up empty files
|
151
|
+
if @config.nil? or @config == false
|
152
|
+
warn "Could not load configuration from '#{Config.config_file}'; it might be empty or malformed."
|
153
|
+
@config = {}
|
154
|
+
end
|
155
|
+
|
155
156
|
# If we have an environment this config should have it
|
156
157
|
if not @env.nil? and not self.has_config?(@env)
|
157
158
|
raise "Environment doesn't exist in config file"
|
data/test/Gemfile
CHANGED
@@ -29,7 +29,6 @@ end
|
|
29
29
|
|
30
30
|
# Install all the webdriver gems and cucumber
|
31
31
|
gem 'watir-webdriver'
|
32
|
-
gem 'watir-webdriver-performance'
|
33
32
|
gem 'watir-scroll'
|
34
33
|
# For testing old versions of cucumber, swap the two lines below
|
35
34
|
gem 'cucumber', '>1.3.19'
|
@@ -37,6 +36,9 @@ gem 'cucumber', '>1.3.19'
|
|
37
36
|
|
38
37
|
# Testing related
|
39
38
|
gem 'simplecov'
|
39
|
+
gem 'test-unit'
|
40
40
|
|
41
|
-
# LapisLazul itself
|
42
|
-
|
41
|
+
# LapisLazul itself; test code should point to the current repo and branch
|
42
|
+
repo = `git config --get remote.origin.url`
|
43
|
+
branch = `git rev-parse --abbrev-ref HEAD`
|
44
|
+
gem 'lapis_lazuli', :git => repo, :branch => branch
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lapis_lazuli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Onno Steenbergen
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-
|
14
|
+
date: 2016-06-28 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
@@ -225,7 +225,6 @@ files:
|
|
225
225
|
- lib/lapis_lazuli/generators/cucumber/template/features/step_definitions/interaction_steps.rb
|
226
226
|
- lib/lapis_lazuli/generators/cucumber/template/features/step_definitions/validation_steps.rb
|
227
227
|
- lib/lapis_lazuli/generators/cucumber/template/features/support/env.rb
|
228
|
-
- lib/lapis_lazuli/generators/cucumber/template/features/support/transition.rb
|
229
228
|
- lib/lapis_lazuli/generic/assertions.rb
|
230
229
|
- lib/lapis_lazuli/generic/xpath.rb
|
231
230
|
- lib/lapis_lazuli/options.rb
|
@@ -1,12 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# All function in this file SHOULD not be used.
|
3
|
-
# There only included for backwards compatibility
|
4
|
-
#
|
5
|
-
|
6
|
-
##
|
7
|
-
# Creating a link for easy debugging afterwards
|
8
|
-
def create_link(name, url)
|
9
|
-
log.info("[DEPRECATED] [feature/support/transition.rb] create_link")
|
10
|
-
#Lets just send the url without the parameters to prevent html display problems
|
11
|
-
"<a href='#{url}' target='_blank'>#{name}</a>"
|
12
|
-
end
|