calabash-android 0.7.3.preintentstart5 → 0.7.3

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: e0981e947fa0d7b5ac2fb31f2cde526a464a5308
4
- data.tar.gz: 7c68bf51bb34cd0255d9e3db26ae676fa37d0c3a
3
+ metadata.gz: 72cb718ac59ea123871ad75921668b4b2d587aab
4
+ data.tar.gz: acea14151fd1f5f0fd83fca1c0006fbb71b611b8
5
5
  SHA512:
6
- metadata.gz: e41143ea406a4d2760c66fce62b08651c3820a5bf3a51baa362451f85dc6ced094fa186e0260e9cb69936fc34779b761e2cd19f4cb7da14b27177cad2b2bb56b
7
- data.tar.gz: 9542b8aa09ac0e2e06f65ab0927637afd2f6068ad175c0b973ad4bd00f6226013b43e86680d83d556a6f6ce58ca948dffc1fb575163db4fb4c70bebcdcacf0a1
6
+ metadata.gz: 8e4bf76ec803f3ca02103b410de1f8f15d6a8549e9e5fbf9948e57a7fb56c5aaa9214be05a4e19b689bde17ed69fc5be3a047adcf4e1271dbfdc22831a1509a3
7
+ data.tar.gz: b4b13f2a8b80c4a44add234e290c8117cba9a7a3bb131807525bb4659236477b422f735e94910a2b9b700a9b7aa19ecf1079529efb374c3e09de27b7bc1085f6
@@ -3,9 +3,7 @@
3
3
  package="#testPackage#"
4
4
  android:versionCode="3"
5
5
  android:versionName="0.3.0">
6
- <application android:label="instrumentation_backend"
7
- android:largeHeap="true">
8
-
6
+ <application android:label="instrumentation_backend">
9
7
  <uses-library android:name="android.test.runner" />
10
8
  <uses-library android:name="com.google.android.maps" android:required="false" />
11
9
  <activity
@@ -33,26 +31,8 @@
33
31
  android:stateNotNeeded="true"
34
32
  android:noHistory="true"
35
33
  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"/>
53
34
  </application>
54
- <uses-sdk android:minSdkVersion="4"
55
- android:targetSdkVersion="21"/>
35
+ <uses-sdk android:minSdkVersion="4" />
56
36
  <instrumentation android:targetPackage="#targetPackage#" android:name="sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner" />
57
37
  <instrumentation android:targetPackage="#targetPackage#" android:name="sh.calaba.instrumentationbackend.ClearAppData" />
58
38
  <instrumentation android:targetPackage="#targetPackage#" android:name="sh.calaba.instrumentationbackend.ClearAppData2" />
@@ -67,6 +47,5 @@
67
47
  <uses-permission android:name="android.permission.INTERNET" />
68
48
  <uses-permission android:name="android.permission.GET_TASKS" />
69
49
  <uses-permission android:name="android.permission.REORDER_TASKS" />
70
- <uses-permission android:name="android.permission.CAMERA" />
71
50
 
72
51
  </manifest>
@@ -26,6 +26,8 @@ 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
29
31
  end
30
32
 
31
33
  def get_monkey_port
@@ -65,6 +67,7 @@ module Calabash
65
67
  end
66
68
 
67
69
  def kill_monkey_processes_on_device
70
+ perform_action('send_tcp', @@monkey_port, "quit", true) unless @@monkey_port.nil?
68
71
  existing_monkey_pids.each do |pid|
69
72
  `#{adb_command} shell kill -9 #{pid}`
70
73
  end
@@ -102,6 +105,7 @@ module Calabash
102
105
  start_monkey if should_start_monkey
103
106
  monkey_touch(:down, x, y)
104
107
  monkey_touch(:up, x, y)
108
+ kill_existing_monkey_processes
105
109
  end
106
110
 
107
111
  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={}, &block)
143
- default_device.start_test_server_in_background(options, &block)
142
+ def start_test_server_in_background(options={})
143
+ default_device.start_test_server_in_background(options)
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={}, &block)
640
+ def start_test_server_in_background(options={})
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.clone
648
- env_options.delete(:intent)
647
+ env_options = options
649
648
 
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,26 +719,12 @@ 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
-
726
722
  # What is Calabash tracking? Read this post for information
727
723
  # No private data (like ip addresses) are collected
728
724
  # https://github.com/calabash/calabash-android/issues/655
729
725
  Calabash::Android::UsageTracker.new.post_usage_async
730
726
  end
731
727
 
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
-
742
728
  def shutdown_test_server
743
729
  begin
744
730
  http("/kill")
@@ -1,5 +1,5 @@
1
1
  module Calabash
2
2
  module Android
3
- VERSION = "0.7.3.preintentstart5"
3
+ VERSION = "0.7.3"
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.3.preintentstart5
4
+ version: 0.7.3
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-03-27 00:00:00.000000000 Z
11
+ date: 2016-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -389,9 +389,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
389
389
  version: '0'
390
390
  required_rubygems_version: !ruby/object:Gem::Requirement
391
391
  requirements:
392
- - - ">"
392
+ - - ">="
393
393
  - !ruby/object:Gem::Version
394
- version: 1.3.1
394
+ version: '0'
395
395
  requirements: []
396
396
  rubyforge_project:
397
397
  rubygems_version: 2.4.5.1