frank-cucumber 1.2.3 → 1.2.4.pre1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 083f633f92ef8841aaf98e4035258c261cf03949
4
+ data.tar.gz: 22e653c4553b00e10db01c993b72d590486bdbed
5
+ SHA512:
6
+ metadata.gz: 58807a3bf9b68c6c1dd2c4b0b640db219a95127260e26a66a5790791928d000c705326b0bf44d42f5e2594da64f814f63bebf68905fa375b1ee8749cfc141f74
7
+ data.tar.gz: 29bcce3336bb142049344079b2fc4805b429efc12a4c237afe67fc95ca2e0cf0fc1d556aac33dada7c7aa598b71cc2bc856092e0a5c59399b2d7674147c6ec9f
Binary file
Binary file
Binary file
@@ -20,19 +20,19 @@ end
20
20
 
21
21
  Then /^I should see a navigation bar titled "([^\"]*)"$/ do |expected_mark|
22
22
  quote = get_selector_quote(expected_mark)
23
- check_element_exists( "navigationItemView marked:#{quote}#{expected_mark}#{quote}" )
23
+ quoted_text = "#{quote}#{expected_mark}#{quote}"
24
+ navigation_title_exists_with_text("#{quoted_text}").should be_true, "expected to see a navigation bar titled #{quoted_text}"
24
25
  end
25
26
 
26
- Then /^I wait to see a navigation bar titled "([^\"]*)"$/ do |expected_mark|
27
- quote = get_selector_quote(expected_mark)
28
- wait_until( :timeout => 30, :message => "waited to see a navigation bar titled #{quote}#{expected_mark}#{quote}" ) {
29
- element_exists( "navigationItemView marked:#{quote}#{expected_mark}#{quote}" )
30
- }
27
+ Then /^I wait to see a navigation bar titled "([^\"]*)"$/ do |expected_title|
28
+ wait_until(message: "waited to see a navigation bar titled #{quoted_text}") do
29
+ navigation_title_with_text_exists(expected_title)
30
+ end
31
31
  end
32
32
 
33
33
  Then /^I wait to not see a navigation bar titled "([^\"]*)"$/ do |expected_mark|
34
34
  quote = get_selector_quote(expected_mark)
35
- wait_until( :timeout => 30, :message => "waited to not see a navigation bar titled #{quote}#{expected_mark}#{quote}" ) {
35
+ wait_until( :message => "waited to not see a navigation bar titled #{quote}#{expected_mark}#{quote}" ) {
36
36
  !element_exists( "navigationItemView marked:#{quote}#{expected_mark}#{quote}" )
37
37
  }
38
38
  end
@@ -155,6 +155,25 @@ module FrankHelper
155
155
  element_exists( "view marked:#{quote}#{expected_mark}#{quote}" )
156
156
  end
157
157
 
158
+ # Indicate whether the title of the navigation bar matches the expected title.
159
+ # @param [String] expected_title the expected title of the navigation bar
160
+ # @return [Boolean]
161
+ def navigation_title_with_text_exists(expected_title)
162
+ quoted_text = "#{quote}#{expected_title}#{quote}"
163
+
164
+ navFrame = frankly_map('view:"UINavigationBar"', 'frame').first
165
+ navCenter = navFrame["size"]["width"] / 2.0
166
+
167
+ frame = frankly_map("view:'UINavigationBar' view:'UINavigationItemView' marked:#{quoted_text}", 'frame').first
168
+ return false unless frame && frame["origin"] && frame["size"]
169
+
170
+ left = frame["origin"]["x"]
171
+ right = frame["origin"]["x"] + frame["size"]["width"]
172
+ return false unless left && right && left < right
173
+
174
+ (left < navCenter) && (navCenter < right)
175
+ end
176
+
158
177
  # Assert whether there are any views in the current view heirarchy which contain the specified accessibility label.
159
178
  # @param [String] expected_mark the expected accessibility label
160
179
  # @raise an rspec exception if the assertion fails
@@ -173,6 +192,26 @@ module FrankHelper
173
192
  check_element_does_not_exist( "view marked:#{quote}#{expected_mark}#{quote}" )
174
193
  end
175
194
 
195
+ # Assert the title of the navigation bar.
196
+ # @param [String] expected_title the expected title of the navigation bar
197
+ # @raise an rspec exception if the assertion fails
198
+ # @raise an rspec exception if the navigation bar and its subview `UINavigationItemView` cannot be found
199
+ # @raise an rspec exception if the `UINavigationItemView` does not cover the center x of the navigation bar
200
+ def check_navigation_title_with_text_exists(expected_title)
201
+ quoted_text = "#{quote}#{expected_title}#{quote}"
202
+
203
+ navFrame = frankly_map('view:"UINavigationBar"', 'frame').first
204
+ navCenter = navFrame["size"]["width"] / 2.0
205
+
206
+ frame = frankly_map("view:'UINavigationBar' view:'UINavigationItemView' marked:#{quoted_text}", 'frame').first
207
+ raise "Could not find navigation bar with title (#{expected_title})" unless frame && frame["origin"] && frame["size"]
208
+
209
+ left = frame["origin"]["x"]
210
+ right = frame["origin"]["x"] + frame["size"]["width"]
211
+ raise "Expected title (#{expected_title}) not in center of navigation bar" unless left && right && left < right
212
+
213
+ ((left < navCenter) && (navCenter < right)).should be_true, "Could not find navigation title in center of navigation bar matching text (#{expected_title})"
214
+ end
176
215
 
177
216
  # Waits for any of the specified selectors to match a view.
178
217
  #
@@ -1,5 +1,5 @@
1
1
  module Frank
2
2
  module Cucumber
3
- VERSION = "1.2.3"
3
+ VERSION = "1.2.4.pre1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frank-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
5
- prerelease:
4
+ version: 1.2.4.pre1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Pete Hodgson
@@ -10,12 +9,11 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2014-04-16 00:00:00.000000000 Z
12
+ date: 2014-11-16 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: cucumber
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
18
  - - ~>
21
19
  - !ruby/object:Gem::Version
@@ -23,7 +21,6 @@ dependencies:
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
25
  - - ~>
29
26
  - !ruby/object:Gem::Version
@@ -31,7 +28,6 @@ dependencies:
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: rspec
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
32
  - - ~>
37
33
  - !ruby/object:Gem::Version
@@ -39,7 +35,6 @@ dependencies:
39
35
  type: :runtime
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
39
  - - ~>
45
40
  - !ruby/object:Gem::Version
@@ -47,7 +42,6 @@ dependencies:
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: sim_launcher
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
46
  - - ~>
53
47
  - !ruby/object:Gem::Version
@@ -55,7 +49,6 @@ dependencies:
55
49
  type: :runtime
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
53
  - - ~>
61
54
  - !ruby/object:Gem::Version
@@ -63,7 +56,6 @@ dependencies:
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: i18n
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
60
  - - ~>
69
61
  - !ruby/object:Gem::Version
@@ -71,7 +63,6 @@ dependencies:
71
63
  type: :runtime
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
67
  - - ~>
77
68
  - !ruby/object:Gem::Version
@@ -79,7 +70,6 @@ dependencies:
79
70
  - !ruby/object:Gem::Dependency
80
71
  name: plist
81
72
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
73
  requirements:
84
74
  - - ~>
85
75
  - !ruby/object:Gem::Version
@@ -87,7 +77,6 @@ dependencies:
87
77
  type: :runtime
88
78
  prerelease: false
89
79
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
80
  requirements:
92
81
  - - ~>
93
82
  - !ruby/object:Gem::Version
@@ -95,7 +84,6 @@ dependencies:
95
84
  - !ruby/object:Gem::Dependency
96
85
  name: json
97
86
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
87
  requirements:
100
88
  - - '='
101
89
  - !ruby/object:Gem::Version
@@ -103,7 +91,6 @@ dependencies:
103
91
  type: :runtime
104
92
  prerelease: false
105
93
  version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
94
  requirements:
108
95
  - - '='
109
96
  - !ruby/object:Gem::Version
@@ -111,7 +98,6 @@ dependencies:
111
98
  - !ruby/object:Gem::Dependency
112
99
  name: dnssd
113
100
  requirement: !ruby/object:Gem::Requirement
114
- none: false
115
101
  requirements:
116
102
  - - ~>
117
103
  - !ruby/object:Gem::Version
@@ -119,7 +105,6 @@ dependencies:
119
105
  type: :runtime
120
106
  prerelease: false
121
107
  version_requirements: !ruby/object:Gem::Requirement
122
- none: false
123
108
  requirements:
124
109
  - - ~>
125
110
  - !ruby/object:Gem::Version
@@ -127,7 +112,6 @@ dependencies:
127
112
  - !ruby/object:Gem::Dependency
128
113
  name: thor
129
114
  requirement: !ruby/object:Gem::Requirement
130
- none: false
131
115
  requirements:
132
116
  - - ~>
133
117
  - !ruby/object:Gem::Version
@@ -135,7 +119,6 @@ dependencies:
135
119
  type: :runtime
136
120
  prerelease: false
137
121
  version_requirements: !ruby/object:Gem::Requirement
138
- none: false
139
122
  requirements:
140
123
  - - ~>
141
124
  - !ruby/object:Gem::Version
@@ -143,7 +126,6 @@ dependencies:
143
126
  - !ruby/object:Gem::Dependency
144
127
  name: xcodeproj
145
128
  requirement: !ruby/object:Gem::Requirement
146
- none: false
147
129
  requirements:
148
130
  - - ~>
149
131
  - !ruby/object:Gem::Version
@@ -151,7 +133,6 @@ dependencies:
151
133
  type: :runtime
152
134
  prerelease: false
153
135
  version_requirements: !ruby/object:Gem::Requirement
154
- none: false
155
136
  requirements:
156
137
  - - ~>
157
138
  - !ruby/object:Gem::Version
@@ -159,65 +140,57 @@ dependencies:
159
140
  - !ruby/object:Gem::Dependency
160
141
  name: rr
161
142
  requirement: !ruby/object:Gem::Requirement
162
- none: false
163
143
  requirements:
164
- - - ! '>='
144
+ - - '>='
165
145
  - !ruby/object:Gem::Version
166
146
  version: '0'
167
147
  type: :development
168
148
  prerelease: false
169
149
  version_requirements: !ruby/object:Gem::Requirement
170
- none: false
171
150
  requirements:
172
- - - ! '>='
151
+ - - '>='
173
152
  - !ruby/object:Gem::Version
174
153
  version: '0'
175
154
  - !ruby/object:Gem::Dependency
176
155
  name: yard
177
156
  requirement: !ruby/object:Gem::Requirement
178
- none: false
179
157
  requirements:
180
- - - ! '>='
158
+ - - '>='
181
159
  - !ruby/object:Gem::Version
182
160
  version: '0'
183
161
  type: :development
184
162
  prerelease: false
185
163
  version_requirements: !ruby/object:Gem::Requirement
186
- none: false
187
164
  requirements:
188
- - - ! '>='
165
+ - - '>='
189
166
  - !ruby/object:Gem::Version
190
167
  version: '0'
191
168
  - !ruby/object:Gem::Dependency
192
169
  name: pry
193
170
  requirement: !ruby/object:Gem::Requirement
194
- none: false
195
171
  requirements:
196
- - - ! '>='
172
+ - - '>='
197
173
  - !ruby/object:Gem::Version
198
174
  version: '0'
199
175
  type: :development
200
176
  prerelease: false
201
177
  version_requirements: !ruby/object:Gem::Requirement
202
- none: false
203
178
  requirements:
204
- - - ! '>='
179
+ - - '>='
205
180
  - !ruby/object:Gem::Version
206
181
  version: '0'
207
182
  - !ruby/object:Gem::Dependency
208
183
  name: pry-debugger
209
184
  requirement: !ruby/object:Gem::Requirement
210
- none: false
211
185
  requirements:
212
- - - ! '>='
186
+ - - '>='
213
187
  - !ruby/object:Gem::Version
214
188
  version: '0'
215
189
  type: :development
216
190
  prerelease: false
217
191
  version_requirements: !ruby/object:Gem::Requirement
218
- none: false
219
192
  requirements:
220
- - - ! '>='
193
+ - - '>='
221
194
  - !ruby/object:Gem::Version
222
195
  version: '0'
223
196
  description: Use cucumber to test native iOS apps via Frank
@@ -365,27 +338,26 @@ files:
365
338
  - frank-skeleton/frank_static_resources.bundle/ViewAttributeMappingMac.plist
366
339
  homepage: http://rubygems.org/gems/frank-cucumber
367
340
  licenses: []
341
+ metadata: {}
368
342
  post_install_message:
369
343
  rdoc_options: []
370
344
  require_paths:
371
345
  - lib
372
346
  required_ruby_version: !ruby/object:Gem::Requirement
373
- none: false
374
347
  requirements:
375
- - - ! '>='
348
+ - - '>='
376
349
  - !ruby/object:Gem::Version
377
350
  version: '0'
378
351
  required_rubygems_version: !ruby/object:Gem::Requirement
379
- none: false
380
352
  requirements:
381
- - - ! '>='
353
+ - - '>'
382
354
  - !ruby/object:Gem::Version
383
- version: '0'
355
+ version: 1.3.1
384
356
  requirements: []
385
357
  rubyforge_project:
386
- rubygems_version: 1.8.23
358
+ rubygems_version: 2.0.14
387
359
  signing_key:
388
- specification_version: 3
360
+ specification_version: 4
389
361
  summary: Use cucumber to test native iOS apps via Frank
390
362
  test_files:
391
363
  - test/keyboard_helper_test.rb