calabash-android 0.3.4 → 0.3.5
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/CHANGES.txt +17 -0
- data/features-skeleton/support/app_life_cycle_hooks.rb +6 -0
- data/lib/calabash-android/lib/TestServer.apk +0 -0
- data/lib/calabash-android/operations.rb +2 -6
- data/lib/calabash-android/version.rb +1 -1
- data/test-server/AndroidManifest.xml +5 -1
- data/test-server/instrumentation-backend/AndroidManifest.xml +0 -5
- data/test-server/instrumentation-backend/libs/robotium-solo-3.6.jar +0 -0
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/InstrumentationBackend.java +10 -5
- metadata +3 -3
- data/test-server/instrumentation-backend/libs/robotium-solo-3.3.jar +0 -0
data/CHANGES.txt
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
0.3.5:
|
2
|
+
No longer takes screenshots when perform_action fails.
|
3
|
+
If you want to take screenshots when a scenario fails you can use a hook:
|
4
|
+
|
5
|
+
After do |scenario|
|
6
|
+
if scenario.failed?
|
7
|
+
screenshot_embed
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
This hook is now part of the generated skeleton.
|
12
|
+
|
13
|
+
Upgraded to Robotium 3.6 to support api level 17.
|
14
|
+
|
15
|
+
Fixed mock location.
|
16
|
+
|
17
|
+
|
1
18
|
0.3.4:
|
2
19
|
Removed maps_unsupported
|
3
20
|
The test will fail at run time if the device does not have
|
Binary file
|
@@ -182,13 +182,9 @@ module Operations
|
|
182
182
|
raise "Empty result from TestServer" if result.chomp.empty?
|
183
183
|
result = JSON.parse(result)
|
184
184
|
if not result["success"] then
|
185
|
-
@cucumber_world.screenshot_embed
|
186
|
-
if result["bonusInformation"] && result["bonusInformation"].size > 0 && result["bonusInformation"][0].include?("Exception")
|
187
|
-
log result["bonusInformation"][0]
|
188
|
-
end
|
189
185
|
raise "Step unsuccessful: #{result["message"]}"
|
190
186
|
end
|
191
|
-
|
187
|
+
result
|
192
188
|
end
|
193
189
|
rescue Timeout::Error
|
194
190
|
raise Exception, "Step timed out"
|
@@ -453,7 +449,7 @@ module Operations
|
|
453
449
|
def backdoor(sel, arg)
|
454
450
|
ni
|
455
451
|
end
|
456
|
-
|
452
|
+
|
457
453
|
def map( query, method_name, *method_args )
|
458
454
|
ni
|
459
455
|
end
|
@@ -18,5 +18,9 @@
|
|
18
18
|
</application>
|
19
19
|
<uses-sdk android:minSdkVersion="4" />
|
20
20
|
<instrumentation android:targetPackage="#targetPackage#" android:name="sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner" />
|
21
|
+
|
22
|
+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
23
|
+
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
|
21
24
|
<uses-permission android:name="android.permission.INTERNET" />
|
22
|
-
|
25
|
+
|
26
|
+
</manifest>
|
@@ -14,9 +14,4 @@
|
|
14
14
|
<instrumentation
|
15
15
|
android:name="android.test.InstrumentationTestRunner"
|
16
16
|
android:targetPackage="sh.calaba" />
|
17
|
-
|
18
|
-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
19
|
-
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
|
20
|
-
<uses-permission android:name="android.permission.INTERNET" />
|
21
|
-
|
22
17
|
</manifest>
|
Binary file
|
@@ -1,5 +1,7 @@
|
|
1
1
|
package sh.calaba.instrumentationbackend;
|
2
2
|
|
3
|
+
import android.Manifest;
|
4
|
+
import android.content.pm.PackageManager;
|
3
5
|
import sh.calaba.instrumentationbackend.actions.Actions;
|
4
6
|
import sh.calaba.instrumentationbackend.actions.HttpServer;
|
5
7
|
import android.app.Activity;
|
@@ -71,11 +73,14 @@ public class InstrumentationBackend extends ActivityInstrumentationTestCase2 {
|
|
71
73
|
Log.e(TAG, message);
|
72
74
|
}
|
73
75
|
|
74
|
-
private
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
locationService.
|
76
|
+
private void removeTestLocationProviders(Activity activity) {
|
77
|
+
int hasPermission = solo.getCurrentActivity().checkCallingOrSelfPermission(Manifest.permission.ACCESS_MOCK_LOCATION);
|
78
|
+
|
79
|
+
if (hasPermission == PackageManager.PERMISSION_GRANTED) {
|
80
|
+
LocationManager locationService = (LocationManager) activity.getSystemService(Context.LOCATION_SERVICE);
|
81
|
+
for (final String provider : locationService.getAllProviders()) {
|
82
|
+
locationService.removeTestProvider(provider);
|
83
|
+
}
|
79
84
|
}
|
80
85
|
}
|
81
86
|
}
|
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.3.
|
4
|
+
version: 0.3.5
|
5
5
|
prerelease:
|
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: 2012-11-
|
12
|
+
date: 2012-11-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cucumber
|
@@ -161,7 +161,7 @@ files:
|
|
161
161
|
- test-server/instrumentation-backend/.settings/org.eclipse.jdt.core.prefs
|
162
162
|
- test-server/instrumentation-backend/AndroidManifest.xml
|
163
163
|
- test-server/instrumentation-backend/assets/foo.bar
|
164
|
-
- test-server/instrumentation-backend/libs/robotium-solo-3.
|
164
|
+
- test-server/instrumentation-backend/libs/robotium-solo-3.6.jar
|
165
165
|
- test-server/instrumentation-backend/project.properties
|
166
166
|
- test-server/instrumentation-backend/res/drawable-hdpi/ic_launcher.png
|
167
167
|
- test-server/instrumentation-backend/res/drawable-ldpi/ic_launcher.png
|
Binary file
|