frank-cucumber 0.7.5 → 0.7.6
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.
- data/frank-skeleton/libFrank.a +0 -0
- data/lib/frank-cucumber/core_frank_steps.rb +8 -35
- data/lib/frank-cucumber/version.rb +1 -1
- metadata +4 -43
- data/Frank/features/my_first.feature +0 -12
- data/Frank/features/step_definitions/launch_steps.rb +0 -41
- data/Frank/features/support/env.rb +0 -1
- data/Frank/frank_static_resources.bundle/images/ajax-loader.gif +0 -0
- data/Frank/frank_static_resources.bundle/images/file.gif +0 -0
- data/Frank/frank_static_resources.bundle/images/folder-closed.gif +0 -0
- data/Frank/frank_static_resources.bundle/images/folder.gif +0 -0
- data/Frank/frank_static_resources.bundle/images/minus.gif +0 -0
- data/Frank/frank_static_resources.bundle/images/plus.gif +0 -0
- data/Frank/frank_static_resources.bundle/images/treeview-black-line.gif +0 -0
- data/Frank/frank_static_resources.bundle/images/treeview-black.gif +0 -0
- data/Frank/frank_static_resources.bundle/images/treeview-default-line.gif +0 -0
- data/Frank/frank_static_resources.bundle/images/treeview-default.gif +0 -0
- data/Frank/frank_static_resources.bundle/images/treeview-famfamfam-line.gif +0 -0
- data/Frank/frank_static_resources.bundle/images/treeview-famfamfam.gif +0 -0
- data/Frank/frank_static_resources.bundle/images/treeview-gray-line.gif +0 -0
- data/Frank/frank_static_resources.bundle/images/treeview-gray.gif +0 -0
- data/Frank/frank_static_resources.bundle/images/treeview-red-line.gif +0 -0
- data/Frank/frank_static_resources.bundle/images/treeview-red.gif +0 -0
- data/Frank/frank_static_resources.bundle/index.haml +0 -64
- data/Frank/frank_static_resources.bundle/index.html +0 -89
- data/Frank/frank_static_resources.bundle/jquery-ui.css +0 -571
- data/Frank/frank_static_resources.bundle/jquery-ui.min.js +0 -405
- data/Frank/frank_static_resources.bundle/jquery.min.js +0 -19
- data/Frank/frank_static_resources.bundle/jquery.treeview.css +0 -68
- data/Frank/frank_static_resources.bundle/jquery.treeview.js +0 -251
- data/Frank/frank_static_resources.bundle/json2.js +0 -481
- data/Frank/frank_static_resources.bundle/raphael-min.js +0 -7
- data/Frank/frank_static_resources.bundle/symbiote.css +0 -127
- data/Frank/frank_static_resources.bundle/symbiote.js +0 -512
- data/Frank/frank_static_resources.bundle/underscore.js +0 -770
- data/Frank/libFrank.a +0 -0
data/frank-skeleton/libFrank.a
CHANGED
Binary file
|
@@ -101,7 +101,7 @@ Then /^I should see a nonhidden button marked "([^\"]*)"$/ do |expected_mark|
|
|
101
101
|
end
|
102
102
|
|
103
103
|
Then /^I should see an element of class "([^\"]*)"$/ do |className|
|
104
|
-
|
104
|
+
element_is_not_hidden("view:'#{className}'").should be_true
|
105
105
|
end
|
106
106
|
|
107
107
|
Then /^I should not see an element of class "([^\"]*)"$/ do |className|
|
@@ -235,48 +235,21 @@ end
|
|
235
235
|
|
236
236
|
# -- switch -- #
|
237
237
|
|
238
|
-
When /^I flip switch "([^\"]*)" on$/ do |mark|
|
239
|
-
selector = "view:'UISwitch' marked:'#{mark}'"
|
240
|
-
views_switched = frankly_map( selector, 'setOn:animated:', true, true )
|
241
|
-
raise "could not find anything matching [#{uiquery}] to switch" if views_switched.empty?
|
242
|
-
end
|
243
|
-
|
244
|
-
When /^I flip switch "([^\"]*)" off$/ do |mark|
|
245
|
-
selector = "view:'UISwitch' marked:'#{mark}'"
|
246
|
-
views_switched = frankly_map( selector, 'setOn:animated:', false, true )
|
247
|
-
raise "could not find anything matching [#{uiquery}] to switch" if views_switched.empty?
|
248
|
-
end
|
249
|
-
|
250
238
|
When /^I flip switch "([^\"]*)"$/ do |mark|
|
251
239
|
touch("view:'UISwitch' marked:'#{mark}'")
|
252
240
|
end
|
253
241
|
|
254
|
-
Then /^switch "([^\"]*)" should be on$/ do |mark|
|
255
|
-
|
256
|
-
switch_states = frankly_map( "view accesibilityLabel:'#{mark}'", "isOn" )
|
257
|
-
puts "test #{switch_states.inspect}"
|
258
|
-
|
259
|
-
if switch_states == 0
|
260
|
-
puts "Switch #{mark} is ON"
|
261
|
-
else
|
262
|
-
puts "Switch #{mark} is OFF, flim switch ON"
|
263
|
-
Then %Q|I flip switch "#{mark}"|
|
264
|
-
end
|
265
|
-
end
|
242
|
+
Then /^switch "([^\"]*)" should be (on|off)$/ do |mark,expected_state|
|
243
|
+
expected_state = expected_state == 'on'
|
266
244
|
|
267
|
-
|
268
|
-
switch_states = frankly_map(
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
puts "Switch #{mark} is ON, flip switch OFF"
|
273
|
-
Then %Q|I flip switch "#{mark}"|
|
274
|
-
else
|
275
|
-
puts "Switch #{mark} is OFF"
|
245
|
+
selector = "view:'UISwitch' marked:'#{mark}'"
|
246
|
+
switch_states = frankly_map( selector, "isOn" )
|
247
|
+
|
248
|
+
switch_states.each do |switch_state|
|
249
|
+
switch_state.should == expected_state
|
276
250
|
end
|
277
251
|
end
|
278
252
|
|
279
|
-
|
280
253
|
# -- misc -- #
|
281
254
|
|
282
255
|
When /^I wait for ([\d\.]+) second(?:s)?$/ do |num_seconds|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 7
|
8
|
-
-
|
9
|
-
version: 0.7.
|
8
|
+
- 6
|
9
|
+
version: 0.7.6
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Pete Hodgson
|
@@ -15,14 +15,13 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-10-02 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: cucumber
|
23
23
|
prerelease: false
|
24
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
25
|
requirements:
|
27
26
|
- - ">="
|
28
27
|
- !ruby/object:Gem::Version
|
@@ -35,7 +34,6 @@ dependencies:
|
|
35
34
|
name: rspec
|
36
35
|
prerelease: false
|
37
36
|
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
-
none: false
|
39
37
|
requirements:
|
40
38
|
- - ">="
|
41
39
|
- !ruby/object:Gem::Version
|
@@ -49,7 +47,6 @@ dependencies:
|
|
49
47
|
name: sim_launcher
|
50
48
|
prerelease: false
|
51
49
|
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
-
none: false
|
53
50
|
requirements:
|
54
51
|
- - ">="
|
55
52
|
- !ruby/object:Gem::Version
|
@@ -62,7 +59,6 @@ dependencies:
|
|
62
59
|
name: plist
|
63
60
|
prerelease: false
|
64
61
|
requirement: &id004 !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
62
|
requirements:
|
67
63
|
- - ">="
|
68
64
|
- !ruby/object:Gem::Version
|
@@ -75,7 +71,6 @@ dependencies:
|
|
75
71
|
name: json
|
76
72
|
prerelease: false
|
77
73
|
requirement: &id005 !ruby/object:Gem::Requirement
|
78
|
-
none: false
|
79
74
|
requirements:
|
80
75
|
- - ">="
|
81
76
|
- !ruby/object:Gem::Version
|
@@ -95,38 +90,6 @@ extra_rdoc_files: []
|
|
95
90
|
|
96
91
|
files:
|
97
92
|
- .gitignore
|
98
|
-
- Frank/features/my_first.feature
|
99
|
-
- Frank/features/step_definitions/launch_steps.rb
|
100
|
-
- Frank/features/support/env.rb
|
101
|
-
- Frank/frank_static_resources.bundle/images/ajax-loader.gif
|
102
|
-
- Frank/frank_static_resources.bundle/images/file.gif
|
103
|
-
- Frank/frank_static_resources.bundle/images/folder-closed.gif
|
104
|
-
- Frank/frank_static_resources.bundle/images/folder.gif
|
105
|
-
- Frank/frank_static_resources.bundle/images/minus.gif
|
106
|
-
- Frank/frank_static_resources.bundle/images/plus.gif
|
107
|
-
- Frank/frank_static_resources.bundle/images/treeview-black-line.gif
|
108
|
-
- Frank/frank_static_resources.bundle/images/treeview-black.gif
|
109
|
-
- Frank/frank_static_resources.bundle/images/treeview-default-line.gif
|
110
|
-
- Frank/frank_static_resources.bundle/images/treeview-default.gif
|
111
|
-
- Frank/frank_static_resources.bundle/images/treeview-famfamfam-line.gif
|
112
|
-
- Frank/frank_static_resources.bundle/images/treeview-famfamfam.gif
|
113
|
-
- Frank/frank_static_resources.bundle/images/treeview-gray-line.gif
|
114
|
-
- Frank/frank_static_resources.bundle/images/treeview-gray.gif
|
115
|
-
- Frank/frank_static_resources.bundle/images/treeview-red-line.gif
|
116
|
-
- Frank/frank_static_resources.bundle/images/treeview-red.gif
|
117
|
-
- Frank/frank_static_resources.bundle/index.haml
|
118
|
-
- Frank/frank_static_resources.bundle/index.html
|
119
|
-
- Frank/frank_static_resources.bundle/jquery-ui.css
|
120
|
-
- Frank/frank_static_resources.bundle/jquery-ui.min.js
|
121
|
-
- Frank/frank_static_resources.bundle/jquery.min.js
|
122
|
-
- Frank/frank_static_resources.bundle/jquery.treeview.css
|
123
|
-
- Frank/frank_static_resources.bundle/jquery.treeview.js
|
124
|
-
- Frank/frank_static_resources.bundle/json2.js
|
125
|
-
- Frank/frank_static_resources.bundle/raphael-min.js
|
126
|
-
- Frank/frank_static_resources.bundle/symbiote.css
|
127
|
-
- Frank/frank_static_resources.bundle/symbiote.js
|
128
|
-
- Frank/frank_static_resources.bundle/underscore.js
|
129
|
-
- Frank/libFrank.a
|
130
93
|
- Gemfile
|
131
94
|
- Rakefile
|
132
95
|
- bin/frank-skeleton
|
@@ -179,7 +142,6 @@ rdoc_options: []
|
|
179
142
|
require_paths:
|
180
143
|
- lib
|
181
144
|
required_ruby_version: !ruby/object:Gem::Requirement
|
182
|
-
none: false
|
183
145
|
requirements:
|
184
146
|
- - ">="
|
185
147
|
- !ruby/object:Gem::Version
|
@@ -187,7 +149,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
187
149
|
- 0
|
188
150
|
version: "0"
|
189
151
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
190
|
-
none: false
|
191
152
|
requirements:
|
192
153
|
- - ">="
|
193
154
|
- !ruby/object:Gem::Version
|
@@ -197,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
197
158
|
requirements: []
|
198
159
|
|
199
160
|
rubyforge_project:
|
200
|
-
rubygems_version: 1.3.
|
161
|
+
rubygems_version: 1.3.6
|
201
162
|
signing_key:
|
202
163
|
specification_version: 3
|
203
164
|
summary: Use cucumber to test native iOS apps via Frank
|
@@ -1,12 +0,0 @@
|
|
1
|
-
Feature:
|
2
|
-
As an iOS developer
|
3
|
-
I want to have a sample feature file
|
4
|
-
So I can see what my next step is in the wonderful world of Frank/Cucumber testing
|
5
|
-
|
6
|
-
Scenario:
|
7
|
-
Rotating the simulator for demonstration purposes
|
8
|
-
Given I launch the app
|
9
|
-
Given the device is in landscape orientation
|
10
|
-
Given the device is in portrait orientation
|
11
|
-
Given the device is in landscape orientation
|
12
|
-
Given the device is in portrait orientation
|
@@ -1,41 +0,0 @@
|
|
1
|
-
Given /^I launch the app$/ do
|
2
|
-
|
3
|
-
# kill the app if it's already running, just in case this helps
|
4
|
-
# reduce simulator flakiness when relaunching the app. Use a timeout of 5 seconds to
|
5
|
-
# prevent us hanging around for ages waiting for the ping to fail if the app isn't running
|
6
|
-
begin
|
7
|
-
Timeout::timeout(5) { press_home_on_simulator if frankly_ping }
|
8
|
-
rescue Timeout::Error
|
9
|
-
end
|
10
|
-
|
11
|
-
require 'sim_launcher'
|
12
|
-
|
13
|
-
app_path = ENV['APP_BUNDLE_PATH'] || APP_BUNDLE_PATH
|
14
|
-
raise "APP_BUNDLE_PATH was not set. \nPlease set a APP_BUNDLE_PATH ruby constant or environment variable to the path of your compiled Frankified iOS app bundle" if app_path.nil?
|
15
|
-
|
16
|
-
if( ENV['USE_SIM_LAUNCHER_SERVER'] )
|
17
|
-
simulator = SimLauncher::Client.for_iphone_app( app_path, "4.2" )
|
18
|
-
else
|
19
|
-
simulator = SimLauncher::DirectClient.for_iphone_app( app_path, "4.2" )
|
20
|
-
end
|
21
|
-
|
22
|
-
num_timeouts = 0
|
23
|
-
loop do
|
24
|
-
begin
|
25
|
-
simulator.relaunch
|
26
|
-
wait_for_frank_to_come_up
|
27
|
-
break # if we make it this far without an exception then we're good to move on
|
28
|
-
|
29
|
-
rescue Timeout::Error
|
30
|
-
num_timeouts += 1
|
31
|
-
puts "Encountered #{num_timeouts} timeouts while launching the app."
|
32
|
-
if num_timeouts > 3
|
33
|
-
raise "Encountered #{num_timeouts} timeouts in a row while trying to launch the app."
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
# TODO: do some kind of waiting check to see that your initial app UI is ready
|
39
|
-
# e.g. Then "I wait to see the login screen"
|
40
|
-
|
41
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
require 'frank-cucumber'
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,64 +0,0 @@
|
|
1
|
-
!!! 5
|
2
|
-
%html
|
3
|
-
%head
|
4
|
-
%meta(charset="utf-8")
|
5
|
-
%title Symbiote
|
6
|
-
|
7
|
-
%script(src="jquery.min.js")
|
8
|
-
%script(src="jquery-ui.min.js")
|
9
|
-
%script(src="raphael-min.js")
|
10
|
-
%script(src="jquery.treeview.js")
|
11
|
-
%script(src="json2.js")
|
12
|
-
%script(src="underscore.js")
|
13
|
-
%script(src="symbiote.js")
|
14
|
-
%link(href="jquery-ui.css" rel="stylesheet")
|
15
|
-
%link(href="jquery.treeview.css" rel="stylesheet")
|
16
|
-
%link(href="symbiote.css" rel="stylesheet")
|
17
|
-
|
18
|
-
%body
|
19
|
-
#header
|
20
|
-
#main-tab-1
|
21
|
-
%h1 symbiote
|
22
|
-
%i From here you can inspect the current state of the app's UI, and test which UI elements a selector will select
|
23
|
-
|
24
|
-
%div
|
25
|
-
%table.symbiote_shell
|
26
|
-
%tr.ui-widget
|
27
|
-
%td
|
28
|
-
#selector-test
|
29
|
-
%label(for="query") Selector
|
30
|
-
%input#query(placeholder="label marked:'Search'")
|
31
|
-
%button#flash_button Flash
|
32
|
-
%td
|
33
|
-
#refresh
|
34
|
-
%img#loading(src="images/ajax-loader.gif")
|
35
|
-
%button#dump_button Refresh
|
36
|
-
%tr
|
37
|
-
%td
|
38
|
-
#list-tabs
|
39
|
-
%ul
|
40
|
-
%li
|
41
|
-
%a(href="#dom_dump") View Heirarchy
|
42
|
-
%li
|
43
|
-
%a(href="#accessible-views-tab") Accessible Elements
|
44
|
-
#dom_dump
|
45
|
-
%ul
|
46
|
-
#accessible-views-tab
|
47
|
-
%div.hints
|
48
|
-
%p Here is a list of all elements with accessibility labels.
|
49
|
-
%p Clicking on a row will flash that view element in the simulator. Hover over a row to see the selector used to flash that view element.
|
50
|
-
#accessible-views
|
51
|
-
%td
|
52
|
-
#inspect-tabs
|
53
|
-
%ul
|
54
|
-
%li
|
55
|
-
%a(href="#dom_detail") View Properties
|
56
|
-
%li
|
57
|
-
%a(href="#ui-locator") View Locator
|
58
|
-
#ui-locator
|
59
|
-
#ui-locator-view
|
60
|
-
#live-view
|
61
|
-
%button start Live View
|
62
|
-
|
63
|
-
#dom_detail
|
64
|
-
%p Click an element in the view heirarchy on the right to see details of that element here.
|
@@ -1,89 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset='utf-8' />
|
5
|
-
<title>Symbiote</title>
|
6
|
-
<script src='jquery.min.js'></script>
|
7
|
-
<script src='jquery-ui.min.js'></script>
|
8
|
-
<script src='raphael-min.js'></script>
|
9
|
-
<script src='jquery.treeview.js'></script>
|
10
|
-
<script src='json2.js'></script>
|
11
|
-
<script src='underscore.js'></script>
|
12
|
-
<script src='symbiote.js'></script>
|
13
|
-
<link href='jquery-ui.css' rel='stylesheet' />
|
14
|
-
<link href='jquery.treeview.css' rel='stylesheet' />
|
15
|
-
<link href='symbiote.css' rel='stylesheet' />
|
16
|
-
</head>
|
17
|
-
<body>
|
18
|
-
<div id='header'>
|
19
|
-
<div id='main-tab-1'>
|
20
|
-
<h1>symbiote</h1>
|
21
|
-
<i>From here you can inspect the current state of the app's UI, and test which UI elements a selector will select</i>
|
22
|
-
</div>
|
23
|
-
</div>
|
24
|
-
<div>
|
25
|
-
<table class='symbiote_shell'>
|
26
|
-
<tr class='ui-widget'>
|
27
|
-
<td>
|
28
|
-
<div id='selector-test'>
|
29
|
-
<label for='query'>Selector</label>
|
30
|
-
<input id='query' placeholder="label marked:'Search'" />
|
31
|
-
<button id='flash_button'>Flash</button>
|
32
|
-
</div>
|
33
|
-
</td>
|
34
|
-
<td>
|
35
|
-
<div id='refresh'>
|
36
|
-
<img id='loading' src='images/ajax-loader.gif' />
|
37
|
-
<button id='dump_button'>Refresh</button>
|
38
|
-
</div>
|
39
|
-
</td>
|
40
|
-
</tr>
|
41
|
-
<tr>
|
42
|
-
<td>
|
43
|
-
<div id='list-tabs'>
|
44
|
-
<ul>
|
45
|
-
<li>
|
46
|
-
<a href='#dom_dump'>View Heirarchy</a>
|
47
|
-
</li>
|
48
|
-
<li>
|
49
|
-
<a href='#accessible-views-tab'>Accessible Elements</a>
|
50
|
-
</li>
|
51
|
-
</ul>
|
52
|
-
<div id='dom_dump'>
|
53
|
-
<ul></ul>
|
54
|
-
</div>
|
55
|
-
<div id='accessible-views-tab'>
|
56
|
-
<div class='hints'>
|
57
|
-
<p>Here is a list of all elements with accessibility labels.</p>
|
58
|
-
<p>Clicking on a row will flash that view element in the simulator. Hover over a row to see the selector used to flash that view element.</p>
|
59
|
-
</div>
|
60
|
-
<div id='accessible-views'></div>
|
61
|
-
</div>
|
62
|
-
</div>
|
63
|
-
</td>
|
64
|
-
<td>
|
65
|
-
<div id='inspect-tabs'>
|
66
|
-
<ul>
|
67
|
-
<li>
|
68
|
-
<a href='#dom_detail'>View Properties</a>
|
69
|
-
</li>
|
70
|
-
<li>
|
71
|
-
<a href='#ui-locator'>View Locator</a>
|
72
|
-
</li>
|
73
|
-
</ul>
|
74
|
-
<div id='ui-locator'>
|
75
|
-
<div id='ui-locator-view'></div>
|
76
|
-
<div id='live-view'>
|
77
|
-
<button>start Live View</button>
|
78
|
-
</div>
|
79
|
-
</div>
|
80
|
-
<div id='dom_detail'>
|
81
|
-
<p>Click an element in the view heirarchy on the right to see details of that element here.</p>
|
82
|
-
</div>
|
83
|
-
</div>
|
84
|
-
</td>
|
85
|
-
</tr>
|
86
|
-
</table>
|
87
|
-
</div>
|
88
|
-
</body>
|
89
|
-
</html>
|