calabash-android 0.7.3.pre3 → 0.7.3.preintentstart3
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: 1798b9725c39fa124c8b188032095cc6caf07dd3
|
4
|
+
data.tar.gz: e275cfc6a1ee074b27cf71e917bc38a5d70259b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68aaec33b15c526d881c98df5d6675721220569ac50bd0f3a0ce0013247b75d0fe531771929b92460fb67d73b306a36a33b6151fca63a0487165497e5d3c669a
|
7
|
+
data.tar.gz: 3fb0794ffe59375a5bed9d25eb29502880a34ffd58317e07c8e8f5cf176948299e36a1a51433577f0faacf3565da0386ebac16e1ffc14eeb1295d1ec2990c754
|
@@ -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,14 +637,15 @@ 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
650
|
env_options[:target_package] ||= package_name(@app_path)
|
650
651
|
env_options[:main_activity] ||= main_activity(@app_path)
|
@@ -719,12 +720,26 @@ module Calabash module Android
|
|
719
720
|
|
720
721
|
log("Client and server versions match (client: #{client_version}, server: #{server_version}). Proceeding...")
|
721
722
|
|
723
|
+
block.call if block
|
724
|
+
|
725
|
+
start_application(options[:intent])
|
726
|
+
|
722
727
|
# What is Calabash tracking? Read this post for information
|
723
728
|
# No private data (like ip addresses) are collected
|
724
729
|
# https://github.com/calabash/calabash-android/issues/655
|
725
730
|
Calabash::Android::UsageTracker.new.post_usage_async
|
726
731
|
end
|
727
732
|
|
733
|
+
def start_application(intent)
|
734
|
+
result = JSON.parse(http("/start-application", {intent: intent.to_json}))
|
735
|
+
|
736
|
+
if result['outcome'] != 'SUCCESS'
|
737
|
+
raise result['detail']
|
738
|
+
end
|
739
|
+
|
740
|
+
result['result']
|
741
|
+
end
|
742
|
+
|
728
743
|
def shutdown_test_server
|
729
744
|
begin
|
730
745
|
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.preintentstart3
|
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
|