cs-bdd 0.1.7 → 0.1.8
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 +4 -4
- data/cs-bdd.gemspec +5 -5
- data/lib/cs/bdd/version.rb +1 -1
- data/lib/skeleton/config/load_classes.rb +19 -7
- data/lib/templates/android_screen_base.tt +1 -1
- data/lib/templates/ios_screen_base.tt +8 -14
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 55d2a093c6961e2c5e2a152b82fb446e9ceba512
|
|
4
|
+
data.tar.gz: 331d7f14a87d6adba312b72a77ce76fd9364e478
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d924cc73f99007aaa9651b535c7e9c6cefdf8efca037a6709d9a49451d0540524a9035b91e0f5690fb8b6938a97b79d3127e5dd02ffdacf0d2aef1bb99ffd994
|
|
7
|
+
data.tar.gz: d0e695b319f4d9d29fa5be154b600b5ccde6b928e8348d06d4b5e74a32d6debc29a70b37ba6e4d7e087b5a1023e1d60b2756f6166fe5983d4a8c190144cb24da
|
data/cs-bdd.gemspec
CHANGED
|
@@ -18,9 +18,9 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
19
|
spec.require_paths = ['lib']
|
|
20
20
|
|
|
21
|
-
spec.add_runtime_dependency 'bundler', '>=1.7'
|
|
22
|
-
spec.add_runtime_dependency 'rake', '>=10.0'
|
|
23
|
-
spec.add_runtime_dependency 'thor', '>=0.19.1'
|
|
24
|
-
spec.add_runtime_dependency 'i18n', '>=0.6.11'
|
|
25
|
-
spec.add_runtime_dependency 'gherkin', '
|
|
21
|
+
spec.add_runtime_dependency 'bundler', '>= 1.7'
|
|
22
|
+
spec.add_runtime_dependency 'rake', '>= 10.0'
|
|
23
|
+
spec.add_runtime_dependency 'thor', '>= 0.19.1'
|
|
24
|
+
spec.add_runtime_dependency 'i18n', '>= 0.6.11'
|
|
25
|
+
spec.add_runtime_dependency 'gherkin', '2.12.2'
|
|
26
26
|
end
|
data/lib/cs/bdd/version.rb
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
|
-
# Choosing the platform using
|
|
2
|
-
#
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
platform = '
|
|
1
|
+
# Choosing the platform using two environment vars that are mandatory for
|
|
2
|
+
# calabash-ios console execution.
|
|
3
|
+
# If they are not set, then we are executing a calabash android console
|
|
4
|
+
# otherwise, if they are set, then we are execution calabash ios console
|
|
5
|
+
if ENV['APP_BUNDLE_PATH'].nil? && ENV['DEVICE_TARGET'].nil?
|
|
6
|
+
platform = 'android'
|
|
7
|
+
else
|
|
8
|
+
platform = 'ios'
|
|
7
9
|
end
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
puts "Loading #{platform} classes..."
|
|
12
|
+
|
|
13
|
+
features_path = File.join(File.expand_path('.', Dir.pwd), 'features')
|
|
14
|
+
|
|
15
|
+
# Loading the support ruby files
|
|
16
|
+
Dir[File.join(features_path, 'support', '*.rb')].each do |file|
|
|
17
|
+
# We can't load hook files in calabash console context
|
|
18
|
+
load file unless file.include? 'hooks.rb'
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
platform_path = File.join(features_path, platform)
|
|
10
22
|
|
|
11
23
|
# Loading all ruby files in the base screen path
|
|
12
24
|
Dir[File.join(platform_path, '*.rb')].each do |file|
|
|
@@ -45,7 +45,7 @@ class IOSScreenBase < Calabash::IBase
|
|
|
45
45
|
raise ElementNotFoundError, "ID: #{field_name}" unless
|
|
46
46
|
visible? public_send(method.to_s.sub('_visible!', ''))
|
|
47
47
|
else
|
|
48
|
-
super
|
|
48
|
+
super(method, args)
|
|
49
49
|
end
|
|
50
50
|
end
|
|
51
51
|
|
|
@@ -74,20 +74,14 @@ class IOSScreenBase < Calabash::IBase
|
|
|
74
74
|
end
|
|
75
75
|
|
|
76
76
|
def drag_to(direction, element = nil)
|
|
77
|
-
element = '
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
direction = :up
|
|
84
|
-
when :<%= (I18n.translate "directions.left").to_sym %>
|
|
85
|
-
positions = :left
|
|
86
|
-
when :<%= (I18n.translate "directions.right").to_sym %>
|
|
87
|
-
positions = :right
|
|
88
|
-
end
|
|
77
|
+
element = 'scrollView' if element.nil?
|
|
78
|
+
|
|
79
|
+
direction = { x: 0, y: 100 } if direction == <%= (I18n.translate "directions.up").to_sym %>
|
|
80
|
+
direction = { x: 0, y: -100 } if direction == <%= (I18n.translate "directions.down").to_sym %>
|
|
81
|
+
direction = { x: 100, y: 0 } if direction == <%= (I18n.translate "directions.left").to_sym %>
|
|
82
|
+
direction = { x: -100, y: 0 } if direction == <%= (I18n.translate "directions.right").to_sym %>
|
|
89
83
|
|
|
90
|
-
|
|
84
|
+
flick(element, direction)
|
|
91
85
|
sleep(1)
|
|
92
86
|
end
|
|
93
87
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cs-bdd
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Oscar Tanner
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-06
|
|
11
|
+
date: 2016-07-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -70,14 +70,14 @@ dependencies:
|
|
|
70
70
|
name: gherkin
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
|
-
- -
|
|
73
|
+
- - '='
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
75
|
version: 2.12.2
|
|
76
76
|
type: :runtime
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
|
-
- -
|
|
80
|
+
- - '='
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: 2.12.2
|
|
83
83
|
description: A simple gem to generate all files needed in a project that will support
|