calabash-cucumber 0.14.1 → 0.14.2.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dylibs/libCalabashDyn.dylib +0 -0
- data/dylibs/libCalabashDynSim.dylib +0 -0
- data/lib/calabash-cucumber/core.rb +34 -0
- data/lib/calabash-cucumber/map.rb +8 -9
- data/lib/calabash-cucumber/version.rb +2 -2
- data/staticlib/calabash.framework.zip +0 -0
- data/staticlib/libFrankCalabash.a +0 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3d24ef92d4b66bd13c1ceb292b84588c6adbc3e
|
4
|
+
data.tar.gz: 9206b69d1c119c7d97d6a2820e656af3771e5731
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 310f714054788df414ae01f55a3aec7cf1af8501bd3da89cae3e9b8bf771262eb53c9537319e6a89c8f2d14d6acb0bb8afd6c716d7bdc2e460a2c53f066a2269
|
7
|
+
data.tar.gz: a820f3287a1aedbd678010cd53056e201691aef72d4484bafc50587f6c5817caf24427097dca06a4ea44a9b4f18b1e92eb5c38ba46e55f8ac7e417317196dfa4
|
data/dylibs/libCalabashDyn.dylib
CHANGED
Binary file
|
Binary file
|
@@ -739,6 +739,40 @@ module Calabash
|
|
739
739
|
texts
|
740
740
|
end
|
741
741
|
|
742
|
+
# Set the sliders indicated by `uiquery` to `value`.
|
743
|
+
#
|
744
|
+
# @example
|
745
|
+
# slider_set_value "UISlider marked:'office slider'", 2
|
746
|
+
# slider_set_value "slider marked:'weather slider'", -1
|
747
|
+
# slider_set_value "* marked:'science slider'", 3
|
748
|
+
# slider_set_value "UISlider", 11
|
749
|
+
#
|
750
|
+
# @param [String] uiquery A query.
|
751
|
+
# @param [Number] value The value to set the slider to. value.to_s should
|
752
|
+
# produce a String representation of a Number.
|
753
|
+
# @param [options] options Options to control the behavior of the gesture.
|
754
|
+
# @option options [Boolean] :animate (true) Animate the change.
|
755
|
+
# @option options [Boolean] :notify_targets (true) Simulate a UIEvent by
|
756
|
+
# calling every target/action pair defined on the UISliders matching
|
757
|
+
# `uiquery`.
|
758
|
+
# @raise [RuntimeError] When setting the value of the sliders match by
|
759
|
+
# `uiquery` is not successful.
|
760
|
+
# @return [Array<String>] An array of query results.
|
761
|
+
def slider_set_value(uiquery, value, options={})
|
762
|
+
default_options = {:animate => true,
|
763
|
+
:notify_targets => true}
|
764
|
+
merged_options = default_options.merge(options)
|
765
|
+
|
766
|
+
value_str = value.to_s
|
767
|
+
|
768
|
+
args = [merged_options[:animate], merged_options[:notify_targets]]
|
769
|
+
views_touched = map(uiquery, :changeSlider, value_str, *args)
|
770
|
+
|
771
|
+
msg = "Could not set value of slider to '#{value}' using query '#{uiquery}'"
|
772
|
+
assert_map_results(views_touched, msg)
|
773
|
+
views_touched
|
774
|
+
end
|
775
|
+
|
742
776
|
# Calls a method on the app's AppDelegate object.
|
743
777
|
#
|
744
778
|
# This is an escape hatch for calling an arbitrary hook inside
|
@@ -78,24 +78,24 @@ module Calabash
|
|
78
78
|
res
|
79
79
|
end
|
80
80
|
|
81
|
-
#
|
81
|
+
# Asserts the result of a calabash `map` call and raises an error with
|
82
82
|
# `msg` if no valid results are found.
|
83
83
|
#
|
84
|
-
#
|
84
|
+
# Casual gem users should never need to call this method; this is a
|
85
85
|
# convenience method for gem maintainers.
|
86
86
|
#
|
87
|
-
#
|
87
|
+
# Raises an error if `map_results`:
|
88
88
|
#
|
89
89
|
# is an empty list #=> []
|
90
90
|
# contains a '<VOID>' string #=> [ "<VOID>" ]
|
91
91
|
# contains '*****' string #=> [ "*****" ]
|
92
92
|
# contains a single nil #=> [ nil ]
|
93
93
|
#
|
94
|
-
#
|
94
|
+
# When evaluating whether a `map` call is successful it is important to
|
95
95
|
# note that sometimes a <tt>[ nil ]</tt> or <tt>[nil, <val>, nil]</tt> is
|
96
96
|
# a valid result.
|
97
97
|
#
|
98
|
-
#
|
98
|
+
# Consider a controller with 3 labels:
|
99
99
|
#
|
100
100
|
# label @ index 0 has text "foo"
|
101
101
|
# label @ index 1 has text nil (the [label text] => nil)
|
@@ -104,13 +104,13 @@ module Calabash
|
|
104
104
|
# map('label', :text) => ['foo', nil, 'bar']
|
105
105
|
# map('label index:1', :text) => [nil]
|
106
106
|
#
|
107
|
-
#
|
107
|
+
# In other cases, <tt>[ nil ]</tt> should be treated as an invalid result
|
108
108
|
#
|
109
109
|
# # invalid
|
110
110
|
# > mark = 'mark does not exist'
|
111
111
|
# > map('tableView', :scrollToRowWithMark, mark, args) => [ nil ]
|
112
112
|
#
|
113
|
-
#
|
113
|
+
# Here a <tt>[ nil ]</tt> should be considered invalid because the
|
114
114
|
# the operation could not be performed because there is not row that
|
115
115
|
# matches `mark`
|
116
116
|
def assert_map_results(map_results, msg)
|
@@ -119,7 +119,6 @@ module Calabash
|
|
119
119
|
screenshot_and_raise msg
|
120
120
|
end
|
121
121
|
end
|
122
|
-
|
123
122
|
end
|
124
123
|
end
|
125
|
-
end
|
124
|
+
end
|
@@ -3,10 +3,10 @@ module Calabash
|
|
3
3
|
|
4
4
|
# @!visibility public
|
5
5
|
# The Calabash iOS gem version.
|
6
|
-
VERSION = '0.14.
|
6
|
+
VERSION = '0.14.2.pre1'
|
7
7
|
|
8
8
|
# @!visibility public
|
9
9
|
# The minimum required version of the Calabash embedded server.
|
10
|
-
MIN_SERVER_VERSION = '0.14.
|
10
|
+
MIN_SERVER_VERSION = '0.14.2.pre1'
|
11
11
|
end
|
12
12
|
end
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calabash-cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.2.pre1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karl Krukow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|
@@ -546,12 +546,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
546
546
|
version: '1.9'
|
547
547
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
548
548
|
requirements:
|
549
|
-
- - "
|
549
|
+
- - ">"
|
550
550
|
- !ruby/object:Gem::Version
|
551
|
-
version:
|
551
|
+
version: 1.3.1
|
552
552
|
requirements: []
|
553
553
|
rubyforge_project:
|
554
|
-
rubygems_version: 2.
|
554
|
+
rubygems_version: 2.2.2
|
555
555
|
signing_key:
|
556
556
|
specification_version: 4
|
557
557
|
summary: Client for calabash-ios-server for automated functional testing on iOS
|