calabash-android 0.7.4.pre1 → 0.8.0.pre1

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: aa0cfe63104c21ad765b7c31c5373ef87d1f9d1f
4
- data.tar.gz: ffe297e230feabd12b36a6370256142ce8ad3b2b
3
+ metadata.gz: 4f3c04184513136f46a2e22bdee2267e6a0197d2
4
+ data.tar.gz: 308434d9e8d514059c51e8c3af29d9da6d0f2ab2
5
5
  SHA512:
6
- metadata.gz: 515a7148b5d315a2a9a6a2ae82c2cf46972c6ee0b316db48f8c5e0c537a579e3bd1a71b9f88d335af3ab3a0ad0de3ab9cf1248d096f6c9e3117117cd67b07884
7
- data.tar.gz: 317d94877251e277060edff38deca49a17d6a727adc7848be6600793b70583ff57abe4ff1258746d90bd4135c6311b463db97d66e3a1d04cb74d739c0402387d
6
+ metadata.gz: c4d55875019e0c5e5906d05648b3e6f96ee2dd22a85f30a7827a244992b841b633561433a0b54aa52a6d4b49a540c976a3e5dce049edff292a135451fe1a0266
7
+ data.tar.gz: 98082ec475eec0c11a73c085c4112a7ef92a77c67d3e343c9e62768682ed090ad799c623ad894dac03218189cef6e41e6edd14f8b6f76e45639e1f5559143808
@@ -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>
@@ -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
@@ -357,6 +357,7 @@ module Calabash module Android
357
357
 
358
358
  unless succeeded
359
359
  ::Cucumber.wants_to_quit = true
360
+ pn = package_name(app_path)
360
361
  raise "#{pn} did not get updated. Aborting!"
361
362
  end
362
363
  end
@@ -637,16 +638,16 @@ module Calabash module Android
637
638
  raise "Could not push #{local} to #{remote}" unless system(cmd)
638
639
  end
639
640
 
640
- def start_test_server_in_background(options={})
641
+ def start_test_server_in_background(options={}, &block)
641
642
  raise "Will not start test server because of previous failures." if ::Cucumber.wants_to_quit
642
643
 
643
644
  if keyguard_enabled?
644
645
  wake_up
645
646
  end
646
647
 
647
- env_options = options
648
+ env_options = options.clone
649
+ env_options.delete(:intent)
648
650
 
649
- env_options[:target_package] ||= package_name(@app_path)
650
651
  env_options[:main_activity] ||= main_activity(@app_path)
651
652
  env_options[:test_server_port] ||= @test_server_port
652
653
  env_options[:class] ||= "sh.calaba.instrumentationbackend.InstrumentationBackend"
@@ -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}))
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")
@@ -1,5 +1,5 @@
1
1
  module Calabash
2
2
  module Android
3
- VERSION = "0.7.4.pre1"
3
+ VERSION = "0.8.0.pre1"
4
4
  end
5
5
  end
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.4.pre1
4
+ version: 0.8.0.pre1
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-05-13 00:00:00.000000000 Z
11
+ date: 2016-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber