calabash-android 0.7.2 → 0.7.3.preintentstart1
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: b318f68b7441a38baf7bc4898677e13a9c40472a
|
4
|
+
data.tar.gz: 5e9e6c60c4978bada21a7e3d4768d80c2dcef8cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10c0579fba3fe651cf14fe860a7e46488697eb1720d45b0743e4152d3975370465e9bdda0fdc924b66cfdc77878fca7200bc15462c0806d3db1c80cd48bfc570
|
7
|
+
data.tar.gz: c90be72108c623261e7713e89f60be0d955170403042a8f6ca1b891999adf74c2612aeb7e5a13ab99347770768ead6d74306a787f8e61f915fe58298d2936116
|
Binary file
|
@@ -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
|
@@ -332,6 +332,15 @@ module Calabash module Android
|
|
332
332
|
::Cucumber.wants_to_quit = true
|
333
333
|
raise "#{pn} did not get installed. Reason: '#{result.lines.last.chomp}'. Aborting!"
|
334
334
|
end
|
335
|
+
|
336
|
+
# Enable GPS location mocking on Android Marshmallow+
|
337
|
+
if _sdk_version >= 23
|
338
|
+
cmd = "#{adb_command} shell appops set #{package_name(app_path)} 58 allow"
|
339
|
+
log("Enabling GPS mocking using '#{cmd}'")
|
340
|
+
`#{cmd}`
|
341
|
+
end
|
342
|
+
|
343
|
+
true
|
335
344
|
end
|
336
345
|
|
337
346
|
def update_app(app_path)
|
@@ -628,14 +637,15 @@ module Calabash module Android
|
|
628
637
|
raise "Could not push #{local} to #{remote}" unless system(cmd)
|
629
638
|
end
|
630
639
|
|
631
|
-
def start_test_server_in_background(options={})
|
640
|
+
def start_test_server_in_background(options={}, &block)
|
632
641
|
raise "Will not start test server because of previous failures." if ::Cucumber.wants_to_quit
|
633
642
|
|
634
643
|
if keyguard_enabled?
|
635
644
|
wake_up
|
636
645
|
end
|
637
646
|
|
638
|
-
env_options = options
|
647
|
+
env_options = options.clone
|
648
|
+
env_options.delete(:intent)
|
639
649
|
|
640
650
|
env_options[:target_package] ||= package_name(@app_path)
|
641
651
|
env_options[:main_activity] ||= main_activity(@app_path)
|
@@ -710,12 +720,26 @@ module Calabash module Android
|
|
710
720
|
|
711
721
|
log("Client and server versions match (client: #{client_version}, server: #{server_version}). Proceeding...")
|
712
722
|
|
723
|
+
block.call if block
|
724
|
+
|
725
|
+
start_application(options[:intent])
|
726
|
+
|
713
727
|
# What is Calabash tracking? Read this post for information
|
714
728
|
# No private data (like ip addresses) are collected
|
715
729
|
# https://github.com/calabash/calabash-android/issues/655
|
716
730
|
Calabash::Android::UsageTracker.new.post_usage_async
|
717
731
|
end
|
718
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
|
+
|
719
743
|
def shutdown_test_server
|
720
744
|
begin
|
721
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.
|
4
|
+
version: 0.7.3.preintentstart1
|
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-
|
11
|
+
date: 2016-03-23 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:
|
394
|
+
version: 1.3.1
|
395
395
|
requirements: []
|
396
396
|
rubyforge_project:
|
397
397
|
rubygems_version: 2.4.5.1
|