briar 0.1.4.b1 → 0.1.4.b2
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.
- checksums.yaml +4 -4
- data/lib/briar.rb +8 -0
- data/lib/briar/bars/navbar.rb +32 -9
- data/lib/briar/email.rb +5 -5
- data/lib/briar/keyboard/keyboard.rb +4 -2
- data/lib/briar/table.rb +3 -1
- data/lib/briar/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 62fe6beab3ccafca8f63ed1495401e1fd87fd655
|
|
4
|
+
data.tar.gz: 6640a39a83872ad212563db4d509519fa37a5b0f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 98f0247ebb873a2ff6f5d253512e9d472ed0fe349bf2c9217c618c89a97838572ae9ca8ee29732679a2988c464b773a2ab0db0d5eb66c7e069990eb109c0cf4e
|
|
7
|
+
data.tar.gz: 8593a9acd379968e2a26d08fd9e7c014e82f39f2cb10aa33985ef005d47a98293520e71b3a53b7f5888207da00bbdb7df6625615500a379f2fd55fd066b1579b
|
data/lib/briar.rb
CHANGED
data/lib/briar/bars/navbar.rb
CHANGED
|
@@ -19,7 +19,18 @@ module Briar
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def navbar_has_back_button?
|
|
22
|
-
|
|
22
|
+
res = query('navigationItemButtonView')
|
|
23
|
+
return false if res.empty?
|
|
24
|
+
|
|
25
|
+
# sometime the back button is there, but has zero rect
|
|
26
|
+
frame = res.first['frame']
|
|
27
|
+
|
|
28
|
+
['x', 'y', 'width', 'height'].each { |key|
|
|
29
|
+
if frame[key] != 0
|
|
30
|
+
return true
|
|
31
|
+
end
|
|
32
|
+
}
|
|
33
|
+
false
|
|
23
34
|
end
|
|
24
35
|
|
|
25
36
|
def should_see_navbar_back_button
|
|
@@ -74,21 +85,33 @@ module Briar
|
|
|
74
85
|
end
|
|
75
86
|
|
|
76
87
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
88
|
+
# todo convert args to hash and mirror the should_see_navbar_button
|
|
89
|
+
#is_ui_button=false)
|
|
90
|
+
def should_not_see_navbar_button (mark, opts={})
|
|
91
|
+
if (not opts.is_a?(Hash)) and (not opts.nil?)
|
|
92
|
+
warn "\nWARN: deprecated 0.1.4 - you should no longer pass a Boolean '#{opts}' as an arg, pass opts hash instead"
|
|
93
|
+
button_type = opts ? :button : :bar_item
|
|
94
|
+
opts = {:bar_button_type => button_type}
|
|
95
|
+
end
|
|
96
|
+
default_opts = {:bar_button_type => :bar_item,
|
|
97
|
+
:timeout => BRIAR_WAIT_TIMEOUT}
|
|
98
|
+
opts = default_opts.merge(opts)
|
|
99
|
+
if opts[:bar_button_type] == :button
|
|
100
|
+
queries = ["buttonLabel marked:'#{mark}' parent navigationBar",
|
|
101
|
+
"button marked:'#{mark}' parent navigationBar"]
|
|
102
|
+
timeout = opts[:timeout]
|
|
103
|
+
msg = "waited for '#{timeout}' seconds but i still see '#{mark}' in navigation bar"
|
|
82
104
|
wait_for(:timeout => timeout,
|
|
83
105
|
:retry_frequency => BRIAR_WAIT_RETRY_FREQ,
|
|
84
106
|
:post_timeout => BRIAR_WAIT_STEP_PAUSE,
|
|
85
107
|
:timeout_message => msg) do
|
|
86
|
-
element_does_not_exist
|
|
108
|
+
queries.all? { |query| element_does_not_exist query }
|
|
87
109
|
end
|
|
88
110
|
else
|
|
89
|
-
idx = index_of_navbar_button
|
|
111
|
+
idx = index_of_navbar_button mark
|
|
90
112
|
unless idx.nil?
|
|
91
|
-
|
|
113
|
+
# check to see if it is a ui button
|
|
114
|
+
should_not_see_navbar_button mark, {:bar_button_type => :button}
|
|
92
115
|
end
|
|
93
116
|
end
|
|
94
117
|
end
|
data/lib/briar/email.rb
CHANGED
|
@@ -82,20 +82,20 @@ module Briar
|
|
|
82
82
|
|
|
83
83
|
def should_see_mail_view (opts = {:timeout => BRIAR_WAIT_TIMEOUT,
|
|
84
84
|
:email_view_mark => 'compose email'})
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
default_opts = {:timeout => BRIAR_WAIT_TIMEOUT,
|
|
86
|
+
:email_view_mark => 'compose email'}
|
|
87
|
+
merged = default_opts.merge(opts)
|
|
88
88
|
|
|
89
89
|
if email_not_testable?
|
|
90
90
|
warn_about_no_ios5_email_view
|
|
91
91
|
return
|
|
92
92
|
end
|
|
93
93
|
|
|
94
|
-
timeout =
|
|
94
|
+
timeout = merged[:timeout]
|
|
95
95
|
msg = "waited for '#{timeout}' seconds but did not see email compose view"
|
|
96
96
|
#noinspection RubyParenthesesAfterMethodCallInspection
|
|
97
97
|
|
|
98
|
-
email_view_mark =
|
|
98
|
+
email_view_mark = merged[:email_view_mark]
|
|
99
99
|
wait_for(:timeout => timeout,
|
|
100
100
|
:retry_frequency => BRIAR_WAIT_RETRY_FREQ,
|
|
101
101
|
:post_timeout => BRIAR_WAIT_STEP_PAUSE,
|
|
@@ -69,8 +69,10 @@ module Briar
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
#noinspection RubyUnusedLocalVariable
|
|
72
|
-
def briar_clear_text(view_id, timeout=
|
|
73
|
-
|
|
72
|
+
def briar_clear_text(view_id, timeout=nil)
|
|
73
|
+
unless timeout.nil?
|
|
74
|
+
_deprecated('0.1.1', "will remove 'timeout' argument in a future release", :warn)
|
|
75
|
+
end
|
|
74
76
|
clear_text("view marked:'#{view_id}'")
|
|
75
77
|
|
|
76
78
|
# i really wanted this to work, but there are too many issues with the
|
data/lib/briar/table.rb
CHANGED
|
@@ -152,7 +152,9 @@ module Briar
|
|
|
152
152
|
|
|
153
153
|
def briar_scroll_to_row_and_touch (row_id, opts={})
|
|
154
154
|
if (not opts.is_a?(Hash)) and (not opts.nil?)
|
|
155
|
-
|
|
155
|
+
_deprecated('0.1.3',
|
|
156
|
+
"you should no longer pass a view_id '#{opts}' as an arg, pass opts hash instead",
|
|
157
|
+
:warn)
|
|
156
158
|
opts = {:wait_for_id => opts}
|
|
157
159
|
end
|
|
158
160
|
|
data/lib/briar/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: briar
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.4.
|
|
4
|
+
version: 0.1.4.b2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joshua Moody
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-03-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rbx-require-relative
|
|
@@ -227,6 +227,7 @@ rubyforge_project:
|
|
|
227
227
|
rubygems_version: 2.2.2
|
|
228
228
|
signing_key:
|
|
229
229
|
specification_version: 4
|
|
230
|
-
summary: briar-0.1.4.
|
|
230
|
+
summary: briar-0.1.4.b2
|
|
231
231
|
test_files:
|
|
232
232
|
- spec/spec_helper.rb
|
|
233
|
+
has_rdoc:
|