briar 0.1.3.b3 → 0.1.3.b4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +0 -11
- data/lib/briar.rb +10 -21
- data/lib/briar/keyboard/uia_keyboard.rb +0 -29
- data/lib/briar/keyboard/uia_keyboard_language.rb +2 -0
- data/lib/briar/uia/briar_uia.rb +0 -9
- data/lib/briar/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba56773bf8fafac50e0a6cda6bd3937469a00c58
|
4
|
+
data.tar.gz: 35b2ab49686b4449d22980b88978738e9f25a924
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d98468461361d5a17a3b5aeef32c91aa4b28dc4011ef21155d37d261cfc10eb667f0849703ab51734d9b336b33d4374c87563943b6001f58076b5eb3cb3bac0
|
7
|
+
data.tar.gz: 063c9190bcb096fe7b7b52d7fee8e5c6371fadc22195e4d1ceb6c3a2e3b7e526540b84f3e6b3dac1305e7af64d7e254d71c883fb7a3d2b1245f47649e1253cab
|
data/Rakefile
CHANGED
@@ -1,13 +1,2 @@
|
|
1
1
|
require 'bundler/gem_tasks'
|
2
|
-
require './lib/briar/version.rb'
|
3
|
-
task :show_simulator do
|
4
|
-
sh "/usr/bin/osascript -e 'tell application \"iPhone Simulator\" to activate'"
|
5
|
-
sh "/usr/bin/osascript -e 'tell application \"RubyMine\" to activate'"
|
6
|
-
end
|
7
|
-
|
8
|
-
# let us try to use gem_tasks
|
9
|
-
#$ rake -T
|
10
|
-
#rake build # Build briar-0.0.7.gem into the pkg directory.
|
11
|
-
#rake install # Build and install briar-0.0.7.gem into system gems.
|
12
|
-
#rake release # Create tag v0.0.7 and build and push briar-0.0.7.gem to Rubygems
|
13
2
|
|
data/lib/briar.rb
CHANGED
@@ -72,29 +72,16 @@ require 'briar/text_field'
|
|
72
72
|
require 'briar/text_view'
|
73
73
|
|
74
74
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
res = http.start do |sess|
|
80
|
-
sess.request Net::HTTP::Get.new(ENV['CALABASH_VERSION_PATH'] || 'version')
|
81
|
-
end
|
82
|
-
status = res.code
|
83
|
-
|
84
|
-
#noinspection RubyUnusedLocalVariable
|
85
|
-
begin
|
86
|
-
http.finish if http and http.started?
|
87
|
-
rescue Exception => e
|
88
|
-
# ignored
|
89
|
-
end
|
75
|
+
def device
|
76
|
+
deprecated('0.1.3', "use the calabash function 'default_device' instead", :warn)
|
77
|
+
@device = default_device()
|
78
|
+
end
|
90
79
|
|
91
|
-
|
92
|
-
|
93
|
-
Calabash::Cucumber::Device.new(url, version_body)
|
94
|
-
end
|
80
|
+
def xamarin_test_cloud?
|
81
|
+
ENV['XAMARIN_TEST_CLOUD'] == '1'
|
95
82
|
end
|
96
83
|
|
97
|
-
|
84
|
+
|
98
85
|
# todo deprecated function does not output on a new line when called within cucumber
|
99
86
|
def deprecated(version, msg, type)
|
100
87
|
allowed = [:pending, :warn]
|
@@ -102,7 +89,9 @@ def deprecated(version, msg, type)
|
|
102
89
|
screenshot_and_raise "type '#{type}' must be on of '#{allowed}'"
|
103
90
|
end
|
104
91
|
|
105
|
-
|
92
|
+
info = Kernel.caller.first
|
93
|
+
|
94
|
+
msg = "deprecated '#{version}' - '#{msg}'\n#{info}"
|
106
95
|
|
107
96
|
if type.eql?(:pending)
|
108
97
|
pending(msg)
|
@@ -2,35 +2,6 @@ require 'calabash-cucumber'
|
|
2
2
|
|
3
3
|
module Briar
|
4
4
|
module UIAKeyboard
|
5
|
-
def uia_keyboard_visible?
|
6
|
-
res = uia('UIATarget.localTarget().frontMostApp().keyboard()')['value']
|
7
|
-
not res.eql?(':nil')
|
8
|
-
end
|
9
5
|
|
10
|
-
def uia_await_keyboard(opts={})
|
11
|
-
default_opts = {:timeout => BRIAR_WAIT_TIMEOUT,
|
12
|
-
:retry_frequency => BRIAR_WAIT_RETRY_FREQ,
|
13
|
-
:post_timeout => BRIAR_WAIT_STEP_PAUSE}
|
14
|
-
opts = default_opts.merge(opts)
|
15
|
-
unless opts[:timeout_message]
|
16
|
-
msg = "waited for '#{opts[:timeout]}' for keyboard"
|
17
|
-
opts[:timeout_message] = msg
|
18
|
-
end
|
19
|
-
|
20
|
-
wait_for(opts) do
|
21
|
-
uia_keyboard_visible?
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
def dismiss_ipad_keyboard
|
26
|
-
screenshot_and_raise 'cannot dismiss keyboard on iphone' if iphone?
|
27
|
-
screenshot_and_raise 'cannot dismiss keyboard without launching with instruments' unless uia_available?
|
28
|
-
send_uia_command command: "uia.keyboard().buttons()['Hide keyboard'].tap()"
|
29
|
-
step_pause
|
30
|
-
end
|
31
6
|
end
|
32
7
|
end
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
data/lib/briar/uia/briar_uia.rb
CHANGED
@@ -3,15 +3,6 @@ require 'calabash-cucumber'
|
|
3
3
|
module Briar
|
4
4
|
module UIA
|
5
5
|
|
6
|
-
def uia_available?
|
7
|
-
# proxy for testing if run_loop exists
|
8
|
-
not uia_not_available?
|
9
|
-
end
|
10
|
-
|
11
|
-
def uia_not_available?
|
12
|
-
default_device.nil?
|
13
|
-
end
|
14
|
-
|
15
6
|
def uia_handle_target_command(cmd, *query_args)
|
16
7
|
args = query_args.map do |part|
|
17
8
|
if part.is_a?(String)
|
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.3.
|
4
|
+
version: 0.1.3.b4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Moody
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: calabash-cucumber
|
@@ -148,7 +148,7 @@ rubyforge_project:
|
|
148
148
|
rubygems_version: 2.1.11
|
149
149
|
signing_key:
|
150
150
|
specification_version: 4
|
151
|
-
summary: briar-0.1.3.
|
151
|
+
summary: briar-0.1.3.b4
|
152
152
|
test_files:
|
153
153
|
- features/step_definitions/alerts_and_sheets/action_sheet_steps.rb
|
154
154
|
- features/step_definitions/alerts_and_sheets/alert_view_steps.rb
|