calabash-android 0.7.3.pre3 → 0.7.3.preintentstart4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eaed2b6b40b9135b792d92c25e89c14426e57898
|
4
|
+
data.tar.gz: f09dbe2a2dbc66785a5c4b72e3abddf839dde076
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fbac058043bd623857e56084cc6a1e01d19131f37421915af1144ca215ad9ce9d0afb8f99ba02791fee71fc6585f4bab5d070e462585f4f887c22b39290a237
|
7
|
+
data.tar.gz: c497e74f19d215552291a5a197263f78e55cb3060d9fff5e4734f6de7700cfeccc08087aadfe4905a1c76ed46f9cea8fd0e7889fc73085821b4e7c438da2e23a
|
@@ -3,7 +3,9 @@
|
|
3
3
|
package="#testPackage#"
|
4
4
|
android:versionCode="3"
|
5
5
|
android:versionName="0.3.0">
|
6
|
-
<application android:label="instrumentation_backend"
|
6
|
+
<application android:label="instrumentation_backend"
|
7
|
+
android:largeHeap="true">
|
8
|
+
|
7
9
|
<uses-library android:name="android.test.runner" />
|
8
10
|
<uses-library android:name="com.google.android.maps" android:required="false" />
|
9
11
|
<activity
|
@@ -31,8 +33,26 @@
|
|
31
33
|
android:stateNotNeeded="true"
|
32
34
|
android:noHistory="true"
|
33
35
|
android:excludeFromRecents="true"/>
|
36
|
+
<activity
|
37
|
+
android:name="sh.calaba.instrumentationbackend.FakeCameraActivity"
|
38
|
+
android:label="FakeCameraActivity"
|
39
|
+
android:exported="true"
|
40
|
+
android:finishOnTaskLaunch="true"
|
41
|
+
android:stateNotNeeded="true"
|
42
|
+
android:noHistory="true"
|
43
|
+
android:excludeFromRecents="true"
|
44
|
+
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
|
45
|
+
<activity
|
46
|
+
android:name="sh.calaba.instrumentationbackend.FakePickerActivity"
|
47
|
+
android:label="FakePickerActivity"
|
48
|
+
android:exported="true"
|
49
|
+
android:finishOnTaskLaunch="true"
|
50
|
+
android:stateNotNeeded="true"
|
51
|
+
android:noHistory="true"
|
52
|
+
android:excludeFromRecents="true"/>
|
34
53
|
</application>
|
35
|
-
<uses-sdk android:minSdkVersion="4"
|
54
|
+
<uses-sdk android:minSdkVersion="4"
|
55
|
+
android:targetSdkVersion="21"/>
|
36
56
|
<instrumentation android:targetPackage="#targetPackage#" android:name="sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner" />
|
37
57
|
<instrumentation android:targetPackage="#targetPackage#" android:name="sh.calaba.instrumentationbackend.ClearAppData" />
|
38
58
|
<instrumentation android:targetPackage="#targetPackage#" android:name="sh.calaba.instrumentationbackend.ClearAppData2" />
|
@@ -47,5 +67,6 @@
|
|
47
67
|
<uses-permission android:name="android.permission.INTERNET" />
|
48
68
|
<uses-permission android:name="android.permission.GET_TASKS" />
|
49
69
|
<uses-permission android:name="android.permission.REORDER_TASKS" />
|
70
|
+
<uses-permission android:name="android.permission.CAMERA" />
|
50
71
|
|
51
72
|
</manifest>
|
Binary file
|
@@ -26,8 +26,6 @@ module Calabash
|
|
26
26
|
|
27
27
|
sleep(args.fetch(:hang_time))
|
28
28
|
monkey_touch(:up, to_x, to_y)
|
29
|
-
|
30
|
-
kill_existing_monkey_processes
|
31
29
|
end
|
32
30
|
|
33
31
|
def get_monkey_port
|
@@ -67,7 +65,6 @@ module Calabash
|
|
67
65
|
end
|
68
66
|
|
69
67
|
def kill_monkey_processes_on_device
|
70
|
-
perform_action('send_tcp', @@monkey_port, "quit", true) unless @@monkey_port.nil?
|
71
68
|
existing_monkey_pids.each do |pid|
|
72
69
|
`#{adb_command} shell kill -9 #{pid}`
|
73
70
|
end
|
@@ -105,7 +102,6 @@ module Calabash
|
|
105
102
|
start_monkey if should_start_monkey
|
106
103
|
monkey_touch(:down, x, y)
|
107
104
|
monkey_touch(:up, x, y)
|
108
|
-
kill_existing_monkey_processes
|
109
105
|
end
|
110
106
|
|
111
107
|
def monkey_touch(touch_type, x, y)
|
@@ -139,8 +139,8 @@ module Calabash module Android
|
|
139
139
|
default_device.push(local, remote)
|
140
140
|
end
|
141
141
|
|
142
|
-
def start_test_server_in_background(options={})
|
143
|
-
default_device.start_test_server_in_background(options)
|
142
|
+
def start_test_server_in_background(options={}, &block)
|
143
|
+
default_device.start_test_server_in_background(options, &block)
|
144
144
|
end
|
145
145
|
|
146
146
|
def shutdown_test_server
|
@@ -637,16 +637,16 @@ module Calabash module Android
|
|
637
637
|
raise "Could not push #{local} to #{remote}" unless system(cmd)
|
638
638
|
end
|
639
639
|
|
640
|
-
def start_test_server_in_background(options={})
|
640
|
+
def start_test_server_in_background(options={}, &block)
|
641
641
|
raise "Will not start test server because of previous failures." if ::Cucumber.wants_to_quit
|
642
642
|
|
643
643
|
if keyguard_enabled?
|
644
644
|
wake_up
|
645
645
|
end
|
646
646
|
|
647
|
-
env_options = options
|
647
|
+
env_options = options.clone
|
648
|
+
env_options.delete(:intent)
|
648
649
|
|
649
|
-
env_options[:target_package] ||= package_name(@app_path)
|
650
650
|
env_options[:main_activity] ||= main_activity(@app_path)
|
651
651
|
env_options[:test_server_port] ||= @test_server_port
|
652
652
|
env_options[:class] ||= "sh.calaba.instrumentationbackend.InstrumentationBackend"
|
@@ -719,12 +719,26 @@ module Calabash module Android
|
|
719
719
|
|
720
720
|
log("Client and server versions match (client: #{client_version}, server: #{server_version}). Proceeding...")
|
721
721
|
|
722
|
+
block.call if block
|
723
|
+
|
724
|
+
start_application(options[:intent])
|
725
|
+
|
722
726
|
# What is Calabash tracking? Read this post for information
|
723
727
|
# No private data (like ip addresses) are collected
|
724
728
|
# https://github.com/calabash/calabash-android/issues/655
|
725
729
|
Calabash::Android::UsageTracker.new.post_usage_async
|
726
730
|
end
|
727
731
|
|
732
|
+
def start_application(intent)
|
733
|
+
result = JSON.parse(http("/start-application", {intent: intent.to_json}))
|
734
|
+
|
735
|
+
if result['outcome'] != 'SUCCESS'
|
736
|
+
raise result['detail']
|
737
|
+
end
|
738
|
+
|
739
|
+
result['result']
|
740
|
+
end
|
741
|
+
|
728
742
|
def shutdown_test_server
|
729
743
|
begin
|
730
744
|
http("/kill")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calabash-android
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.3.
|
4
|
+
version: 0.7.3.preintentstart4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Maturana Larsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|