calabash-cucumber 0.9.21 → 0.9.22
Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ STEP_PAUSE = (ENV['STEP_PAUSE'] || 0.5).to_f
|
|
4
4
|
require 'rspec/expectations'
|
5
5
|
|
6
6
|
Given /^(my|the) app is running$/ do |_|
|
7
|
-
#no-op
|
7
|
+
#no-op exists for backwards compatibility
|
8
8
|
end
|
9
9
|
|
10
10
|
|
@@ -158,7 +158,7 @@ Then /^I wait and wait$/ do
|
|
158
158
|
sleep 4
|
159
159
|
end
|
160
160
|
|
161
|
-
Then /^I wait and wait and wait
|
161
|
+
Then /^I wait and wait and wait...$/ do
|
162
162
|
sleep 10
|
163
163
|
end
|
164
164
|
|
@@ -173,14 +173,28 @@ Then /^I go back$/ do
|
|
173
173
|
sleep(STEP_PAUSE)
|
174
174
|
end
|
175
175
|
|
176
|
-
Then /^take picture$/ do
|
176
|
+
Then /^(?:I\s)?take (?:picture|screenshot)$/ do
|
177
177
|
sleep(STEP_PAUSE)
|
178
178
|
screenshot
|
179
179
|
end
|
180
180
|
|
181
181
|
Then /^I swipe (left|right|up|down)$/ do |dir|
|
182
|
-
|
183
|
-
|
182
|
+
swipe(dir)
|
183
|
+
sleep(STEP_PAUSE)
|
184
|
+
end
|
185
|
+
|
186
|
+
Then /^I swipe (left|right|up|down) on number (\d+)$/ do |dir, index|
|
187
|
+
index = index.to_i
|
188
|
+
screenshot_and_raise "Index should be positive (was: #{index})" if (index<=0)
|
189
|
+
swipe(dir, {:query => "scrollView index:#{index-1}"})
|
190
|
+
sleep(STEP_PAUSE)
|
191
|
+
end
|
192
|
+
|
193
|
+
Then /^I swipe (left|right|up|down) on number (\d+) at x (\d+) and y (\d+)$/ do |dir, index, x, y|
|
194
|
+
index = index.to_i
|
195
|
+
screenshot_and_raise "Index should be positive (was: #{index})" if (index<=0)
|
196
|
+
swipe(dir, {:offset => {:x => x.to_i, :y => y.to_i}, :query => "scrollView index:#{index-1}"})
|
197
|
+
sleep(STEP_PAUSE)
|
184
198
|
end
|
185
199
|
|
186
200
|
Then /^I swipe (left|right|up|down) on "([^\"]*)"$/ do |dir, mark|
|
@@ -33,7 +33,23 @@ module Calabash
|
|
33
33
|
p_dir = dir.downcase
|
34
34
|
ws_dir == p_dir
|
35
35
|
}
|
36
|
-
|
36
|
+
if not info_plist.nil?
|
37
|
+
File.dirname(info_plist)
|
38
|
+
else
|
39
|
+
msg = ["Unable to find your built app."]
|
40
|
+
msg << "This means that Calabash can't automatically launch iOS simulator."
|
41
|
+
msg << "Searched in Xcode 4.x default: #{DEFAULT_DERIVED_DATA}"
|
42
|
+
msg << ""
|
43
|
+
msg << "To fix there are a couple of options:\n"
|
44
|
+
msg << "Option 1) Make sure you are running this command from your project directory, "
|
45
|
+
msg << "i.e., the directory containing your .xcodeproj file."
|
46
|
+
msg << "In Xcode, build your calabash target or scheme for simulator."
|
47
|
+
msg << "Check that your app can be found in\n #{File.expand_path("~/Library/Developer/Xcode/DerivedData")}"
|
48
|
+
msg << "\n\nOption 2). In features/support/launch.rb set APP_BUNDLE_PATH to"
|
49
|
+
msg << "the path where Xcode has built your Calabash target or scheme."
|
50
|
+
msg << "Alternatively you can use the environment variable APP_BUNDLE_PATH.\n"
|
51
|
+
raise msg.join("\n")
|
52
|
+
end
|
37
53
|
end
|
38
54
|
|
39
55
|
def self.project_dir
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calabash-cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.22
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-03-
|
12
|
+
date: 2012-03-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cucumber
|
16
|
-
requirement: &
|
16
|
+
requirement: &70329976661400 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70329976661400
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: json
|
27
|
-
requirement: &
|
27
|
+
requirement: &70329976660760 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70329976660760
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: CFPropertyList
|
38
|
-
requirement: &
|
38
|
+
requirement: &70329976660080 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70329976660080
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: sim_launcher
|
49
|
-
requirement: &
|
49
|
+
requirement: &70329976659660 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70329976659660
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: slowhandcuke
|
60
|
-
requirement: &
|
60
|
+
requirement: &70329976659240 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70329976659240
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: net-http-persistent
|
71
|
-
requirement: &
|
71
|
+
requirement: &70329976675180 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70329976675180
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: pbxproject
|
82
|
-
requirement: &
|
82
|
+
requirement: &70329976674760 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,7 +87,7 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70329976674760
|
91
91
|
description: calabash-cucumber drives tests for native iOS apps. You must link your
|
92
92
|
app with calabash-ios-server framework to execute tests.
|
93
93
|
email:
|
@@ -110,7 +110,6 @@ files:
|
|
110
110
|
- bin/calabash-ios-setup.rb
|
111
111
|
- bin/calabash-ios-sim.rb
|
112
112
|
- calabash-cucumber.gemspec
|
113
|
-
- copy_resources.sh
|
114
113
|
- doc/calabash-ios-help.txt
|
115
114
|
- epl-v10.html
|
116
115
|
- features-skeleton/.irbrc
|
data/copy_resources.sh
DELETED