briar 0.0.5 → 0.0.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.
Files changed (35) hide show
  1. checksums.yaml +15 -0
  2. data/LICENSE.txt +1 -6
  3. data/README.md +8 -0
  4. data/bin/briar +44 -0
  5. data/bin/briar_helpers.rb +14 -0
  6. data/briar.gemspec +15 -12
  7. data/cucumber.yml.example +4 -0
  8. data/features/step_definitions/alerts_and_sheets/alert_view_steps.rb +3 -3
  9. data/features/step_definitions/bars/navbar_steps.rb +8 -8
  10. data/features/step_definitions/bars/tabbar_steps.rb +20 -14
  11. data/features/step_definitions/briar_core_steps.rb +3 -3
  12. data/features/step_definitions/control/button_steps.rb +10 -35
  13. data/features/step_definitions/email_steps.rb +55 -28
  14. data/features/step_definitions/keyboard_steps.rb +15 -2
  15. data/features/step_definitions/picker/date_picker_steps.rb +82 -68
  16. data/features/step_definitions/picker/picker_steps.rb +3 -3
  17. data/features/step_definitions/scroll_view_steps.rb +13 -12
  18. data/features/step_definitions/table_steps.rb +15 -10
  19. data/features/step_definitions/text_field_steps.rb +3 -3
  20. data/features/step_definitions/text_view_steps.rb +1 -7
  21. data/lib/briar.rb +2 -0
  22. data/lib/briar/alerts_and_sheets/alert_view.rb +17 -1
  23. data/lib/briar/bars/navbar.rb +16 -12
  24. data/lib/briar/bars/tabbar.rb +16 -4
  25. data/lib/briar/briar_core.rb +9 -3
  26. data/lib/briar/briar_steps.rb +19 -18
  27. data/lib/briar/control/button.rb +0 -1
  28. data/lib/briar/cucumber.rb +2 -0
  29. data/lib/briar/email.rb +34 -19
  30. data/lib/briar/keyboard.rb +25 -25
  31. data/lib/briar/picker/date_picker.rb +152 -107
  32. data/lib/briar/table.rb +18 -21
  33. data/lib/briar/version.rb +1 -1
  34. data/run-tests.sh +4 -0
  35. metadata +46 -20
@@ -1,4 +1,4 @@
1
- require "calabash-cucumber"
1
+ #require 'calabash-cucumber'
2
2
 
3
3
  module Briar
4
4
  module Table
@@ -10,13 +10,13 @@ module Briar
10
10
 
11
11
  def query_str_rows_in_table (table_id = nil)
12
12
  table_id == nil ?
13
- "tableViewCell" :
13
+ 'tableViewCell' :
14
14
  "tableView marked:'#{table_id}' child tableViewCell"
15
15
  end
16
16
 
17
17
  def query_str_table (table_id = nil)
18
18
  table_id == nil ?
19
- "tableView" :
19
+ 'tableView' :
20
20
  "tableView marked:'#{table_id}'"
21
21
  end
22
22
 
@@ -34,11 +34,11 @@ module Briar
34
34
 
35
35
  if index == 0 or index == (all_rows.length - 1)
36
36
  # collect information about the table, row, and content offset
37
- content_offset_y = query("tableView", :contentOffset).first["Y"]
38
- frame = query(query_str).first["frame"]
39
- cell_h = frame["height"].to_f
40
- cell_y = frame["y"].to_f
41
- table_h = query(query_str_table(table_id)).first["frame"]["height"]
37
+ content_offset_y = query('tableView', :contentOffset).first['Y']
38
+ frame = query(query_str).first['frame']
39
+ cell_h = frame['height'].to_f
40
+ cell_y = frame['y'].to_f
41
+ table_h = query(query_str_table(table_id)).first['frame']['height']
42
42
 
43
43
  # if the row is the first row and there has been no scrolling, just return true
44
44
  return true if index == 0 and content_offset_y == 0
@@ -62,7 +62,7 @@ module Briar
62
62
  end
63
63
  end
64
64
 
65
- def query_str_for_label_and_text_exists (row_id, label_id, text, table_id = nil)
65
+ def query_str_for_label_and_text_exists (row_id, label_id, table_id = nil)
66
66
  table_id == nil ?
67
67
  "tableViewCell marked:'#{row_id}' isHidden:0 descendant label marked:'#{label_id}'" :
68
68
  "tableView marked:'#{table_id}' child tableViewCell marked:'#{row_id}' isHidden:0 descendant label marked:'#{label_id}'"
@@ -107,17 +107,14 @@ module Briar
107
107
  end
108
108
 
109
109
 
110
- def scroll_until_i_see_row (dir, row_id, limit)
111
- unless row_exists? row_id
112
- count = 0
113
- begin
114
- scroll("scrollView index:0", dir)
115
- step_pause
116
- count = count + 1
117
- end while ((not row_exists?(row_id)) and count < limit.to_i)
110
+ def scroll_until_i_see_row (dir, row_id)
111
+ wait_poll({:until_exists => "tableView descendant tableViewCell marked:'#{row_id}'",
112
+ :timeout => 2}) do
113
+ scroll('tableView index:0', dir)
118
114
  end
115
+
119
116
  unless row_exists?(row_id)
120
- screenshot_and_raise "i scrolled '#{dir}' '#{limit}' times but did not see '#{row_id}'"
117
+ screenshot_and_raise "i scrolled '#{dir}' but did not see '#{row_id}'"
121
118
  end
122
119
  end
123
120
 
@@ -130,7 +127,7 @@ module Briar
130
127
  cells = query(query_str_rows_in_table, :accessibilityIdentifier)
131
128
  #puts "cells = #{cells} is #{row_id} last? ==> #{cells.last.eql?(row_id)}"
132
129
  if cells.last.eql?(row_id)
133
- row_h = query(query, :frame).first["Height"].to_i
130
+ row_h = query(query, :frame).first['Height'].to_i
134
131
  offset = -1 * (row_h/3)
135
132
  #puts "offset = #{offset}"
136
133
  end
@@ -200,7 +197,7 @@ module Briar
200
197
 
201
198
  def edit_mode_delete_button_exists? (row_name)
202
199
  #!query("tableViewCell marked:'#{row_name}' child tableViewCellEditControl").empty?
203
- !query_all("tableViewCell marked:'#{row_name}' child tableViewCellEditControl").empty?
200
+ !query("all tableViewCell marked:'#{row_name}' child tableViewCellEditControl").empty?
204
201
  end
205
202
 
206
203
  def should_see_edit_mode_delete_button (row_name)
@@ -218,7 +215,7 @@ module Briar
218
215
  def reorder_button_exists? (row_name)
219
216
  #TableViewCellReorderControl
220
217
  #!query("tableViewCell marked:'#{row_name}' child tableViewCellReorderControl").empty?
221
- !query_all("tableViewCell marked:'#{row_name}' child tableViewCellReorderControl").empty?
218
+ !query("all tableViewCell marked:'#{row_name}' child tableViewCellReorderControl").empty?
222
219
  end
223
220
 
224
221
  def should_see_reorder_button (row_name)
@@ -1,3 +1,3 @@
1
1
  module Briar
2
- VERSION = "0.0.5"
2
+ VERSION = '0.0.6'
3
3
  end
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ bundle update
3
+ bundle install
4
+ bundle exec rspec spec
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: briar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
5
- prerelease:
4
+ version: 0.0.6
6
5
  platform: ruby
7
6
  authors:
8
7
  - Joshua Moody
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-11 00:00:00.000000000 Z
11
+ date: 2013-04-05 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: calabash-cucumber
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,39 +20,62 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ! '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
- name: rspec
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 10.0.3
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 10.0.3
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: lesspainful
32
57
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
58
  requirements:
35
59
  - - ! '>='
36
60
  - !ruby/object:Gem::Version
37
61
  version: '0'
38
- type: :development
62
+ type: :runtime
39
63
  prerelease: false
40
64
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
65
  requirements:
43
66
  - - ! '>='
44
67
  - !ruby/object:Gem::Version
45
68
  version: '0'
46
69
  - !ruby/object:Gem::Dependency
47
- name: rvm
70
+ name: rspec
48
71
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
72
  requirements:
51
73
  - - ! '>='
52
74
  - !ruby/object:Gem::Version
53
75
  version: '0'
54
- type: :development
76
+ type: :runtime
55
77
  prerelease: false
56
78
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
79
  requirements:
59
80
  - - ! '>='
60
81
  - !ruby/object:Gem::Version
@@ -62,7 +83,8 @@ dependencies:
62
83
  description: extends calabash-ios steps
63
84
  email:
64
85
  - joshuajmoody@gmail.com
65
- executables: []
86
+ executables:
87
+ - briar
66
88
  extensions: []
67
89
  extra_rdoc_files: []
68
90
  files:
@@ -71,7 +93,10 @@ files:
71
93
  - LICENSE.txt
72
94
  - README.md
73
95
  - Rakefile
96
+ - bin/briar
97
+ - bin/briar_helpers.rb
74
98
  - briar.gemspec
99
+ - cucumber.yml.example
75
100
  - dotirbc+briar
76
101
  - features/step_definitions/alerts_and_sheets/action_sheet_steps.rb
77
102
  - features/step_definitions/alerts_and_sheets/alert_view_steps.rb
@@ -119,32 +144,33 @@ files:
119
144
  - lib/briar/text_field.rb
120
145
  - lib/briar/text_view.rb
121
146
  - lib/briar/version.rb
147
+ - run-tests.sh
122
148
  - spec/briar/gestalt_spec.rb
123
149
  - spec/spec_helper.rb
124
150
  homepage: https://github.com/jmoody/briar
125
- licenses: []
151
+ licenses:
152
+ - MIT
153
+ metadata: {}
126
154
  post_install_message:
127
155
  rdoc_options: []
128
156
  require_paths:
129
157
  - lib
130
158
  required_ruby_version: !ruby/object:Gem::Requirement
131
- none: false
132
159
  requirements:
133
160
  - - ! '>='
134
161
  - !ruby/object:Gem::Version
135
162
  version: '0'
136
163
  required_rubygems_version: !ruby/object:Gem::Requirement
137
- none: false
138
164
  requirements:
139
165
  - - ! '>='
140
166
  - !ruby/object:Gem::Version
141
167
  version: '0'
142
168
  requirements: []
143
169
  rubyforge_project:
144
- rubygems_version: 1.8.25
170
+ rubygems_version: 2.0.3
145
171
  signing_key:
146
- specification_version: 3
147
- summary: briar-0.0.5
172
+ specification_version: 4
173
+ summary: briar-0.0.6
148
174
  test_files:
149
175
  - features/step_definitions/alerts_and_sheets/action_sheet_steps.rb
150
176
  - features/step_definitions/alerts_and_sheets/alert_view_steps.rb