calabash-android 0.4.3.pre2 → 0.4.3.pre3
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.
- data/lib/calabash-android/lib/TestServer.apk +0 -0
- data/lib/calabash-android/operations.rb +7 -6
- data/lib/calabash-android/version.rb +1 -1
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/CalabashInstrumentationTestRunner.java +2 -1
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/InstrumentationBackend.java +7 -1
- metadata +2 -2
Binary file
|
@@ -72,7 +72,7 @@ module Operations
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def start_test_server_in_background(options={})
|
75
|
-
default_device.start_test_server_in_background()
|
75
|
+
default_device.start_test_server_in_background(options)
|
76
76
|
end
|
77
77
|
|
78
78
|
def shutdown_test_server
|
@@ -319,12 +319,13 @@ module Operations
|
|
319
319
|
wake_up
|
320
320
|
end
|
321
321
|
|
322
|
-
|
323
|
-
|
324
|
-
:main_activity => options[:main_activity] || main_activity(@app_path),
|
322
|
+
env_options = {:target_package => package_name(@app_path),
|
323
|
+
:main_activity => main_activity(@app_path),
|
325
324
|
:test_server_port => @test_server_port,
|
326
|
-
:debug =>
|
327
|
-
:class =>
|
325
|
+
:debug => false,
|
326
|
+
:class => "sh.calaba.instrumentationbackend.InstrumentationBackend"}
|
327
|
+
|
328
|
+
env_options = env_options.merge(options)
|
328
329
|
|
329
330
|
cmd_arr = [adb_command, "shell am instrument"]
|
330
331
|
|
@@ -9,7 +9,7 @@ import sh.calaba.instrumentationbackend.actions.HttpServer;
|
|
9
9
|
|
10
10
|
public class CalabashInstrumentationTestRunner extends InstrumentationTestRunner {
|
11
11
|
@Override
|
12
|
-
public void onCreate(Bundle arguments) {
|
12
|
+
public void onCreate(Bundle arguments) {
|
13
13
|
try {
|
14
14
|
Context context = getTargetContext ();
|
15
15
|
Class<?> c = Class.forName("mono.MonoPackageManager");
|
@@ -24,6 +24,7 @@ public class CalabashInstrumentationTestRunner extends InstrumentationTestRunner
|
|
24
24
|
HttpServer.instantiate(Integer.parseInt(arguments.getString("test_server_port")));
|
25
25
|
|
26
26
|
InstrumentationBackend.testPackage = arguments.getString("target_package");
|
27
|
+
InstrumentationBackend.extras = arguments;
|
27
28
|
|
28
29
|
try {
|
29
30
|
InstrumentationBackend.mainActivity = Class.forName(arguments.getString("main_activity"));
|
@@ -1,5 +1,7 @@
|
|
1
1
|
package sh.calaba.instrumentationbackend;
|
2
2
|
|
3
|
+
import android.content.Intent;
|
4
|
+
import android.os.Bundle;
|
3
5
|
import sh.calaba.instrumentationbackend.actions.Actions;
|
4
6
|
import sh.calaba.instrumentationbackend.actions.HttpServer;
|
5
7
|
import android.Manifest;
|
@@ -17,6 +19,7 @@ import com.jayway.android.robotium.solo.SoloEnhanced;
|
|
17
19
|
public class InstrumentationBackend extends ActivityInstrumentationTestCase2 {
|
18
20
|
public static String testPackage;
|
19
21
|
public static Class mainActivity;
|
22
|
+
public static Bundle extras;
|
20
23
|
|
21
24
|
private static final String TAG = "InstrumentationBackend";
|
22
25
|
|
@@ -32,7 +35,10 @@ public class InstrumentationBackend extends ActivityInstrumentationTestCase2 {
|
|
32
35
|
@Override
|
33
36
|
protected void setUp() throws Exception {
|
34
37
|
super.setUp();
|
35
|
-
|
38
|
+
Intent i = new Intent();
|
39
|
+
i.setClassName(testPackage, mainActivity.getName());
|
40
|
+
i.putExtras(extras);
|
41
|
+
setActivityIntent(i);
|
36
42
|
solo = new SoloEnhanced(getInstrumentation(), this.getActivity());
|
37
43
|
viewFetcher = new PublicViewFetcher(getInstrumentation(), this.getActivity());
|
38
44
|
actions = new Actions(getInstrumentation(), this);
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calabash-android
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.3.
|
4
|
+
version: 0.4.3.pre3
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cucumber
|