[GitHub] dpogue commented on a change in pull request #834: CB-14152 add cordova-js@4.2.4 blog post

2018-06-21 Thread GitBox
dpogue commented on a change in pull request #834: CB-14152 add 
cordova-js@4.2.4 blog post
URL: https://github.com/apache/cordova-docs/pull/834#discussion_r197348546
 
 

 ##
 File path: www/_posts/2018-06-22-cordova-js-release-4.2.4.md
 ##
 @@ -0,0 +1,24 @@
+---
+layout: post
+author:
+name: Chris Brody
+url: https://twitter.com/brodybits
+title:  "Cordova-JS release"
+categories: news
+tags: release tools
+---
+
+We are happy to announce that `cordova-js 4.2.4` has been released. This is 
the source of the JavaScript code in `cordova.js` used in each of the Cordova 
platform implementations.
+
+## Release Highlights
+
+The purpose of this release is to include a recent logging update with 
internal `npm audit` messages resolved in the package build. Here are the major 
changes:
+
+* [CB-9366](https://issues.apache.org/jira/browse/CB-9366) log `error.stack` 
data
+* [CB-14145](https://issues.apache.org/jira/browse/CB-14145) `package.json` 
resolve `npm audit` warnings in `devDependencies` (for build and test scripts)
+* [CB-14155](https://issues.apache.org/jira/browse/CB-14155) fix btest build 
target (by using `express` instead of `connect` in `devDependencies`)
+* Other internal test fixes
+
+## Deprecation Note
+
+As NodeJS 4.x support ended on April 30th, 2018, we are proceeding 
with our [previously 
announced](https://cordova.apache.org/news/2016/10/01/0.x-4.x-deprecation-timeline.html)
 deprecation timeline.  This is probably the last release that will support 
NodeJS 4.x.
 
 Review comment:
   cordova-js was never really compatible with node (it's a client-side 
library, effectively) so I'm not sure this notice makes sense on this post.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] brodybits opened a new pull request #834: CB-14152 add cordova-js@4.2.4 blog post

2018-06-21 Thread GitBox
brodybits opened a new pull request #834: CB-14152 add cordova-js@4.2.4 blog 
post
URL: https://github.com/apache/cordova-docs/pull/834
 
 
   
   
   ### Platforms affected
   
   All
   
   ### What does this PR do?
   
   - cordova-js@4.2.4 blog post
   
   ### What testing has been done on this change?
   
   Author proofread
   
   ### Checklist
   
   - [x] __[Reported an 
issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database__
   - [x] Commit message follows the format: "GH-3232: (android) Fix bug with 
resolving file paths", where GH- is the GitHub issue ID & "android" is the 
platform affected.
   - ~~Added automated test coverage as appropriate for this change.~~
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



svn commit: r27640 - in /dev/cordova/CB-14152: ./ cordova-js-4.2.4.tgz cordova-js-4.2.4.tgz.asc cordova-js-4.2.4.tgz.md5 cordova-js-4.2.4.tgz.sha512

2018-06-21 Thread brodybits
Author: brodybits
Date: Fri Jun 22 04:16:31 2018
New Revision: 27640

Log:
CB-14152 upload release candidate for cordova-js 4.2.4 tools release

Added:
dev/cordova/CB-14152/
dev/cordova/CB-14152/cordova-js-4.2.4.tgz   (with props)
dev/cordova/CB-14152/cordova-js-4.2.4.tgz.asc
dev/cordova/CB-14152/cordova-js-4.2.4.tgz.md5
dev/cordova/CB-14152/cordova-js-4.2.4.tgz.sha512

Added: dev/cordova/CB-14152/cordova-js-4.2.4.tgz
==
Binary file - no diff available.

Propchange: dev/cordova/CB-14152/cordova-js-4.2.4.tgz
--
svn:mime-type = application/octet-stream

Added: dev/cordova/CB-14152/cordova-js-4.2.4.tgz.asc
==
--- dev/cordova/CB-14152/cordova-js-4.2.4.tgz.asc (added)
+++ dev/cordova/CB-14152/cordova-js-4.2.4.tgz.asc Fri Jun 22 04:16:31 2018
@@ -0,0 +1,11 @@
+-BEGIN PGP SIGNATURE-
+
+iQEzBAABCAAdFiEEXjUDYFB33lfJxk6ew7Rd4NiD/dgFAlssd8MACgkQw7Rd4NiD
+/djmjgf5AYMJZIxFSsVwKpLA4iFW1JGGe/u/KI+n/2bQdajEe+V1ANN+gOL0SYsD
+UjOEvQmxm0LVzCe/JnspyI/bHKzBKAd+sCIm5RX5abGwkxWy0SdE+S5G0wv4Fdn/
+QUs9o5i55WJVvbxCrie+Tn8bSGmUvwnSf38VaEr4Du4hDCFCbByn1cHN5DVVvgOu
+Qm9F6GMK4yA3pmxxSADdRHZYI/+1Ps0V83Ox3j/DSwZwEvdcj/o0e50aa2DddbYA
+05qpfj6mNpIsDl5F0KX6XHX7R1ahU2TmcfM+GAZbqQoHgeOIQxmh+07OBdRQqkQz
+YDBm7JiKIk5rKFXpeQKiK38lwQFYfA==
+=884L
+-END PGP SIGNATURE-

Added: dev/cordova/CB-14152/cordova-js-4.2.4.tgz.md5
==
--- dev/cordova/CB-14152/cordova-js-4.2.4.tgz.md5 (added)
+++ dev/cordova/CB-14152/cordova-js-4.2.4.tgz.md5 Fri Jun 22 04:16:31 2018
@@ -0,0 +1 @@
+da743662fc774171ec52fd986e77cc2d

Added: dev/cordova/CB-14152/cordova-js-4.2.4.tgz.sha512
==
--- dev/cordova/CB-14152/cordova-js-4.2.4.tgz.sha512 (added)
+++ dev/cordova/CB-14152/cordova-js-4.2.4.tgz.sha512 Fri Jun 22 04:16:31 2018
@@ -0,0 +1 @@
+432d0edf0fe0c1b22a209ce5c82cbad273f026517573be042e9b1f0c819707ddbfb924f99d04925035433f850e7dbfdce8e53bc8fab184258e1913b24d828f0f



-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] knight9999 commented on issue #168: CB-12849: checking mediaState in destroy method, and moving file by stream when renameTo failing

2018-06-21 Thread GitBox
knight commented on issue #168: CB-12849: checking mediaState in destroy 
method, and moving file by stream when renameTo failing
URL: 
https://github.com/apache/cordova-plugin-media/pull/168#issuecomment-399312189
 
 
   Ok, I have rebased master.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] shazron commented on issue #168: CB-12849: checking mediaState in destroy method, and moving file by stream when renameTo failing

2018-06-21 Thread GitBox
shazron commented on issue #168: CB-12849: checking mediaState in destroy 
method, and moving file by stream when renameTo failing
URL: 
https://github.com/apache/cordova-plugin-media/pull/168#issuecomment-399309428
 
 
   Looks like commit from master has passed, so feel free to rebase/merge this 
PR


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] shazron commented on issue #168: CB-12849: checking mediaState in destroy method, and moving file by stream when renameTo failing

2018-06-21 Thread GitBox
shazron commented on issue #168: CB-12849: checking mediaState in destroy 
method, and moving file by stream when renameTo failing
URL: 
https://github.com/apache/cordova-plugin-media/pull/168#issuecomment-399308180
 
 
   I've pulled in #166. Once https://travis-ci.org/apache/cordova-plugin-media 
passes can you rebase/merge from master to get the latest changes and push this 
up so the CI can re-run?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[cordova-plugin-media] branch master updated: CB-14091: fix tests code for stream url and remove browser (#166)

2018-06-21 Thread shazron
This is an automated email from the ASF dual-hosted git repository.

shazron pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-media.git


The following commit(s) were added to refs/heads/master by this push:
 new 524c337  CB-14091: fix tests code for stream url and remove browser 
(#166)
524c337 is described below

commit 524c337306ee98b580ed62214b031771fdf0b23e
Author: Kenichi Naito 
AuthorDate: Fri Jun 22 12:12:03 2018 +0900

CB-14091: fix tests code for stream url and remove browser (#166)

* fix tests code for fix stream url and remove browser
* Update .travis.yml - upgraded node.js to use 6.14.2 (Node 4 is deprecated)
* remove streaming test for Android 4.4 (KitKat does not support modern SSL)
---
 .travis.yml| 14 +++---
 tests/tests.js | 14 --
 2 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 9e7438f..f39fe51 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,35 +5,35 @@ addons:
 env:
   global:
   - SAUCE_USERNAME=snay
-  - TRAVIS_NODE_VERSION="4.2"
+  - TRAVIS_NODE_VERSION="6.14.2"
 matrix:
   include:
   - env: PLATFORM=browser-chrome
 os: linux
 language: node_js
-node_js: '4.2'
+node_js: '6.14.2'
   - env: PLATFORM=browser-firefox
 os: linux
 language: node_js
-node_js: '4.2'
+node_js: '6.14.2'
   - env: PLATFORM=browser-safari
 os: linux
 language: node_js
-node_js: '4.2'
+node_js: '6.14.2'
   - env: PLATFORM=browser-edge
 os: linux
 language: node_js
-node_js: '4.2'
+node_js: '6.14.2'
   - env: PLATFORM=ios-9.3
 os: osx
 osx_image: xcode7.3
 language: node_js
-node_js: '4.2'
+node_js: '6.14.2'
   - env: PLATFORM=ios-10.0
 os: osx
 osx_image: xcode7.3
 language: node_js
-node_js: '4.2'
+node_js: '6.14.2'
   - env: PLATFORM=android-4.4
 os: linux
 language: android
diff --git a/tests/tests.js b/tests/tests.js
index 218f2a9..953b954 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -27,7 +27,7 @@
 var ACTUAL_PLAYBACK_TEST_TIMEOUT = 2 * 60 * 1000;
 
 var WEB_MP3_FILE = 'https://cordova.apache.org/downloads/BlueZedEx.mp3';
-var WEB_MP3_STREAM = 
'http://c22033-l.i.core.cdn.streamfarm.net/22033mdr/live/3087mdr_figaro/ch_classic_128.mp3';
+var WEB_MP3_STREAM = 'https://cordova.apache.org/downloads/BlueZedEx.mp3';
 
 var isWindows = cordova.platformId === 'windows8' || cordova.platformId === 
'windows';
 var isBrowser = cordova.platformId === 'browser';
@@ -37,6 +37,8 @@ var isBrowser = cordova.platformId === 'browser';
 var isAudioSupported = isWindows ? 
!!Windows.Media.Devices.MediaDevice.getDefaultAudioRenderId(Windows.Media.Devices.AudioDeviceRole.default)
 :
 cordova.platformId === 'ios' ? !window.SAUCELABS_ENV : true;
 
+var isKitKat = cordova.platformId === 'android' && 
/Android\s4\.4/.test(window.navigator.userAgent);
+
 exports.defineAutoTests = function () {
 var failed = function (done, msg, context) {
 if (context && context.done) return;
@@ -233,7 +235,7 @@ exports.defineAutoTests = function () {
 
 it("media.spec.19 position should be set properly", function 
(done) {
 // no audio hardware available
-if (!isAudioSupported) {
+if (!isAudioSupported || isBrowser || isKitKat) {
 pending();
 }
 
@@ -262,7 +264,7 @@ exports.defineAutoTests = function () {
 }, ACTUAL_PLAYBACK_TEST_TIMEOUT);
 
 it("media.spec.20 duration should be set properly", function 
(done) {
-if (!isAudioSupported || cordova.platformId === 
'blackberry10') {
+if (!isAudioSupported || cordova.platformId === 'blackberry10' 
|| isBrowser || isKitKat) {
 pending();
 }
 
@@ -291,7 +293,7 @@ exports.defineAutoTests = function () {
 }, ACTUAL_PLAYBACK_TEST_TIMEOUT);
 
 it("media.spec.21 should be able to resume playback after pause", 
function (done) {
-if (!isAudioSupported || cordova.platformId === 
'blackberry10') {
+if (!isAudioSupported || cordova.platformId === 'blackberry10' 
|| isKitKat) {
 pending();
 }
 
@@ -335,7 +337,7 @@ exports.defineAutoTests = function () {
 }, ACTUAL_PLAYBACK_TEST_TIMEOUT);
 
 it("media.spec.22 should be able to seek through file", function 
(done) {
-if (!isAudioSupported || cordova.platformId === 
'blackberry10') {
+if (!isAudioSupported || cordova.platformId === 'blackberry10' 
|| isKitKat) {
 pending();
 }
 
@@ -421,7 +423,7 @@ exports.defineAutoTests = function () {
 it("media.spec.25 should be able to play an audio stream", function 
(done) {
 // no audio hardware available, OR
 // O_o Safari can't play the stream, so we're

[GitHub] shazron closed pull request #166: CB-14091: fix tests code for stream url and remove browser

2018-06-21 Thread GitBox
shazron closed pull request #166: CB-14091: fix tests code for stream url and 
remove browser
URL: https://github.com/apache/cordova-plugin-media/pull/166
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.travis.yml b/.travis.yml
index 9e7438f0..f39fe518 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,35 +5,35 @@ addons:
 env:
   global:
   - SAUCE_USERNAME=snay
-  - TRAVIS_NODE_VERSION="4.2"
+  - TRAVIS_NODE_VERSION="6.14.2"
 matrix:
   include:
   - env: PLATFORM=browser-chrome
 os: linux
 language: node_js
-node_js: '4.2'
+node_js: '6.14.2'
   - env: PLATFORM=browser-firefox
 os: linux
 language: node_js
-node_js: '4.2'
+node_js: '6.14.2'
   - env: PLATFORM=browser-safari
 os: linux
 language: node_js
-node_js: '4.2'
+node_js: '6.14.2'
   - env: PLATFORM=browser-edge
 os: linux
 language: node_js
-node_js: '4.2'
+node_js: '6.14.2'
   - env: PLATFORM=ios-9.3
 os: osx
 osx_image: xcode7.3
 language: node_js
-node_js: '4.2'
+node_js: '6.14.2'
   - env: PLATFORM=ios-10.0
 os: osx
 osx_image: xcode7.3
 language: node_js
-node_js: '4.2'
+node_js: '6.14.2'
   - env: PLATFORM=android-4.4
 os: linux
 language: android
diff --git a/tests/tests.js b/tests/tests.js
index 218f2a95..953b9547 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -27,7 +27,7 @@
 var ACTUAL_PLAYBACK_TEST_TIMEOUT = 2 * 60 * 1000;
 
 var WEB_MP3_FILE = 'https://cordova.apache.org/downloads/BlueZedEx.mp3';
-var WEB_MP3_STREAM = 
'http://c22033-l.i.core.cdn.streamfarm.net/22033mdr/live/3087mdr_figaro/ch_classic_128.mp3';
+var WEB_MP3_STREAM = 'https://cordova.apache.org/downloads/BlueZedEx.mp3';
 
 var isWindows = cordova.platformId === 'windows8' || cordova.platformId === 
'windows';
 var isBrowser = cordova.platformId === 'browser';
@@ -37,6 +37,8 @@ var isBrowser = cordova.platformId === 'browser';
 var isAudioSupported = isWindows ? 
!!Windows.Media.Devices.MediaDevice.getDefaultAudioRenderId(Windows.Media.Devices.AudioDeviceRole.default)
 :
 cordova.platformId === 'ios' ? !window.SAUCELABS_ENV : true;
 
+var isKitKat = cordova.platformId === 'android' && 
/Android\s4\.4/.test(window.navigator.userAgent);
+
 exports.defineAutoTests = function () {
 var failed = function (done, msg, context) {
 if (context && context.done) return;
@@ -233,7 +235,7 @@ exports.defineAutoTests = function () {
 
 it("media.spec.19 position should be set properly", function 
(done) {
 // no audio hardware available
-if (!isAudioSupported) {
+if (!isAudioSupported || isBrowser || isKitKat) {
 pending();
 }
 
@@ -262,7 +264,7 @@ exports.defineAutoTests = function () {
 }, ACTUAL_PLAYBACK_TEST_TIMEOUT);
 
 it("media.spec.20 duration should be set properly", function 
(done) {
-if (!isAudioSupported || cordova.platformId === 
'blackberry10') {
+if (!isAudioSupported || cordova.platformId === 'blackberry10' 
|| isBrowser || isKitKat) {
 pending();
 }
 
@@ -291,7 +293,7 @@ exports.defineAutoTests = function () {
 }, ACTUAL_PLAYBACK_TEST_TIMEOUT);
 
 it("media.spec.21 should be able to resume playback after pause", 
function (done) {
-if (!isAudioSupported || cordova.platformId === 
'blackberry10') {
+if (!isAudioSupported || cordova.platformId === 'blackberry10' 
|| isKitKat) {
 pending();
 }
 
@@ -335,7 +337,7 @@ exports.defineAutoTests = function () {
 }, ACTUAL_PLAYBACK_TEST_TIMEOUT);
 
 it("media.spec.22 should be able to seek through file", function 
(done) {
-if (!isAudioSupported || cordova.platformId === 
'blackberry10') {
+if (!isAudioSupported || cordova.platformId === 'blackberry10' 
|| isKitKat) {
 pending();
 }
 
@@ -421,7 +423,7 @@ exports.defineAutoTests = function () {
 it("media.spec.25 should be able to play an audio stream", function 
(done) {
 // no audio hardware available, OR
 // O_o Safari can't play the stream, so we're skipping this test 
on all browsers o_O
-if (!isAudioSupported || isBrowser) {
+if (!isAudioSupported || isBrowser || isKitKat) {
 pending();
 }
 


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please cont

[GitHub] knight9999 commented on issue #168: CB-12849: checking mediaState in destroy method, and moving file by stream when renameTo failing

2018-06-21 Thread GitBox
knight commented on issue #168: CB-12849: checking mediaState in destroy 
method, and moving file by stream when renameTo failing
URL: 
https://github.com/apache/cordova-plugin-media/pull/168#issuecomment-399305568
 
 
   The travis CI errors are resolved by other PR 
https://github.com/apache/cordova-plugin-media/pull/166 .


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] brodybits opened a new pull request #174: WORKAROUND SOLUTION for local grunt issue in cordova-js

2018-06-21 Thread GitBox
brodybits opened a new pull request #174: WORKAROUND SOLUTION for local grunt 
issue in cordova-js
URL: https://github.com/apache/cordova-coho/pull/174
 
 
   
   
   ### Platforms affected
   
   All
   
   ### What does this PR do?
   
   
   **Resolves the following issue:**
   
   If I would try `coho prepare-platform-release-branch` or `coho copy-js` it 
stops with an error like this:
   
   ```sh
   cordova-js/  Executing: grunt compile:android 
--platformVersion=7.1.1-dev
   grunt-cli: The grunt command line interface (v1.2.0)
   
   Fatal error: Unable to find local grunt.
   ```
   
   If I would try `npm install` in `cordova-js` it does not resolve the issue. 
`coho` seems to clean `node_modules` before attempting `grunt compile:android`.
   
   Ugly workaround was to commit node_modules in my local (personal) master 
branch of cordova-js (NOT in the apache repo) before running `coho 
prepare-platform-release-branch` or `coho copy-js`.
   
   The update proposed here is a workaround solution that automatically does 
`npm install` in `cordova-js` to solve the grunt issue described here.
   
   **Moving forward:**
   
   I would like to see at least one other member try this change before 
integrating into master. I have not tried it with more than one platform at a 
time (not sure if I would favor updating more than one platform at a time 
anyway).
   
   I think a much nicer solution would be for us to move on to a more modern 
solution such as WebPack, microbundle, or maybe even Gulp instead of Grunt.
   
   ### What testing has been done on this change?
   
   Both `./cordova-coho/coho copy-js -r android` and `./cordova-coho/coho 
prepare-platform-release-branch --version 8.0.0-dev -r android` work as 
expected for me.
   
   (I generally use a local clone of the `cordova-coho` repo for `coho` tasks.)
   
   ### Checklist
   
   - ~~[Reported an issue](http://cordova.apache.org/contribute/issues.html) in 
the JIRA database~~
   - ~~Commit message follows the format: "CB-3232: (android) Fix bug with 
resolving file paths", where CB- is the JIRA ID & "android" is the platform 
affected.~~
   - ~~Added automated test coverage as appropriate for this change.~~


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[cordova-android] branch master updated (559b083 -> e9750b5)

2018-06-21 Thread raphinesse
This is an automated email from the ASF dual-hosted git repository.

raphinesse pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-android.git.


from 559b083  Add unit tests for run and retryPromise
 add f90f004  Add unit tests for Adb.js
 add 4f1aa97  Add unit tests for AndroidManifest.js
 add 0bf0e48  Prevent Api.js tests from polluting the reporter output
 new e9750b5  Merge pull request #456 from Menardi/more_android_tests

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 spec/unit/Adb.spec.js | 229 +++
 spec/unit/AndroidManifest.spec.js | 318 ++
 spec/unit/Api.spec.js |  14 +-
 3 files changed, 554 insertions(+), 7 deletions(-)
 create mode 100644 spec/unit/Adb.spec.js
 create mode 100644 spec/unit/AndroidManifest.spec.js


-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[cordova-android] 01/01: Merge pull request #456 from Menardi/more_android_tests

2018-06-21 Thread raphinesse
This is an automated email from the ASF dual-hosted git repository.

raphinesse pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-android.git

commit e9750b5cabe70b1fc9abfad28fd1239d9b9415c2
Merge: 559b083 0bf0e48
Author: Raphael von der Grün 
AuthorDate: Fri Jun 22 03:17:19 2018 +0200

Merge pull request #456 from Menardi/more_android_tests

More android tests

 spec/unit/Adb.spec.js | 229 +++
 spec/unit/AndroidManifest.spec.js | 318 ++
 spec/unit/Api.spec.js |  14 +-
 3 files changed, 554 insertions(+), 7 deletions(-)


-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] raphinesse closed pull request #456: More android tests

2018-06-21 Thread GitBox
raphinesse closed pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/spec/unit/Adb.spec.js b/spec/unit/Adb.spec.js
new file mode 100644
index 0..c63797857
--- /dev/null
+++ b/spec/unit/Adb.spec.js
@@ -0,0 +1,229 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const CordovaError = require('cordova-common').CordovaError;
+const rewire = require('rewire');
+
+describe('Adb', () => {
+const adbOutput = `List of devices attached
+emulator-5554\tdevice
+123a76565509e124\tdevice`;
+const [, emulatorLine, deviceLine] = adbOutput.split('\n');
+const emulatorId = emulatorLine.split('\t')[0];
+const deviceId = deviceLine.split('\t')[0];
+
+const alreadyExistsError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_ALREADY_EXISTS]';
+const certificateError = 'adb: failed to install app.apk: 
Failure[INSTALL_PARSE_FAILED_NO_CERTIFICATES]';
+const downgradeError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_VERSION_DOWNGRADE]';
+
+let Adb;
+let spawnSpy;
+
+beforeEach(() => {
+Adb = rewire('../../bin/templates/cordova/lib/Adb');
+spawnSpy = jasmine.createSpy('spawn');
+Adb.__set__('spawn', spawnSpy);
+});
+
+describe('isDevice', () => {
+it('should return true for a real device', () => {
+const isDevice = Adb.__get__('isDevice');
+
+expect(isDevice(deviceLine)).toBeTruthy();
+expect(isDevice(emulatorLine)).toBeFalsy();
+});
+});
+
+describe('isEmulator', () => {
+it('should return true for an emulator', () => {
+const isEmulator = Adb.__get__('isEmulator');
+
+expect(isEmulator(emulatorLine)).toBeTruthy();
+expect(isEmulator(deviceLine)).toBeFalsy();
+});
+});
+
+describe('devices', () => {
+beforeEach(() => {
+spawnSpy.and.returnValue(Promise.resolve(adbOutput));
+});
+
+it('should return only devices if no options are specified', () => {
+return Adb.devices().then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(deviceId);
+});
+});
+
+it('should return only emulators if opts.emulators is true', () => {
+return Adb.devices({emulators: true}).then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(emulatorId);
+});
+});
+});
+
+describe('install', () => {
+beforeEach(() => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+});
+
+it('should target the passed device id to adb', () => {
+return Adb.install(deviceId).then(() => {
+const args = spawnSpy.calls.argsFor(0);
+expect(args[0]).toBe('adb');
+
+const adbArgs = args[1].join(' ');
+expect(adbArgs).toMatch(`-s ${deviceId}`);
+});
+});
+
+it('should add the -r flag if opts.replace is set', () => {
+return Adb.install(deviceId, '', { replace: true }).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain('-r');
+});
+});
+
+it('should pass the correct package path to adb', () => {
+const packagePath = 'build/test/app.apk';
+
+return Adb.install(deviceId, packagePath).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain(packagePath);
+});
+});
+
+it('should reject with a CordovaError if the adb output suggests a 
failure', () => {
+spawnSpy.and.returnValue(Promise.resolve(alreadyExistsError));
+
+return Adb.install(deviceId, '').then(
+()

[GitHub] raphinesse commented on issue #456: More android tests

2018-06-21 Thread GitBox
raphinesse commented on issue #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#issuecomment-399290852
 
 
   Thanks again for these wonderful tests. :1st_place_medal: 
   
   Thanks to you we have now over 50% coverage! Time to get us some badges 
:grin: 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] codecov-io edited a comment on issue #456: More android tests

2018-06-21 Thread GitBox
codecov-io edited a comment on issue #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#issuecomment-399022994
 
 
   # 
[Codecov](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=h1) 
Report
   > Merging 
[#456](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=desc) 
into 
[master](https://codecov.io/gh/apache/cordova-android/commit/559b0833b42402a2b0fba6d6369fbc713e1063c1?src=pr&el=desc)
 will **increase** coverage by `4.42%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/cordova-android/pull/456/graphs/tree.svg?src=pr&token=q14nMf6C5a&width=650&height=150)](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master #456  +/-   ##
   ==
   + Coverage   47.63%   52.06%   +4.42% 
   ==
 Files  17   17  
 Lines1694 1694  
 Branches  311  311  
   ==
   + Hits  807  882  +75 
   + Misses887  812  -75
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=tree) | 
Coverage Δ | |
   |---|---|---|
   | 
[bin/templates/cordova/lib/AndroidManifest.js](https://codecov.io/gh/apache/cordova-android/pull/456/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9jb3Jkb3ZhL2xpYi9BbmRyb2lkTWFuaWZlc3QuanM=)
 | `100% <0%> (+64.86%)` | :arrow_up: |
   | 
[bin/templates/cordova/lib/Adb.js](https://codecov.io/gh/apache/cordova-android/pull/456/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9jb3Jkb3ZhL2xpYi9BZGIuanM=)
 | `100% <0%> (+65.85%)` | :arrow_up: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=footer).
 Last update 
[559b083...0bf0e48](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] codecov-io edited a comment on issue #456: More android tests

2018-06-21 Thread GitBox
codecov-io edited a comment on issue #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#issuecomment-399022994
 
 
   # 
[Codecov](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=h1) 
Report
   > Merging 
[#456](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=desc) 
into 
[master](https://codecov.io/gh/apache/cordova-android/commit/559b0833b42402a2b0fba6d6369fbc713e1063c1?src=pr&el=desc)
 will **increase** coverage by `4.42%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/cordova-android/pull/456/graphs/tree.svg?width=650&height=150&src=pr&token=q14nMf6C5a)](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master #456  +/-   ##
   ==
   + Coverage   47.63%   52.06%   +4.42% 
   ==
 Files  17   17  
 Lines1694 1694  
 Branches  311  311  
   ==
   + Hits  807  882  +75 
   + Misses887  812  -75
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=tree) | 
Coverage Δ | |
   |---|---|---|
   | 
[bin/templates/cordova/lib/AndroidManifest.js](https://codecov.io/gh/apache/cordova-android/pull/456/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9jb3Jkb3ZhL2xpYi9BbmRyb2lkTWFuaWZlc3QuanM=)
 | `100% <0%> (+64.86%)` | :arrow_up: |
   | 
[bin/templates/cordova/lib/Adb.js](https://codecov.io/gh/apache/cordova-android/pull/456/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9jb3Jkb3ZhL2xpYi9BZGIuanM=)
 | `100% <0%> (+65.85%)` | :arrow_up: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=footer).
 Last update 
[559b083...0bf0e48](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] raphinesse commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
raphinesse commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197316519
 
 

 ##
 File path: spec/unit/Adb.spec.js
 ##
 @@ -0,0 +1,222 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const rewire = require('rewire');
+
+describe('Adb', () => {
+const adbOutput = `List of devices attached
+emulator-5554\tdevice
+123a76565509e124\tdevice`;
+const [, emulatorLine, deviceLine] = adbOutput.split('\n');
+const emulatorId = emulatorLine.split('\t')[0];
+const deviceId = deviceLine.split('\t')[0];
+
+const alreadyExistsError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_ALREADY_EXISTS]';
+const certificateError = 'adb: failed to install app.apk: 
Failure[INSTALL_PARSE_FAILED_NO_CERTIFICATES]';
+const downgradeError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_VERSION_DOWNGRADE]';
+
+let Adb;
+let spawnSpy;
+
+beforeEach(() => {
+Adb = rewire('../../bin/templates/cordova/lib/Adb');
+spawnSpy = jasmine.createSpy('spawn');
+Adb.__set__('spawn', spawnSpy);
+});
+
+describe('isDevice', () => {
+it('should return true for a real device', () => {
+const isDevice = Adb.__get__('isDevice');
+
+expect(isDevice(deviceLine)).toBeTruthy();
+expect(isDevice(emulatorLine)).toBeFalsy();
+});
+});
+
+describe('isEmulator', () => {
+it('should return true for a real device', () => {
+const isEmulator = Adb.__get__('isEmulator');
+
+expect(isEmulator(emulatorLine)).toBeTruthy();
+expect(isEmulator(deviceLine)).toBeFalsy();
+});
+});
+
+describe('devices', () => {
+beforeEach(() => {
+spawnSpy.and.returnValue(Promise.resolve(adbOutput));
+});
+
+it('should return only devices if no options are specified', () => {
+return Adb.devices().then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(deviceId);
+});
+});
+
+it('should return only emulators if opts.emulators is true', () => {
+return Adb.devices({emulators: true}).then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(emulatorId);
+});
+});
+});
+
+describe('install', () => {
+it('should target the passed device id to adb', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId).then(() => {
+const args = spawnSpy.calls.argsFor(0);
+expect(args[0]).toBe('adb');
+
+const adbArgs = args[1].join(' ');
+expect(adbArgs).toMatch(`-s ${deviceId}`);
+});
+});
+
+it('should add the -r flag if opts.replace is set', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId, '', { replace: true }).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain('-r');
+});
+});
+
+it('should pass the correct package path to adb', () => {
+const packagePath = 'build/test/app.apk';
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId, packagePath).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain(packagePath);
+});
+});
+
+it('should reject with a CordovaError if the adb output suggests a 
failure', () => {
+spawnSpy.and.returnValue(Promise.resolve(alreadyExistsError));
+
+return Adb.install(deviceId, '')
+.then(() => fail('Unexpectedly resolved'))
+.catch(err => {
+expect(err instanceof 
Adb.__get__('CordovaError')).toBe(true);
+});
+});
+
+// The following two tests are somewhat brittle as they are dependent 
on the
+// exact message

[GitHub] raphinesse commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
raphinesse commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197316373
 
 

 ##
 File path: spec/unit/Adb.spec.js
 ##
 @@ -0,0 +1,222 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const rewire = require('rewire');
+
+describe('Adb', () => {
+const adbOutput = `List of devices attached
+emulator-5554\tdevice
+123a76565509e124\tdevice`;
+const [, emulatorLine, deviceLine] = adbOutput.split('\n');
+const emulatorId = emulatorLine.split('\t')[0];
+const deviceId = deviceLine.split('\t')[0];
+
+const alreadyExistsError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_ALREADY_EXISTS]';
+const certificateError = 'adb: failed to install app.apk: 
Failure[INSTALL_PARSE_FAILED_NO_CERTIFICATES]';
+const downgradeError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_VERSION_DOWNGRADE]';
+
+let Adb;
+let spawnSpy;
+
+beforeEach(() => {
+Adb = rewire('../../bin/templates/cordova/lib/Adb');
+spawnSpy = jasmine.createSpy('spawn');
+Adb.__set__('spawn', spawnSpy);
+});
+
+describe('isDevice', () => {
+it('should return true for a real device', () => {
+const isDevice = Adb.__get__('isDevice');
+
+expect(isDevice(deviceLine)).toBeTruthy();
+expect(isDevice(emulatorLine)).toBeFalsy();
+});
+});
+
+describe('isEmulator', () => {
+it('should return true for a real device', () => {
+const isEmulator = Adb.__get__('isEmulator');
+
+expect(isEmulator(emulatorLine)).toBeTruthy();
+expect(isEmulator(deviceLine)).toBeFalsy();
+});
+});
+
+describe('devices', () => {
+beforeEach(() => {
+spawnSpy.and.returnValue(Promise.resolve(adbOutput));
+});
+
+it('should return only devices if no options are specified', () => {
+return Adb.devices().then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(deviceId);
+});
+});
+
+it('should return only emulators if opts.emulators is true', () => {
+return Adb.devices({emulators: true}).then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(emulatorId);
+});
+});
+});
+
+describe('install', () => {
+it('should target the passed device id to adb', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId).then(() => {
+const args = spawnSpy.calls.argsFor(0);
+expect(args[0]).toBe('adb');
+
+const adbArgs = args[1].join(' ');
+expect(adbArgs).toMatch(`-s ${deviceId}`);
+});
+});
+
+it('should add the -r flag if opts.replace is set', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId, '', { replace: true }).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain('-r');
+});
+});
+
+it('should pass the correct package path to adb', () => {
+const packagePath = 'build/test/app.apk';
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId, packagePath).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain(packagePath);
+});
+});
+
+it('should reject with a CordovaError if the adb output suggests a 
failure', () => {
+spawnSpy.and.returnValue(Promise.resolve(alreadyExistsError));
+
+return Adb.install(deviceId, '')
+.then(() => fail('Unexpectedly resolved'))
+.catch(err => {
+expect(err instanceof 
Adb.__get__('CordovaError')).toBe(true);
+});
+});
+
+// The following two tests are somewhat brittle as they are dependent 
on the
+// exact message

[GitHub] codecov-io edited a comment on issue #456: More android tests

2018-06-21 Thread GitBox
codecov-io edited a comment on issue #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#issuecomment-399022994
 
 
   # 
[Codecov](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=h1) 
Report
   > Merging 
[#456](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=desc) 
into 
[master](https://codecov.io/gh/apache/cordova-android/commit/559b0833b42402a2b0fba6d6369fbc713e1063c1?src=pr&el=desc)
 will **increase** coverage by `4.42%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/cordova-android/pull/456/graphs/tree.svg?src=pr&token=q14nMf6C5a&width=650&height=150)](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master #456  +/-   ##
   ==
   + Coverage   47.63%   52.06%   +4.42% 
   ==
 Files  17   17  
 Lines1694 1694  
 Branches  311  311  
   ==
   + Hits  807  882  +75 
   + Misses887  812  -75
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=tree) | 
Coverage Δ | |
   |---|---|---|
   | 
[bin/templates/cordova/lib/AndroidManifest.js](https://codecov.io/gh/apache/cordova-android/pull/456/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9jb3Jkb3ZhL2xpYi9BbmRyb2lkTWFuaWZlc3QuanM=)
 | `100% <0%> (+64.86%)` | :arrow_up: |
   | 
[bin/templates/cordova/lib/Adb.js](https://codecov.io/gh/apache/cordova-android/pull/456/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9jb3Jkb3ZhL2xpYi9BZGIuanM=)
 | `100% <0%> (+65.85%)` | :arrow_up: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=footer).
 Last update 
[559b083...8d3f9bb](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] Menardi commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
Menardi commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197310789
 
 

 ##
 File path: spec/unit/AndroidManifest.spec.js
 ##
 @@ -0,0 +1,311 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const fs = require('fs');
+const os = require('os');
+const path = require('path');
+const rewire = require('rewire');
+
+describe('AndroidManifest', () => {
+const VERSION_CODE = '50407';
+const VERSION_NAME = '5.4.7';
+const PACKAGE_ID = 'io.cordova.test';
+const ACTIVITY_LAUNCH_MODE = 'singleTop';
+const ACTIVITY_NAME = 'MainActivity';
+const ACTIVITY_ORIENTATION = 'portrait';
+const MIN_SDK_VERSION = '12';
+const MAX_SDK_VERSION = '88';
+const TARGET_SDK_VERSION = '27';
+
+const DEFAULT_MANIFEST = `
+http://schemas.android.com/apk/res/android";>
+
+
+
+
+
+
+
+
+
+
+
+`;
+
+const manifestPath = path.join(os.tmpdir(), 
`AndroidManifest${Date.now()}.xml`);
+
+function createTempManifestFile (xml) {
+fs.writeFileSync(manifestPath, xml);
+}
+
+function removeTempManifestFile () {
+fs.unlinkSync(manifestPath);
+}
+
+let AndroidManifest;
+let manifest;
+
+beforeEach(() => {
+createTempManifestFile(DEFAULT_MANIFEST);
+
+AndroidManifest = 
rewire('../../bin/templates/cordova/lib/AndroidManifest');
+manifest = new AndroidManifest(manifestPath);
+});
+
+afterEach(() => {
+removeTempManifestFile();
+});
+
+describe('constructor', () => {
+it('should parse the manifest', () => {
+expect(manifest.doc.getroot().tag).toBe('manifest');
+});
+
+it('should throw an error if not a valid manifest', () => {
+createTempManifestFile(``);
+
+try {
+manifest = new AndroidManifest(manifestPath);
+fail('Expected error to be thrown');
+} catch (e) {
+// Pass
+}
+});
 
 Review comment:
   That is much better. I should have realised Jasmine could cover this case.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] Menardi commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
Menardi commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197306635
 
 

 ##
 File path: spec/unit/Adb.spec.js
 ##
 @@ -0,0 +1,222 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const rewire = require('rewire');
+
+describe('Adb', () => {
+const adbOutput = `List of devices attached
+emulator-5554\tdevice
+123a76565509e124\tdevice`;
+const [, emulatorLine, deviceLine] = adbOutput.split('\n');
+const emulatorId = emulatorLine.split('\t')[0];
+const deviceId = deviceLine.split('\t')[0];
+
+const alreadyExistsError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_ALREADY_EXISTS]';
+const certificateError = 'adb: failed to install app.apk: 
Failure[INSTALL_PARSE_FAILED_NO_CERTIFICATES]';
+const downgradeError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_VERSION_DOWNGRADE]';
+
+let Adb;
+let spawnSpy;
+
+beforeEach(() => {
+Adb = rewire('../../bin/templates/cordova/lib/Adb');
+spawnSpy = jasmine.createSpy('spawn');
+Adb.__set__('spawn', spawnSpy);
+});
+
+describe('isDevice', () => {
+it('should return true for a real device', () => {
+const isDevice = Adb.__get__('isDevice');
+
+expect(isDevice(deviceLine)).toBeTruthy();
+expect(isDevice(emulatorLine)).toBeFalsy();
+});
+});
+
+describe('isEmulator', () => {
+it('should return true for a real device', () => {
+const isEmulator = Adb.__get__('isEmulator');
+
+expect(isEmulator(emulatorLine)).toBeTruthy();
+expect(isEmulator(deviceLine)).toBeFalsy();
+});
+});
+
+describe('devices', () => {
+beforeEach(() => {
+spawnSpy.and.returnValue(Promise.resolve(adbOutput));
+});
+
+it('should return only devices if no options are specified', () => {
+return Adb.devices().then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(deviceId);
+});
+});
+
+it('should return only emulators if opts.emulators is true', () => {
+return Adb.devices({emulators: true}).then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(emulatorId);
+});
+});
+});
+
+describe('install', () => {
+it('should target the passed device id to adb', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId).then(() => {
+const args = spawnSpy.calls.argsFor(0);
+expect(args[0]).toBe('adb');
+
+const adbArgs = args[1].join(' ');
+expect(adbArgs).toMatch(`-s ${deviceId}`);
+});
+});
+
+it('should add the -r flag if opts.replace is set', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId, '', { replace: true }).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain('-r');
+});
+});
+
+it('should pass the correct package path to adb', () => {
+const packagePath = 'build/test/app.apk';
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId, packagePath).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain(packagePath);
+});
+});
+
+it('should reject with a CordovaError if the adb output suggests a 
failure', () => {
+spawnSpy.and.returnValue(Promise.resolve(alreadyExistsError));
+
+return Adb.install(deviceId, '')
+.then(() => fail('Unexpectedly resolved'))
+.catch(err => {
+expect(err instanceof 
Adb.__get__('CordovaError')).toBe(true);
+});
 
 Review comment:
   Oh yes, I didn't consider that side effect of having the `catch` at the end. 
Good spot :+1:

--

[GitHub] Menardi commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
Menardi commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197307268
 
 

 ##
 File path: spec/unit/Adb.spec.js
 ##
 @@ -0,0 +1,222 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const rewire = require('rewire');
+
+describe('Adb', () => {
+const adbOutput = `List of devices attached
+emulator-5554\tdevice
+123a76565509e124\tdevice`;
+const [, emulatorLine, deviceLine] = adbOutput.split('\n');
+const emulatorId = emulatorLine.split('\t')[0];
+const deviceId = deviceLine.split('\t')[0];
+
+const alreadyExistsError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_ALREADY_EXISTS]';
+const certificateError = 'adb: failed to install app.apk: 
Failure[INSTALL_PARSE_FAILED_NO_CERTIFICATES]';
+const downgradeError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_VERSION_DOWNGRADE]';
+
+let Adb;
+let spawnSpy;
+
+beforeEach(() => {
+Adb = rewire('../../bin/templates/cordova/lib/Adb');
+spawnSpy = jasmine.createSpy('spawn');
+Adb.__set__('spawn', spawnSpy);
+});
+
+describe('isDevice', () => {
+it('should return true for a real device', () => {
+const isDevice = Adb.__get__('isDevice');
+
+expect(isDevice(deviceLine)).toBeTruthy();
+expect(isDevice(emulatorLine)).toBeFalsy();
+});
+});
+
+describe('isEmulator', () => {
+it('should return true for a real device', () => {
+const isEmulator = Adb.__get__('isEmulator');
+
+expect(isEmulator(emulatorLine)).toBeTruthy();
+expect(isEmulator(deviceLine)).toBeFalsy();
+});
+});
+
+describe('devices', () => {
+beforeEach(() => {
+spawnSpy.and.returnValue(Promise.resolve(adbOutput));
+});
+
+it('should return only devices if no options are specified', () => {
+return Adb.devices().then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(deviceId);
+});
+});
+
+it('should return only emulators if opts.emulators is true', () => {
+return Adb.devices({emulators: true}).then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(emulatorId);
+});
+});
+});
+
+describe('install', () => {
+it('should target the passed device id to adb', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId).then(() => {
+const args = spawnSpy.calls.argsFor(0);
+expect(args[0]).toBe('adb');
+
+const adbArgs = args[1].join(' ');
+expect(adbArgs).toMatch(`-s ${deviceId}`);
+});
+});
+
+it('should add the -r flag if opts.replace is set', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId, '', { replace: true }).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain('-r');
+});
+});
+
+it('should pass the correct package path to adb', () => {
+const packagePath = 'build/test/app.apk';
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId, packagePath).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain(packagePath);
+});
+});
+
+it('should reject with a CordovaError if the adb output suggests a 
failure', () => {
+spawnSpy.and.returnValue(Promise.resolve(alreadyExistsError));
+
+return Adb.install(deviceId, '')
+.then(() => fail('Unexpectedly resolved'))
+.catch(err => {
+expect(err instanceof 
Adb.__get__('CordovaError')).toBe(true);
+});
+});
+
+// The following two tests are somewhat brittle as they are dependent 
on the
+// exact message re

[GitHub] Menardi commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
Menardi commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197309116
 
 

 ##
 File path: spec/unit/Adb.spec.js
 ##
 @@ -0,0 +1,222 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const rewire = require('rewire');
+
+describe('Adb', () => {
+const adbOutput = `List of devices attached
+emulator-5554\tdevice
+123a76565509e124\tdevice`;
+const [, emulatorLine, deviceLine] = adbOutput.split('\n');
+const emulatorId = emulatorLine.split('\t')[0];
+const deviceId = deviceLine.split('\t')[0];
+
+const alreadyExistsError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_ALREADY_EXISTS]';
+const certificateError = 'adb: failed to install app.apk: 
Failure[INSTALL_PARSE_FAILED_NO_CERTIFICATES]';
+const downgradeError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_VERSION_DOWNGRADE]';
+
+let Adb;
+let spawnSpy;
+
+beforeEach(() => {
+Adb = rewire('../../bin/templates/cordova/lib/Adb');
+spawnSpy = jasmine.createSpy('spawn');
+Adb.__set__('spawn', spawnSpy);
+});
+
+describe('isDevice', () => {
+it('should return true for a real device', () => {
+const isDevice = Adb.__get__('isDevice');
+
+expect(isDevice(deviceLine)).toBeTruthy();
+expect(isDevice(emulatorLine)).toBeFalsy();
+});
+});
+
+describe('isEmulator', () => {
+it('should return true for a real device', () => {
+const isEmulator = Adb.__get__('isEmulator');
+
+expect(isEmulator(emulatorLine)).toBeTruthy();
+expect(isEmulator(deviceLine)).toBeFalsy();
+});
+});
+
+describe('devices', () => {
+beforeEach(() => {
+spawnSpy.and.returnValue(Promise.resolve(adbOutput));
+});
+
+it('should return only devices if no options are specified', () => {
+return Adb.devices().then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(deviceId);
+});
+});
+
+it('should return only emulators if opts.emulators is true', () => {
+return Adb.devices({emulators: true}).then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(emulatorId);
+});
+});
+});
+
+describe('install', () => {
+it('should target the passed device id to adb', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId).then(() => {
+const args = spawnSpy.calls.argsFor(0);
+expect(args[0]).toBe('adb');
+
+const adbArgs = args[1].join(' ');
+expect(adbArgs).toMatch(`-s ${deviceId}`);
+});
+});
+
+it('should add the -r flag if opts.replace is set', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId, '', { replace: true }).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain('-r');
+});
+});
+
+it('should pass the correct package path to adb', () => {
+const packagePath = 'build/test/app.apk';
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId, packagePath).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain(packagePath);
+});
+});
+
+it('should reject with a CordovaError if the adb output suggests a 
failure', () => {
+spawnSpy.and.returnValue(Promise.resolve(alreadyExistsError));
+
+return Adb.install(deviceId, '')
+.then(() => fail('Unexpectedly resolved'))
+.catch(err => {
+expect(err instanceof 
Adb.__get__('CordovaError')).toBe(true);
+});
+});
+
+// The following two tests are somewhat brittle as they are dependent 
on the
+// exact message re

[GitHub] Menardi commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
Menardi commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197310236
 
 

 ##
 File path: spec/unit/AndroidManifest.spec.js
 ##
 @@ -0,0 +1,311 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const fs = require('fs');
+const os = require('os');
+const path = require('path');
+const rewire = require('rewire');
+
+describe('AndroidManifest', () => {
+const VERSION_CODE = '50407';
+const VERSION_NAME = '5.4.7';
+const PACKAGE_ID = 'io.cordova.test';
+const ACTIVITY_LAUNCH_MODE = 'singleTop';
+const ACTIVITY_NAME = 'MainActivity';
+const ACTIVITY_ORIENTATION = 'portrait';
+const MIN_SDK_VERSION = '12';
+const MAX_SDK_VERSION = '88';
+const TARGET_SDK_VERSION = '27';
+
+const DEFAULT_MANIFEST = `
+http://schemas.android.com/apk/res/android";>
+
+
+
+
+
+
+
+
+
+
+
+`;
+
+const manifestPath = path.join(os.tmpdir(), 
`AndroidManifest${Date.now()}.xml`);
+
+function createTempManifestFile (xml) {
+fs.writeFileSync(manifestPath, xml);
+}
+
+function removeTempManifestFile () {
+fs.unlinkSync(manifestPath);
+}
+
+let AndroidManifest;
+let manifest;
+
+beforeEach(() => {
+createTempManifestFile(DEFAULT_MANIFEST);
+
+AndroidManifest = 
rewire('../../bin/templates/cordova/lib/AndroidManifest');
+manifest = new AndroidManifest(manifestPath);
+});
+
+afterEach(() => {
+removeTempManifestFile();
+});
+
+describe('constructor', () => {
+it('should parse the manifest', () => {
+expect(manifest.doc.getroot().tag).toBe('manifest');
+});
+
+it('should throw an error if not a valid manifest', () => {
+createTempManifestFile(``);
+
+try {
+manifest = new AndroidManifest(manifestPath);
+fail('Expected error to be thrown');
+} catch (e) {
+// Pass
+}
+});
+});
+
+describe('versionName', () => {
+it('should get the version name', () => {
+expect(manifest.getVersionName()).toBe(VERSION_NAME);
+});
+
+it('should set the version name', () => {
+manifest.setVersionName('6.1.0');
+expect(manifest.getVersionName()).toBe('6.1.0');
+});
+});
+
+describe('versionCode', () => {
+it('should get the version code', () => {
+expect(manifest.getVersionCode()).toBe(VERSION_CODE);
+});
+
+it('should set the version code', () => {
+manifest.setVersionCode('95426');
+expect(manifest.getVersionCode()).toBe('95426');
+});
+});
+
+describe('packageId', () => {
+it('should get the package ID', () => {
+expect(manifest.getPackageId()).toBe(PACKAGE_ID);
+});
+
+it('should set the package ID', () => {
+manifest.setPackageId('io.cordova.newtest');
+expect(manifest.getPackageId()).toBe('io.cordova.newtest');
+});
+});
+
+describe('activity', () => {
+let activity;
+
+beforeEach(() => {
+activity = manifest.getActivity();
+});
+
+describe('name', () => {
+it('should get the activity name', () => {
+expect(activity.getName()).toBe(ACTIVITY_NAME);
+});
+
+it('should set the activity name', () => {
+activity.setName('NewActivity');
+expect(activity.getName()).toBe('NewActivity');
+});
+
+it('should remove the activity name if set to empty', () => {
+activity.setName();
+expect(activity.getName()).toBe(undefined);
+});
+});
+
+describe('orientation', () => {
+it('should get the activity orientation', () => {
+expect(activity.getOrientation()).toBe(ACTIVITY_ORIENTATION);
+});
+
+it('should set the activity orienation', () => {
+   

[GitHub] Menardi commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
Menardi commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197305634
 
 

 ##
 File path: spec/unit/Adb.spec.js
 ##
 @@ -0,0 +1,222 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const rewire = require('rewire');
+
+describe('Adb', () => {
+const adbOutput = `List of devices attached
+emulator-5554\tdevice
+123a76565509e124\tdevice`;
+const [, emulatorLine, deviceLine] = adbOutput.split('\n');
+const emulatorId = emulatorLine.split('\t')[0];
+const deviceId = deviceLine.split('\t')[0];
+
+const alreadyExistsError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_ALREADY_EXISTS]';
+const certificateError = 'adb: failed to install app.apk: 
Failure[INSTALL_PARSE_FAILED_NO_CERTIFICATES]';
+const downgradeError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_VERSION_DOWNGRADE]';
+
+let Adb;
+let spawnSpy;
+
+beforeEach(() => {
+Adb = rewire('../../bin/templates/cordova/lib/Adb');
+spawnSpy = jasmine.createSpy('spawn');
+Adb.__set__('spawn', spawnSpy);
+});
+
+describe('isDevice', () => {
+it('should return true for a real device', () => {
+const isDevice = Adb.__get__('isDevice');
+
+expect(isDevice(deviceLine)).toBeTruthy();
+expect(isDevice(emulatorLine)).toBeFalsy();
+});
+});
+
+describe('isEmulator', () => {
+it('should return true for a real device', () => {
 
 Review comment:
   The dangers of copy-paste! A lot of these tests are the same. I thought I 
caught all of these before submitting, sorry.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] Menardi commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
Menardi commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197310101
 
 

 ##
 File path: spec/unit/AndroidManifest.spec.js
 ##
 @@ -0,0 +1,311 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const fs = require('fs');
+const os = require('os');
+const path = require('path');
+const rewire = require('rewire');
+
+describe('AndroidManifest', () => {
+const VERSION_CODE = '50407';
+const VERSION_NAME = '5.4.7';
+const PACKAGE_ID = 'io.cordova.test';
+const ACTIVITY_LAUNCH_MODE = 'singleTop';
+const ACTIVITY_NAME = 'MainActivity';
+const ACTIVITY_ORIENTATION = 'portrait';
+const MIN_SDK_VERSION = '12';
+const MAX_SDK_VERSION = '88';
+const TARGET_SDK_VERSION = '27';
+
+const DEFAULT_MANIFEST = `
+http://schemas.android.com/apk/res/android";>
+
+
+
+
+
+
+
+
+
+
+
+`;
+
+const manifestPath = path.join(os.tmpdir(), 
`AndroidManifest${Date.now()}.xml`);
+
+function createTempManifestFile (xml) {
+fs.writeFileSync(manifestPath, xml);
+}
+
+function removeTempManifestFile () {
+fs.unlinkSync(manifestPath);
+}
+
+let AndroidManifest;
+let manifest;
+
+beforeEach(() => {
+createTempManifestFile(DEFAULT_MANIFEST);
+
+AndroidManifest = 
rewire('../../bin/templates/cordova/lib/AndroidManifest');
+manifest = new AndroidManifest(manifestPath);
+});
+
+afterEach(() => {
+removeTempManifestFile();
+});
+
+describe('constructor', () => {
+it('should parse the manifest', () => {
+expect(manifest.doc.getroot().tag).toBe('manifest');
+});
+
+it('should throw an error if not a valid manifest', () => {
+createTempManifestFile(``);
+
+try {
+manifest = new AndroidManifest(manifestPath);
+fail('Expected error to be thrown');
+} catch (e) {
+// Pass
+}
+});
+});
+
+describe('versionName', () => {
+it('should get the version name', () => {
+expect(manifest.getVersionName()).toBe(VERSION_NAME);
+});
+
+it('should set the version name', () => {
+manifest.setVersionName('6.1.0');
+expect(manifest.getVersionName()).toBe('6.1.0');
+});
 
 Review comment:
   The reason I didn't do that is that it wouldn't technically be a valid value 
for the manifest. I suppose it doesn't really matter though since we are really 
only testing text manipulation, not the validity of the manifest. This would 
make it more readable, so I will change it.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] jazbek opened a new issue #833: Missing documentation for OSX icons

2018-06-21 Thread GitBox
jazbek opened a new issue #833: Missing documentation for OSX icons
URL: https://github.com/apache/cordova-docs/issues/833
 
 
   **Issue Type**
   [ x] Bug
   [ ] Feature Request
   
   **Priority**
   [ x ] Minor 
   [ ] Major 
   [ ] Critical 
   [ ] Blocker 
   
   **Environment**
   * OS: OS X
   
   **Description**
   The documentation page that describes how to set up icons does not include 
any information on the OSX platform. I am marking this issue as Minor, but only 
because I googled extensively and could not find any answers, which leads me to 
believe that it's not affecting many people. However, for those of us building 
an OS X app with cordova, it's pretty important! :)


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] brodybits commented on issue #162: [CB-14156 WIP] Remove browserify - WIP NOT TESTED

2018-06-21 Thread GitBox
brodybits commented on issue #162: [CB-14156 WIP] Remove browserify - WIP NOT 
TESTED
URL: https://github.com/apache/cordova-js/pull/162#issuecomment-399216641
 
 
   I just raised [CB-14156](https://issues.apache.org/jira/browse/CB-14156) to 
report the problems with `browserify` in general, marking this as the easiest 
alternative solution.
   
   > Why?
   
   Problems now listed in CB-14156, biggest concern is with duplicated code.
   
   > Do you know the reason why this was there and what it was used for in the 
first place?
   
   Using `grunt` and `browserify` was more popular 3-4 years ago. Considering 
it doesn't work for me I suspect the `browserify` target has not been used for 
quite a while.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] raphinesse commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
raphinesse commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197131057
 
 

 ##
 File path: spec/unit/AndroidManifest.spec.js
 ##
 @@ -0,0 +1,311 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const fs = require('fs');
+const os = require('os');
+const path = require('path');
+const rewire = require('rewire');
+
+describe('AndroidManifest', () => {
+const VERSION_CODE = '50407';
+const VERSION_NAME = '5.4.7';
+const PACKAGE_ID = 'io.cordova.test';
+const ACTIVITY_LAUNCH_MODE = 'singleTop';
+const ACTIVITY_NAME = 'MainActivity';
+const ACTIVITY_ORIENTATION = 'portrait';
+const MIN_SDK_VERSION = '12';
+const MAX_SDK_VERSION = '88';
+const TARGET_SDK_VERSION = '27';
+
+const DEFAULT_MANIFEST = `
+http://schemas.android.com/apk/res/android";>
+
+
+
+
+
+
+
+
+
+
+
+`;
+
+const manifestPath = path.join(os.tmpdir(), 
`AndroidManifest${Date.now()}.xml`);
+
+function createTempManifestFile (xml) {
+fs.writeFileSync(manifestPath, xml);
+}
+
+function removeTempManifestFile () {
+fs.unlinkSync(manifestPath);
+}
+
+let AndroidManifest;
+let manifest;
+
+beforeEach(() => {
+createTempManifestFile(DEFAULT_MANIFEST);
+
+AndroidManifest = 
rewire('../../bin/templates/cordova/lib/AndroidManifest');
+manifest = new AndroidManifest(manifestPath);
+});
+
+afterEach(() => {
+removeTempManifestFile();
+});
+
+describe('constructor', () => {
+it('should parse the manifest', () => {
+expect(manifest.doc.getroot().tag).toBe('manifest');
+});
+
+it('should throw an error if not a valid manifest', () => {
+createTempManifestFile(``);
+
+try {
+manifest = new AndroidManifest(manifestPath);
+fail('Expected error to be thrown');
+} catch (e) {
+// Pass
+}
+});
+});
+
+describe('versionName', () => {
+it('should get the version name', () => {
+expect(manifest.getVersionName()).toBe(VERSION_NAME);
+});
+
+it('should set the version name', () => {
+manifest.setVersionName('6.1.0');
+expect(manifest.getVersionName()).toBe('6.1.0');
+});
+});
+
+describe('versionCode', () => {
+it('should get the version code', () => {
+expect(manifest.getVersionCode()).toBe(VERSION_CODE);
+});
+
+it('should set the version code', () => {
+manifest.setVersionCode('95426');
+expect(manifest.getVersionCode()).toBe('95426');
+});
+});
+
+describe('packageId', () => {
+it('should get the package ID', () => {
+expect(manifest.getPackageId()).toBe(PACKAGE_ID);
+});
+
+it('should set the package ID', () => {
+manifest.setPackageId('io.cordova.newtest');
+expect(manifest.getPackageId()).toBe('io.cordova.newtest');
+});
+});
+
+describe('activity', () => {
+let activity;
+
+beforeEach(() => {
+activity = manifest.getActivity();
+});
+
+describe('name', () => {
+it('should get the activity name', () => {
+expect(activity.getName()).toBe(ACTIVITY_NAME);
+});
+
+it('should set the activity name', () => {
+activity.setName('NewActivity');
+expect(activity.getName()).toBe('NewActivity');
+});
+
+it('should remove the activity name if set to empty', () => {
+activity.setName();
+expect(activity.getName()).toBe(undefined);
+});
+});
+
+describe('orientation', () => {
+it('should get the activity orientation', () => {
+expect(activity.getOrientation()).toBe(ACTIVITY_ORIENTATION);
+});
+
+it('should set the activity orienation', () => {
+

[GitHub] raphinesse commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
raphinesse commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197131057
 
 

 ##
 File path: spec/unit/AndroidManifest.spec.js
 ##
 @@ -0,0 +1,311 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const fs = require('fs');
+const os = require('os');
+const path = require('path');
+const rewire = require('rewire');
+
+describe('AndroidManifest', () => {
+const VERSION_CODE = '50407';
+const VERSION_NAME = '5.4.7';
+const PACKAGE_ID = 'io.cordova.test';
+const ACTIVITY_LAUNCH_MODE = 'singleTop';
+const ACTIVITY_NAME = 'MainActivity';
+const ACTIVITY_ORIENTATION = 'portrait';
+const MIN_SDK_VERSION = '12';
+const MAX_SDK_VERSION = '88';
+const TARGET_SDK_VERSION = '27';
+
+const DEFAULT_MANIFEST = `
+http://schemas.android.com/apk/res/android";>
+
+
+
+
+
+
+
+
+
+
+
+`;
+
+const manifestPath = path.join(os.tmpdir(), 
`AndroidManifest${Date.now()}.xml`);
+
+function createTempManifestFile (xml) {
+fs.writeFileSync(manifestPath, xml);
+}
+
+function removeTempManifestFile () {
+fs.unlinkSync(manifestPath);
+}
+
+let AndroidManifest;
+let manifest;
+
+beforeEach(() => {
+createTempManifestFile(DEFAULT_MANIFEST);
+
+AndroidManifest = 
rewire('../../bin/templates/cordova/lib/AndroidManifest');
+manifest = new AndroidManifest(manifestPath);
+});
+
+afterEach(() => {
+removeTempManifestFile();
+});
+
+describe('constructor', () => {
+it('should parse the manifest', () => {
+expect(manifest.doc.getroot().tag).toBe('manifest');
+});
+
+it('should throw an error if not a valid manifest', () => {
+createTempManifestFile(``);
+
+try {
+manifest = new AndroidManifest(manifestPath);
+fail('Expected error to be thrown');
+} catch (e) {
+// Pass
+}
+});
+});
+
+describe('versionName', () => {
+it('should get the version name', () => {
+expect(manifest.getVersionName()).toBe(VERSION_NAME);
+});
+
+it('should set the version name', () => {
+manifest.setVersionName('6.1.0');
+expect(manifest.getVersionName()).toBe('6.1.0');
+});
+});
+
+describe('versionCode', () => {
+it('should get the version code', () => {
+expect(manifest.getVersionCode()).toBe(VERSION_CODE);
+});
+
+it('should set the version code', () => {
+manifest.setVersionCode('95426');
+expect(manifest.getVersionCode()).toBe('95426');
+});
+});
+
+describe('packageId', () => {
+it('should get the package ID', () => {
+expect(manifest.getPackageId()).toBe(PACKAGE_ID);
+});
+
+it('should set the package ID', () => {
+manifest.setPackageId('io.cordova.newtest');
+expect(manifest.getPackageId()).toBe('io.cordova.newtest');
+});
+});
+
+describe('activity', () => {
+let activity;
+
+beforeEach(() => {
+activity = manifest.getActivity();
+});
+
+describe('name', () => {
+it('should get the activity name', () => {
+expect(activity.getName()).toBe(ACTIVITY_NAME);
+});
+
+it('should set the activity name', () => {
+activity.setName('NewActivity');
+expect(activity.getName()).toBe('NewActivity');
+});
+
+it('should remove the activity name if set to empty', () => {
+activity.setName();
+expect(activity.getName()).toBe(undefined);
+});
+});
+
+describe('orientation', () => {
+it('should get the activity orientation', () => {
+expect(activity.getOrientation()).toBe(ACTIVITY_ORIENTATION);
+});
+
+it('should set the activity orienation', () => {
+

[cordova-js] branch master updated: CB-14155 fix btest part 2: export npm script

2018-06-21 Thread brodybits
This is an automated email from the ASF dual-hosted git repository.

brodybits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-js.git


The following commit(s) were added to refs/heads/master by this push:
 new cc069cc  CB-14155 fix btest part 2: export npm script
cc069cc is described below

commit cc069cc8c664b27f7e27c1460cbabfcdda394619
Author: Christopher J. Brody 
AuthorDate: Thu Jun 21 11:04:37 2018 -0400

CB-14155 fix btest part 2: export npm script

Followup to btest fix in PR #160
---
 package.json | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package.json b/package.json
index 3f986a9..67b2dde 100644
--- a/package.json
+++ b/package.json
@@ -17,6 +17,7 @@
   "scripts": {
 "eslint": "eslint src test pkg",
 "test": "grunt test && npm run eslint",
+"btest": "grunt btest && npm run eslint",
 "build": "grunt compile",
 "build-browserify": "grunt compile-browserify"
   },


-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] brodybits closed pull request #164: CB-14155 fix btest part 2: export npm script

2018-06-21 Thread GitBox
brodybits closed pull request #164: CB-14155 fix btest part 2: export npm script
URL: https://github.com/apache/cordova-js/pull/164
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/package.json b/package.json
index 3f986a9f..67b2dde6 100644
--- a/package.json
+++ b/package.json
@@ -17,6 +17,7 @@
   "scripts": {
 "eslint": "eslint src test pkg",
 "test": "grunt test && npm run eslint",
+"btest": "grunt btest && npm run eslint",
 "build": "grunt compile",
 "build-browserify": "grunt compile-browserify"
   },


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] brodybits opened a new pull request #164: CB-14155 fix btest part 2: export npm script

2018-06-21 Thread GitBox
brodybits opened a new pull request #164: CB-14155 fix btest part 2: export npm 
script
URL: https://github.com/apache/cordova-js/pull/164
 
 
   
   
   ### Platforms affected
   
   All
   
   ### What does this PR do?
   
   Followup to btest fix in PR #160: export npm script in package.json
   
   ### What testing has been done on this change?
   
   `npm run btest` works as intended
   
   ### Checklist
   
   - [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) 
in the JIRA database
   - [x] Commit message follows the format: "CB-3232: (android) Fix bug with 
resolving file paths", where CB- is the JIRA ID & "android" is the platform 
affected.
   - ~~Added automated test coverage as appropriate for this change.~~


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] brodybits commented on issue #160: CB-14155: Fix btest by using express (instead of connect, etc.)

2018-06-21 Thread GitBox
brodybits commented on issue #160: CB-14155: Fix btest by using express 
(instead of connect, etc.)
URL: https://github.com/apache/cordova-js/pull/160#issuecomment-399135610
 
 
   Just raised Apache CB-14155 
() to track these changes.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] raphinesse commented on issue #437: CB-14038 (android): fix false positive detecting project type

2018-06-21 Thread GitBox
raphinesse commented on issue #437: CB-14038 (android): fix false positive 
detecting project type
URL: https://github.com/apache/cordova-android/pull/437#issuecomment-399133263
 
 
   Thanks for your answer.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] brodybits commented on issue #160: Fix btest by using express (instead of connect, etc.)

2018-06-21 Thread GitBox
brodybits commented on issue #160: Fix btest by using express (instead of 
connect, etc.)
URL: https://github.com/apache/cordova-js/pull/160#issuecomment-399117573
 
 
   Looks to me like "btest" means "run tests in the browser" ref: 
[tasks/test.js#L32-L35](https://github.com/apache/cordova-js/blob/master/tasks/test.js#L32-L35)
   
   But it would not work for me on my machine.
   
   In general I like to revive existing test targets if possible, which I did 
by using express instead of connect.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] raphinesse commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
raphinesse commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197121985
 
 

 ##
 File path: spec/unit/AndroidManifest.spec.js
 ##
 @@ -0,0 +1,311 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const fs = require('fs');
+const os = require('os');
+const path = require('path');
+const rewire = require('rewire');
+
+describe('AndroidManifest', () => {
+const VERSION_CODE = '50407';
+const VERSION_NAME = '5.4.7';
+const PACKAGE_ID = 'io.cordova.test';
+const ACTIVITY_LAUNCH_MODE = 'singleTop';
+const ACTIVITY_NAME = 'MainActivity';
+const ACTIVITY_ORIENTATION = 'portrait';
+const MIN_SDK_VERSION = '12';
+const MAX_SDK_VERSION = '88';
+const TARGET_SDK_VERSION = '27';
+
+const DEFAULT_MANIFEST = `
+http://schemas.android.com/apk/res/android";>
+
+
+
+
+
+
+
+
+
+
+
+`;
 
 Review comment:
   Could you wrap the really long lines please (maybe at 120; IDK)?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] raphinesse commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
raphinesse commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197126426
 
 

 ##
 File path: spec/unit/AndroidManifest.spec.js
 ##
 @@ -0,0 +1,311 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const fs = require('fs');
+const os = require('os');
+const path = require('path');
+const rewire = require('rewire');
+
+describe('AndroidManifest', () => {
+const VERSION_CODE = '50407';
+const VERSION_NAME = '5.4.7';
+const PACKAGE_ID = 'io.cordova.test';
+const ACTIVITY_LAUNCH_MODE = 'singleTop';
+const ACTIVITY_NAME = 'MainActivity';
+const ACTIVITY_ORIENTATION = 'portrait';
+const MIN_SDK_VERSION = '12';
+const MAX_SDK_VERSION = '88';
+const TARGET_SDK_VERSION = '27';
+
+const DEFAULT_MANIFEST = `
+http://schemas.android.com/apk/res/android";>
+
+
+
+
+
+
+
+
+
+
+
+`;
+
+const manifestPath = path.join(os.tmpdir(), 
`AndroidManifest${Date.now()}.xml`);
+
+function createTempManifestFile (xml) {
+fs.writeFileSync(manifestPath, xml);
+}
+
+function removeTempManifestFile () {
+fs.unlinkSync(manifestPath);
+}
+
+let AndroidManifest;
+let manifest;
+
+beforeEach(() => {
+createTempManifestFile(DEFAULT_MANIFEST);
+
+AndroidManifest = 
rewire('../../bin/templates/cordova/lib/AndroidManifest');
+manifest = new AndroidManifest(manifestPath);
+});
+
+afterEach(() => {
+removeTempManifestFile();
+});
+
+describe('constructor', () => {
+it('should parse the manifest', () => {
+expect(manifest.doc.getroot().tag).toBe('manifest');
+});
+
+it('should throw an error if not a valid manifest', () => {
+createTempManifestFile(``);
+
+try {
+manifest = new AndroidManifest(manifestPath);
+fail('Expected error to be thrown');
+} catch (e) {
+// Pass
+}
+});
 
 Review comment:
   Replace with
   ```js
   expect(_ => new AndroidManifest(manifestPath)).toThrowError(CordovaError);
   // or if it throws another Error
   expect(_ => new AndroidManifest(manifestPath)).toThrowError();
   ```


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] raphinesse commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
raphinesse commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197131057
 
 

 ##
 File path: spec/unit/AndroidManifest.spec.js
 ##
 @@ -0,0 +1,311 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const fs = require('fs');
+const os = require('os');
+const path = require('path');
+const rewire = require('rewire');
+
+describe('AndroidManifest', () => {
+const VERSION_CODE = '50407';
+const VERSION_NAME = '5.4.7';
+const PACKAGE_ID = 'io.cordova.test';
+const ACTIVITY_LAUNCH_MODE = 'singleTop';
+const ACTIVITY_NAME = 'MainActivity';
+const ACTIVITY_ORIENTATION = 'portrait';
+const MIN_SDK_VERSION = '12';
+const MAX_SDK_VERSION = '88';
+const TARGET_SDK_VERSION = '27';
+
+const DEFAULT_MANIFEST = `
+http://schemas.android.com/apk/res/android";>
+
+
+
+
+
+
+
+
+
+
+
+`;
+
+const manifestPath = path.join(os.tmpdir(), 
`AndroidManifest${Date.now()}.xml`);
+
+function createTempManifestFile (xml) {
+fs.writeFileSync(manifestPath, xml);
+}
+
+function removeTempManifestFile () {
+fs.unlinkSync(manifestPath);
+}
+
+let AndroidManifest;
+let manifest;
+
+beforeEach(() => {
+createTempManifestFile(DEFAULT_MANIFEST);
+
+AndroidManifest = 
rewire('../../bin/templates/cordova/lib/AndroidManifest');
+manifest = new AndroidManifest(manifestPath);
+});
+
+afterEach(() => {
+removeTempManifestFile();
+});
+
+describe('constructor', () => {
+it('should parse the manifest', () => {
+expect(manifest.doc.getroot().tag).toBe('manifest');
+});
+
+it('should throw an error if not a valid manifest', () => {
+createTempManifestFile(``);
+
+try {
+manifest = new AndroidManifest(manifestPath);
+fail('Expected error to be thrown');
+} catch (e) {
+// Pass
+}
+});
+});
+
+describe('versionName', () => {
+it('should get the version name', () => {
+expect(manifest.getVersionName()).toBe(VERSION_NAME);
+});
+
+it('should set the version name', () => {
+manifest.setVersionName('6.1.0');
+expect(manifest.getVersionName()).toBe('6.1.0');
+});
+});
+
+describe('versionCode', () => {
+it('should get the version code', () => {
+expect(manifest.getVersionCode()).toBe(VERSION_CODE);
+});
+
+it('should set the version code', () => {
+manifest.setVersionCode('95426');
+expect(manifest.getVersionCode()).toBe('95426');
+});
+});
+
+describe('packageId', () => {
+it('should get the package ID', () => {
+expect(manifest.getPackageId()).toBe(PACKAGE_ID);
+});
+
+it('should set the package ID', () => {
+manifest.setPackageId('io.cordova.newtest');
+expect(manifest.getPackageId()).toBe('io.cordova.newtest');
+});
+});
+
+describe('activity', () => {
+let activity;
+
+beforeEach(() => {
+activity = manifest.getActivity();
+});
+
+describe('name', () => {
+it('should get the activity name', () => {
+expect(activity.getName()).toBe(ACTIVITY_NAME);
+});
+
+it('should set the activity name', () => {
+activity.setName('NewActivity');
+expect(activity.getName()).toBe('NewActivity');
+});
+
+it('should remove the activity name if set to empty', () => {
+activity.setName();
+expect(activity.getName()).toBe(undefined);
+});
+});
+
+describe('orientation', () => {
+it('should get the activity orientation', () => {
+expect(activity.getOrientation()).toBe(ACTIVITY_ORIENTATION);
+});
+
+it('should set the activity orienation', () => {
+

[GitHub] raphinesse commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
raphinesse commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197133206
 
 

 ##
 File path: spec/unit/AndroidManifest.spec.js
 ##
 @@ -0,0 +1,311 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const fs = require('fs');
+const os = require('os');
+const path = require('path');
+const rewire = require('rewire');
+
+describe('AndroidManifest', () => {
+const VERSION_CODE = '50407';
+const VERSION_NAME = '5.4.7';
+const PACKAGE_ID = 'io.cordova.test';
+const ACTIVITY_LAUNCH_MODE = 'singleTop';
+const ACTIVITY_NAME = 'MainActivity';
+const ACTIVITY_ORIENTATION = 'portrait';
+const MIN_SDK_VERSION = '12';
+const MAX_SDK_VERSION = '88';
+const TARGET_SDK_VERSION = '27';
+
+const DEFAULT_MANIFEST = `
+http://schemas.android.com/apk/res/android";>
+
+
+
+
+
+
+
+
+
+
+
+`;
+
+const manifestPath = path.join(os.tmpdir(), 
`AndroidManifest${Date.now()}.xml`);
+
+function createTempManifestFile (xml) {
+fs.writeFileSync(manifestPath, xml);
+}
+
+function removeTempManifestFile () {
+fs.unlinkSync(manifestPath);
+}
+
+let AndroidManifest;
+let manifest;
+
+beforeEach(() => {
+createTempManifestFile(DEFAULT_MANIFEST);
+
+AndroidManifest = 
rewire('../../bin/templates/cordova/lib/AndroidManifest');
+manifest = new AndroidManifest(manifestPath);
+});
+
+afterEach(() => {
+removeTempManifestFile();
+});
+
+describe('constructor', () => {
+it('should parse the manifest', () => {
+expect(manifest.doc.getroot().tag).toBe('manifest');
+});
+
+it('should throw an error if not a valid manifest', () => {
+createTempManifestFile(``);
+
+try {
+manifest = new AndroidManifest(manifestPath);
+fail('Expected error to be thrown');
+} catch (e) {
+// Pass
+}
+});
+});
+
+describe('versionName', () => {
+it('should get the version name', () => {
+expect(manifest.getVersionName()).toBe(VERSION_NAME);
+});
+
+it('should set the version name', () => {
+manifest.setVersionName('6.1.0');
+expect(manifest.getVersionName()).toBe('6.1.0');
+});
+});
+
+describe('versionCode', () => {
+it('should get the version code', () => {
+expect(manifest.getVersionCode()).toBe(VERSION_CODE);
+});
+
+it('should set the version code', () => {
+manifest.setVersionCode('95426');
+expect(manifest.getVersionCode()).toBe('95426');
+});
+});
+
+describe('packageId', () => {
+it('should get the package ID', () => {
+expect(manifest.getPackageId()).toBe(PACKAGE_ID);
+});
+
+it('should set the package ID', () => {
+manifest.setPackageId('io.cordova.newtest');
+expect(manifest.getPackageId()).toBe('io.cordova.newtest');
+});
+});
+
+describe('activity', () => {
+let activity;
+
+beforeEach(() => {
+activity = manifest.getActivity();
+});
+
+describe('name', () => {
+it('should get the activity name', () => {
+expect(activity.getName()).toBe(ACTIVITY_NAME);
+});
+
+it('should set the activity name', () => {
+activity.setName('NewActivity');
+expect(activity.getName()).toBe('NewActivity');
+});
+
+it('should remove the activity name if set to empty', () => {
+activity.setName();
+expect(activity.getName()).toBe(undefined);
+});
+});
+
+describe('orientation', () => {
+it('should get the activity orientation', () => {
+expect(activity.getOrientation()).toBe(ACTIVITY_ORIENTATION);
+});
+
+it('should set the activity orienation', () => {
+

[GitHub] raphinesse commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
raphinesse commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197128582
 
 

 ##
 File path: spec/unit/AndroidManifest.spec.js
 ##
 @@ -0,0 +1,311 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const fs = require('fs');
+const os = require('os');
+const path = require('path');
+const rewire = require('rewire');
+
+describe('AndroidManifest', () => {
+const VERSION_CODE = '50407';
+const VERSION_NAME = '5.4.7';
+const PACKAGE_ID = 'io.cordova.test';
+const ACTIVITY_LAUNCH_MODE = 'singleTop';
+const ACTIVITY_NAME = 'MainActivity';
+const ACTIVITY_ORIENTATION = 'portrait';
+const MIN_SDK_VERSION = '12';
+const MAX_SDK_VERSION = '88';
+const TARGET_SDK_VERSION = '27';
+
+const DEFAULT_MANIFEST = `
+http://schemas.android.com/apk/res/android";>
+
+
+
+
+
+
+
+
+
+
+
+`;
+
+const manifestPath = path.join(os.tmpdir(), 
`AndroidManifest${Date.now()}.xml`);
+
+function createTempManifestFile (xml) {
+fs.writeFileSync(manifestPath, xml);
+}
+
+function removeTempManifestFile () {
+fs.unlinkSync(manifestPath);
+}
+
+let AndroidManifest;
+let manifest;
+
+beforeEach(() => {
+createTempManifestFile(DEFAULT_MANIFEST);
+
+AndroidManifest = 
rewire('../../bin/templates/cordova/lib/AndroidManifest');
+manifest = new AndroidManifest(manifestPath);
+});
+
+afterEach(() => {
+removeTempManifestFile();
+});
+
+describe('constructor', () => {
+it('should parse the manifest', () => {
+expect(manifest.doc.getroot().tag).toBe('manifest');
+});
+
+it('should throw an error if not a valid manifest', () => {
+createTempManifestFile(``);
+
+try {
+manifest = new AndroidManifest(manifestPath);
+fail('Expected error to be thrown');
+} catch (e) {
+// Pass
+}
+});
+});
+
+describe('versionName', () => {
+it('should get the version name', () => {
+expect(manifest.getVersionName()).toBe(VERSION_NAME);
+});
+
+it('should set the version name', () => {
+manifest.setVersionName('6.1.0');
+expect(manifest.getVersionName()).toBe('6.1.0');
+});
 
 Review comment:
   For all the setter tests, it would be nice if it were immediately obvious, 
that the value you are setting is *not* equal to the original value in the 
Manifest. Maybe something along the lines of:
   ```js
   const newVersion = VERSION_NAME + '-new';
   manifest.setVersionName(newVersion);
   expect(manifest.getVersionName()).toBe(newVersion);
   ```
   What do you think?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] janpio edited a comment on issue #160: Fix btest by using express (instead of connect, etc.)

2018-06-21 Thread GitBox
janpio edited a comment on issue #160: Fix btest by using express (instead of 
connect, etc.)
URL: https://github.com/apache/cordova-js/pull/160#issuecomment-399061047
 
 
   What is the motivation behind this? What is "btest"? Why no issue?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] janpio commented on issue #160: Fix btest by using express (instead of connect, etc.)

2018-06-21 Thread GitBox
janpio commented on issue #160: Fix btest by using express (instead of connect, 
etc.)
URL: https://github.com/apache/cordova-js/pull/160#issuecomment-399061047
 
 
   What is the motivation behind this? What is "btest"?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] jcesarmobile commented on issue #437: CB-14038 (android): fix false positive detecting project type

2018-06-21 Thread GitBox
jcesarmobile commented on issue #437: CB-14038 (android): fix false positive 
detecting project type
URL: https://github.com/apache/cordova-android/pull/437#issuecomment-399060126
 
 
   No, there is no work about it because the idea was to do a patch or minor 
release with this changes to unblock people with plugin problems, and the 
refactor was supposed to be done for next major release. But right now it's not 
clear to me if we are going to do a patch, minor or major release.
   
   Anyway, the refactor is not a breaking change, so it can be done at any time.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] janpio commented on issue #162: [WIP] Remove browserify - WIP NOT TESTED

2018-06-21 Thread GitBox
janpio commented on issue #162: [WIP] Remove browserify - WIP NOT TESTED
URL: https://github.com/apache/cordova-js/pull/162#issuecomment-399059926
 
 
   Why? Do you know the reason why this was there and what it was used for in 
the first place?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] janpio commented on issue #163: [WIP] package.json update eslint & other devDependencies

2018-06-21 Thread GitBox
janpio commented on issue #163: [WIP] package.json update eslint & other 
devDependencies 
URL: https://github.com/apache/cordova-js/pull/163#issuecomment-399059723
 
 
   (Placed the [WIP] in front of the title to make it more obvious and visible)


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] raphinesse commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
raphinesse commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197064564
 
 

 ##
 File path: spec/unit/Adb.spec.js
 ##
 @@ -0,0 +1,222 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const rewire = require('rewire');
+
+describe('Adb', () => {
+const adbOutput = `List of devices attached
+emulator-5554\tdevice
+123a76565509e124\tdevice`;
+const [, emulatorLine, deviceLine] = adbOutput.split('\n');
+const emulatorId = emulatorLine.split('\t')[0];
+const deviceId = deviceLine.split('\t')[0];
+
+const alreadyExistsError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_ALREADY_EXISTS]';
+const certificateError = 'adb: failed to install app.apk: 
Failure[INSTALL_PARSE_FAILED_NO_CERTIFICATES]';
+const downgradeError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_VERSION_DOWNGRADE]';
+
+let Adb;
+let spawnSpy;
+
+beforeEach(() => {
+Adb = rewire('../../bin/templates/cordova/lib/Adb');
+spawnSpy = jasmine.createSpy('spawn');
+Adb.__set__('spawn', spawnSpy);
+});
+
+describe('isDevice', () => {
+it('should return true for a real device', () => {
+const isDevice = Adb.__get__('isDevice');
+
+expect(isDevice(deviceLine)).toBeTruthy();
+expect(isDevice(emulatorLine)).toBeFalsy();
+});
+});
+
+describe('isEmulator', () => {
+it('should return true for a real device', () => {
 
 Review comment:
   `... an emulator`


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] janpio closed pull request #455: Start 8.0.0-dev in master - WIP

2018-06-21 Thread GitBox
janpio closed pull request #455: Start 8.0.0-dev in master - WIP
URL: https://github.com/apache/cordova-android/pull/455
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/VERSION b/VERSION
index 7e4568592..e4be07b06 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-7.2.0-dev
+8.0.0-dev
diff --git a/bin/templates/cordova/version b/bin/templates/cordova/version
index 23e837672..01229aa6d 100755
--- a/bin/templates/cordova/version
+++ b/bin/templates/cordova/version
@@ -20,7 +20,7 @@
 */
 
 // Coho updates this line:
-var VERSION = '7.2.0-dev';
+var VERSION = "8.0.0-dev";
 
 module.exports.version = VERSION;
 
diff --git a/bin/templates/project/assets/www/cordova.js 
b/bin/templates/project/assets/www/cordova.js
index 3ae354cd8..78f7df1ef 100644
--- a/bin/templates/project/assets/www/cordova.js
+++ b/bin/templates/project/assets/www/cordova.js
@@ -1,5 +1,5 @@
 // Platform: android
-// 4450a4cea50616e080a82e8ede9e3d6a1fe3c3ec
+// f5a790b434f6ac050da55c57e5fd5770f5a16512
 /*
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
@@ -19,9 +19,11 @@
  under the License.
 */
 ;(function() {
-var PLATFORM_VERSION_BUILD_LABEL = '7.2.0-dev';
+var PLATFORM_VERSION_BUILD_LABEL = '8.0.0-dev';
 // file: src/scripts/require.js
 
+/* jshint -W079 */
+/* jshint -W020 */
 
 var require;
 var define;
@@ -324,7 +326,7 @@ module.exports = cordova;
 
 });
 
-// file: 
/Users/steveng/repo/cordova/cordova-android/cordova-js-src/android/nativeapiprovider.js
+// file: 
/Users/brodybits/Documents/cordova/cordova-android/cordova-js-src/android/nativeapiprovider.js
 define("cordova/android/nativeapiprovider", function(require, exports, module) 
{
 
 /**
@@ -347,7 +349,7 @@ module.exports = {
 
 });
 
-// file: 
/Users/steveng/repo/cordova/cordova-android/cordova-js-src/android/promptbasednativeapi.js
+// file: 
/Users/brodybits/Documents/cordova/cordova-android/cordova-js-src/android/promptbasednativeapi.js
 define("cordova/android/promptbasednativeapi", function(require, exports, 
module) {
 
 /**
@@ -879,7 +881,7 @@ module.exports = channel;
 
 });
 
-// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/exec.js
+// file: 
/Users/brodybits/Documents/cordova/cordova-android/cordova-js-src/exec.js
 define("cordova/exec", function(require, exports, module) {
 
 /**
@@ -1637,7 +1639,7 @@ exports.reset();
 
 });
 
-// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/platform.js
+// file: 
/Users/brodybits/Documents/cordova/cordova-android/cordova-js-src/platform.js
 define("cordova/platform", function(require, exports, module) {
 
 // The last resume event that was received that had the result of a plugin 
call.
@@ -1747,7 +1749,7 @@ function onMessageFromNative(msg) {
 
 });
 
-// file: 
/Users/steveng/repo/cordova/cordova-android/cordova-js-src/plugin/android/app.js
+// file: 
/Users/brodybits/Documents/cordova/cordova-android/cordova-js-src/plugin/android/app.js
 define("cordova/plugin/android/app", function(require, exports, module) {
 
 var exec = require('cordova/exec');
diff --git a/framework/build.gradle b/framework/build.gradle
index dfe37a1e5..3dc5865bc 100644
--- a/framework/build.gradle
+++ b/framework/build.gradle
@@ -44,7 +44,7 @@ apply plugin: 'com.github.dcendents.android-maven'
 apply plugin: 'com.jfrog.bintray'
 
 group = 'org.apache.cordova'
-version = '7.2.0-dev'
+version = '8.0.0-dev'
 
 android {
 compileSdkVersion cdvCompileSdkVersion
@@ -131,9 +131,9 @@ bintray {
 licenses = ['Apache-2.0']
 labels = ['android', 'cordova', 'phonegap']
 version {
-name = '7.2.0-dev'
+name = '8.0.0-dev'
 released  = new Date()
-vcsTag = '7.2.0-dev'
+vcsTag = '8.0.0-dev'
 }
 }
 }
diff --git a/framework/src/org/apache/cordova/CordovaWebView.java 
b/framework/src/org/apache/cordova/CordovaWebView.java
index 6ef6ae6e7..306339837 100644
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -31,7 +31,7 @@ Licensed to the Apache Software Foundation (ASF) under one
  * are not expected to implement it.
  */
 public interface CordovaWebView {
-public static final String CORDOVA_VERSION = "7.2.0-dev";
+public static final String CORDOVA_VERSION = "8.0.0-dev";
 
 void init(CordovaInterface cordova, List pluginEntries, 
CordovaPreferences preferences);
 
diff --git a/package.json b/package.json
index 13893cd15..c0ddb6019 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "cordova-android",
-  "version": "7.2.0-dev",
+  "version": "8.0.0-dev",
   "description": "cordova-android release",
   "bin": {
 "create": "bi

[GitHub] janpio commented on issue #455: Start 8.0.0-dev in master - WIP

2018-06-21 Thread GitBox
janpio commented on issue #455: Start 8.0.0-dev in master - WIP
URL: https://github.com/apache/cordova-android/pull/455#issuecomment-399058927
 
 
   (Forgot actually closing? Did it for you @brodybits)


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] janpio commented on issue #456: More android tests

2018-06-21 Thread GitBox
janpio commented on issue #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#issuecomment-399058579
 
 
   Wheee, additional tests are always nice. Great work @Menardi !


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] raphinesse commented on issue #437: CB-14038 (android): fix false positive detecting project type

2018-06-21 Thread GitBox
raphinesse commented on issue #437: CB-14038 (android): fix false positive 
detecting project type
URL: https://github.com/apache/cordova-android/pull/437#issuecomment-399058403
 
 
   @jcesarmobile Is there any WIP for the aforementioned refactor? Losing some 
dead weight would definitely be good. Furthermore, before I discovered this PR 
by accident, I already thought about starting to DRY the two very similar 
Builders, not knowing that removal of one of them is due.
   
   BTW: GradleBuilder is used by the Java unit test runner. Just to create a 
Gradle wrapper, so the dependency could be easily removed.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] janpio commented on issue #277: VS Professional 2017 v15.7: MSBuild v4.0 is not supported, aborting.

2018-06-21 Thread GitBox
janpio commented on issue #277: VS Professional 2017 v15.7: MSBuild v4.0 is not 
supported, aborting.
URL: https://github.com/apache/cordova-windows/issues/277#issuecomment-399056266
 
 
   cordova-windows 5.x had problems with VS2017 in general, that's probably why 
that is not working.
   cordova-windows 6.x should work with VS17, but seems the newer MSBuild 
somehow trips it up.
   
   Maybe try setting the env vars mentioned here to try to fix this: 
https://cordova.apache.org/announcements/2018/02/27/cordova-windows-6.0.0.html


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] raphinesse commented on issue #451: CB-14145: update to cordova-common@2.2.4 to resolve npm audit & other issues in patch release

2018-06-21 Thread GitBox
raphinesse commented on issue #451: CB-14145: update to cordova-common@2.2.4 to 
resolve npm audit & other issues in patch release
URL: https://github.com/apache/cordova-android/pull/451#issuecomment-399056204
 
 
   I'd be happy to see these fixes in the upcoming release. I don't see why 
these changes should break anything. If things break, we'll fix them. I think 
you need to worry a bit less :blush: 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] raphinesse commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
raphinesse commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197070463
 
 

 ##
 File path: spec/unit/Adb.spec.js
 ##
 @@ -0,0 +1,222 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const rewire = require('rewire');
+
+describe('Adb', () => {
+const adbOutput = `List of devices attached
+emulator-5554\tdevice
+123a76565509e124\tdevice`;
+const [, emulatorLine, deviceLine] = adbOutput.split('\n');
+const emulatorId = emulatorLine.split('\t')[0];
+const deviceId = deviceLine.split('\t')[0];
+
+const alreadyExistsError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_ALREADY_EXISTS]';
+const certificateError = 'adb: failed to install app.apk: 
Failure[INSTALL_PARSE_FAILED_NO_CERTIFICATES]';
+const downgradeError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_VERSION_DOWNGRADE]';
+
+let Adb;
+let spawnSpy;
+
+beforeEach(() => {
+Adb = rewire('../../bin/templates/cordova/lib/Adb');
+spawnSpy = jasmine.createSpy('spawn');
+Adb.__set__('spawn', spawnSpy);
+});
+
+describe('isDevice', () => {
+it('should return true for a real device', () => {
+const isDevice = Adb.__get__('isDevice');
+
+expect(isDevice(deviceLine)).toBeTruthy();
+expect(isDevice(emulatorLine)).toBeFalsy();
+});
+});
+
+describe('isEmulator', () => {
+it('should return true for a real device', () => {
+const isEmulator = Adb.__get__('isEmulator');
+
+expect(isEmulator(emulatorLine)).toBeTruthy();
+expect(isEmulator(deviceLine)).toBeFalsy();
+});
+});
+
+describe('devices', () => {
+beforeEach(() => {
+spawnSpy.and.returnValue(Promise.resolve(adbOutput));
+});
+
+it('should return only devices if no options are specified', () => {
+return Adb.devices().then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(deviceId);
+});
+});
+
+it('should return only emulators if opts.emulators is true', () => {
+return Adb.devices({emulators: true}).then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(emulatorId);
+});
+});
+});
+
+describe('install', () => {
+it('should target the passed device id to adb', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId).then(() => {
+const args = spawnSpy.calls.argsFor(0);
+expect(args[0]).toBe('adb');
+
+const adbArgs = args[1].join(' ');
+expect(adbArgs).toMatch(`-s ${deviceId}`);
+});
+});
+
+it('should add the -r flag if opts.replace is set', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId, '', { replace: true }).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain('-r');
+});
+});
+
+it('should pass the correct package path to adb', () => {
+const packagePath = 'build/test/app.apk';
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId, packagePath).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain(packagePath);
+});
+});
+
+it('should reject with a CordovaError if the adb output suggests a 
failure', () => {
+spawnSpy.and.returnValue(Promise.resolve(alreadyExistsError));
+
+return Adb.install(deviceId, '')
+.then(() => fail('Unexpectedly resolved'))
+.catch(err => {
+expect(err instanceof 
Adb.__get__('CordovaError')).toBe(true);
+});
 
 Review comment:
   You are also catching rejections from the previous `then` this way. So if 
`fail` throws, you will `catch

[GitHub] raphinesse commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
raphinesse commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197064564
 
 

 ##
 File path: spec/unit/Adb.spec.js
 ##
 @@ -0,0 +1,222 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const rewire = require('rewire');
+
+describe('Adb', () => {
+const adbOutput = `List of devices attached
+emulator-5554\tdevice
+123a76565509e124\tdevice`;
+const [, emulatorLine, deviceLine] = adbOutput.split('\n');
+const emulatorId = emulatorLine.split('\t')[0];
+const deviceId = deviceLine.split('\t')[0];
+
+const alreadyExistsError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_ALREADY_EXISTS]';
+const certificateError = 'adb: failed to install app.apk: 
Failure[INSTALL_PARSE_FAILED_NO_CERTIFICATES]';
+const downgradeError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_VERSION_DOWNGRADE]';
+
+let Adb;
+let spawnSpy;
+
+beforeEach(() => {
+Adb = rewire('../../bin/templates/cordova/lib/Adb');
+spawnSpy = jasmine.createSpy('spawn');
+Adb.__set__('spawn', spawnSpy);
+});
+
+describe('isDevice', () => {
+it('should return true for a real device', () => {
+const isDevice = Adb.__get__('isDevice');
+
+expect(isDevice(deviceLine)).toBeTruthy();
+expect(isDevice(emulatorLine)).toBeFalsy();
+});
+});
+
+describe('isEmulator', () => {
+it('should return true for a real device', () => {
 
 Review comment:
   Emulator


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] raphinesse commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
raphinesse commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197078202
 
 

 ##
 File path: spec/unit/Adb.spec.js
 ##
 @@ -0,0 +1,222 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const rewire = require('rewire');
+
+describe('Adb', () => {
+const adbOutput = `List of devices attached
+emulator-5554\tdevice
+123a76565509e124\tdevice`;
+const [, emulatorLine, deviceLine] = adbOutput.split('\n');
+const emulatorId = emulatorLine.split('\t')[0];
+const deviceId = deviceLine.split('\t')[0];
+
+const alreadyExistsError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_ALREADY_EXISTS]';
+const certificateError = 'adb: failed to install app.apk: 
Failure[INSTALL_PARSE_FAILED_NO_CERTIFICATES]';
+const downgradeError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_VERSION_DOWNGRADE]';
+
+let Adb;
+let spawnSpy;
+
+beforeEach(() => {
+Adb = rewire('../../bin/templates/cordova/lib/Adb');
+spawnSpy = jasmine.createSpy('spawn');
+Adb.__set__('spawn', spawnSpy);
+});
+
+describe('isDevice', () => {
+it('should return true for a real device', () => {
+const isDevice = Adb.__get__('isDevice');
+
+expect(isDevice(deviceLine)).toBeTruthy();
+expect(isDevice(emulatorLine)).toBeFalsy();
+});
+});
+
+describe('isEmulator', () => {
+it('should return true for a real device', () => {
+const isEmulator = Adb.__get__('isEmulator');
+
+expect(isEmulator(emulatorLine)).toBeTruthy();
+expect(isEmulator(deviceLine)).toBeFalsy();
+});
+});
+
+describe('devices', () => {
+beforeEach(() => {
+spawnSpy.and.returnValue(Promise.resolve(adbOutput));
+});
+
+it('should return only devices if no options are specified', () => {
+return Adb.devices().then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(deviceId);
+});
+});
+
+it('should return only emulators if opts.emulators is true', () => {
+return Adb.devices({emulators: true}).then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(emulatorId);
+});
+});
+});
+
+describe('install', () => {
+it('should target the passed device id to adb', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId).then(() => {
+const args = spawnSpy.calls.argsFor(0);
+expect(args[0]).toBe('adb');
+
+const adbArgs = args[1].join(' ');
+expect(adbArgs).toMatch(`-s ${deviceId}`);
+});
+});
+
+it('should add the -r flag if opts.replace is set', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId, '', { replace: true }).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain('-r');
+});
+});
+
+it('should pass the correct package path to adb', () => {
+const packagePath = 'build/test/app.apk';
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId, packagePath).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain(packagePath);
+});
+});
+
+it('should reject with a CordovaError if the adb output suggests a 
failure', () => {
+spawnSpy.and.returnValue(Promise.resolve(alreadyExistsError));
+
+return Adb.install(deviceId, '')
+.then(() => fail('Unexpectedly resolved'))
+.catch(err => {
+expect(err instanceof 
Adb.__get__('CordovaError')).toBe(true);
+});
+});
+
+// The following two tests are somewhat brittle as they are dependent 
on the
+// exact message

[GitHub] raphinesse commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
raphinesse commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197074184
 
 

 ##
 File path: spec/unit/Adb.spec.js
 ##
 @@ -0,0 +1,222 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const rewire = require('rewire');
+
+describe('Adb', () => {
+const adbOutput = `List of devices attached
+emulator-5554\tdevice
+123a76565509e124\tdevice`;
+const [, emulatorLine, deviceLine] = adbOutput.split('\n');
+const emulatorId = emulatorLine.split('\t')[0];
+const deviceId = deviceLine.split('\t')[0];
+
+const alreadyExistsError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_ALREADY_EXISTS]';
+const certificateError = 'adb: failed to install app.apk: 
Failure[INSTALL_PARSE_FAILED_NO_CERTIFICATES]';
+const downgradeError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_VERSION_DOWNGRADE]';
+
+let Adb;
+let spawnSpy;
+
+beforeEach(() => {
+Adb = rewire('../../bin/templates/cordova/lib/Adb');
+spawnSpy = jasmine.createSpy('spawn');
+Adb.__set__('spawn', spawnSpy);
+});
+
+describe('isDevice', () => {
+it('should return true for a real device', () => {
+const isDevice = Adb.__get__('isDevice');
+
+expect(isDevice(deviceLine)).toBeTruthy();
+expect(isDevice(emulatorLine)).toBeFalsy();
+});
+});
+
+describe('isEmulator', () => {
+it('should return true for a real device', () => {
+const isEmulator = Adb.__get__('isEmulator');
+
+expect(isEmulator(emulatorLine)).toBeTruthy();
+expect(isEmulator(deviceLine)).toBeFalsy();
+});
+});
+
+describe('devices', () => {
+beforeEach(() => {
+spawnSpy.and.returnValue(Promise.resolve(adbOutput));
+});
+
+it('should return only devices if no options are specified', () => {
+return Adb.devices().then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(deviceId);
+});
+});
+
+it('should return only emulators if opts.emulators is true', () => {
+return Adb.devices({emulators: true}).then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(emulatorId);
+});
+});
+});
+
+describe('install', () => {
+it('should target the passed device id to adb', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId).then(() => {
+const args = spawnSpy.calls.argsFor(0);
+expect(args[0]).toBe('adb');
+
+const adbArgs = args[1].join(' ');
+expect(adbArgs).toMatch(`-s ${deviceId}`);
+});
+});
+
+it('should add the -r flag if opts.replace is set', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId, '', { replace: true }).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain('-r');
+});
+});
+
+it('should pass the correct package path to adb', () => {
+const packagePath = 'build/test/app.apk';
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId, packagePath).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain(packagePath);
+});
+});
+
+it('should reject with a CordovaError if the adb output suggests a 
failure', () => {
+spawnSpy.and.returnValue(Promise.resolve(alreadyExistsError));
+
+return Adb.install(deviceId, '')
+.then(() => fail('Unexpectedly resolved'))
+.catch(err => {
+expect(err instanceof 
Adb.__get__('CordovaError')).toBe(true);
+});
+});
+
+// The following two tests are somewhat brittle as they are dependent 
on the
+// exact message

[GitHub] raphinesse commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
raphinesse commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197075573
 
 

 ##
 File path: spec/unit/Adb.spec.js
 ##
 @@ -0,0 +1,222 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const rewire = require('rewire');
+
+describe('Adb', () => {
+const adbOutput = `List of devices attached
+emulator-5554\tdevice
+123a76565509e124\tdevice`;
+const [, emulatorLine, deviceLine] = adbOutput.split('\n');
+const emulatorId = emulatorLine.split('\t')[0];
+const deviceId = deviceLine.split('\t')[0];
+
+const alreadyExistsError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_ALREADY_EXISTS]';
+const certificateError = 'adb: failed to install app.apk: 
Failure[INSTALL_PARSE_FAILED_NO_CERTIFICATES]';
+const downgradeError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_VERSION_DOWNGRADE]';
+
+let Adb;
+let spawnSpy;
+
+beforeEach(() => {
+Adb = rewire('../../bin/templates/cordova/lib/Adb');
+spawnSpy = jasmine.createSpy('spawn');
+Adb.__set__('spawn', spawnSpy);
+});
+
+describe('isDevice', () => {
+it('should return true for a real device', () => {
+const isDevice = Adb.__get__('isDevice');
+
+expect(isDevice(deviceLine)).toBeTruthy();
+expect(isDevice(emulatorLine)).toBeFalsy();
+});
+});
+
+describe('isEmulator', () => {
+it('should return true for a real device', () => {
+const isEmulator = Adb.__get__('isEmulator');
+
+expect(isEmulator(emulatorLine)).toBeTruthy();
+expect(isEmulator(deviceLine)).toBeFalsy();
+});
+});
+
+describe('devices', () => {
+beforeEach(() => {
+spawnSpy.and.returnValue(Promise.resolve(adbOutput));
+});
+
+it('should return only devices if no options are specified', () => {
+return Adb.devices().then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(deviceId);
+});
+});
+
+it('should return only emulators if opts.emulators is true', () => {
+return Adb.devices({emulators: true}).then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(emulatorId);
+});
+});
+});
+
+describe('install', () => {
+it('should target the passed device id to adb', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId).then(() => {
+const args = spawnSpy.calls.argsFor(0);
+expect(args[0]).toBe('adb');
+
+const adbArgs = args[1].join(' ');
+expect(adbArgs).toMatch(`-s ${deviceId}`);
+});
+});
+
+it('should add the -r flag if opts.replace is set', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId, '', { replace: true }).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain('-r');
+});
+});
+
+it('should pass the correct package path to adb', () => {
+const packagePath = 'build/test/app.apk';
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId, packagePath).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain(packagePath);
+});
+});
+
+it('should reject with a CordovaError if the adb output suggests a 
failure', () => {
+spawnSpy.and.returnValue(Promise.resolve(alreadyExistsError));
+
+return Adb.install(deviceId, '')
+.then(() => fail('Unexpectedly resolved'))
+.catch(err => {
+expect(err instanceof 
Adb.__get__('CordovaError')).toBe(true);
+});
+});
+
+// The following two tests are somewhat brittle as they are dependent 
on the
+// exact message

[GitHub] raphinesse commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
raphinesse commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197067599
 
 

 ##
 File path: spec/unit/Adb.spec.js
 ##
 @@ -0,0 +1,222 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const rewire = require('rewire');
+
+describe('Adb', () => {
+const adbOutput = `List of devices attached
+emulator-5554\tdevice
+123a76565509e124\tdevice`;
+const [, emulatorLine, deviceLine] = adbOutput.split('\n');
+const emulatorId = emulatorLine.split('\t')[0];
+const deviceId = deviceLine.split('\t')[0];
+
+const alreadyExistsError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_ALREADY_EXISTS]';
+const certificateError = 'adb: failed to install app.apk: 
Failure[INSTALL_PARSE_FAILED_NO_CERTIFICATES]';
+const downgradeError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_VERSION_DOWNGRADE]';
+
+let Adb;
+let spawnSpy;
+
+beforeEach(() => {
+Adb = rewire('../../bin/templates/cordova/lib/Adb');
+spawnSpy = jasmine.createSpy('spawn');
+Adb.__set__('spawn', spawnSpy);
+});
+
+describe('isDevice', () => {
+it('should return true for a real device', () => {
+const isDevice = Adb.__get__('isDevice');
+
+expect(isDevice(deviceLine)).toBeTruthy();
+expect(isDevice(emulatorLine)).toBeFalsy();
+});
+});
+
+describe('isEmulator', () => {
+it('should return true for a real device', () => {
+const isEmulator = Adb.__get__('isEmulator');
+
+expect(isEmulator(emulatorLine)).toBeTruthy();
+expect(isEmulator(deviceLine)).toBeFalsy();
+});
+});
+
+describe('devices', () => {
+beforeEach(() => {
+spawnSpy.and.returnValue(Promise.resolve(adbOutput));
+});
+
+it('should return only devices if no options are specified', () => {
+return Adb.devices().then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(deviceId);
+});
+});
+
+it('should return only emulators if opts.emulators is true', () => {
+return Adb.devices({emulators: true}).then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(emulatorId);
+});
+});
+});
+
+describe('install', () => {
+it('should target the passed device id to adb', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId).then(() => {
+const args = spawnSpy.calls.argsFor(0);
+expect(args[0]).toBe('adb');
+
+const adbArgs = args[1].join(' ');
+expect(adbArgs).toMatch(`-s ${deviceId}`);
+});
+});
+
+it('should add the -r flag if opts.replace is set', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
 
 Review comment:
   Since that is the most common case, you could set this in your top 
beforeEach as a default


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] raphinesse commented on a change in pull request #456: More android tests

2018-06-21 Thread GitBox
raphinesse commented on a change in pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#discussion_r197072184
 
 

 ##
 File path: spec/unit/Adb.spec.js
 ##
 @@ -0,0 +1,222 @@
+/**
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+const rewire = require('rewire');
+
+describe('Adb', () => {
+const adbOutput = `List of devices attached
+emulator-5554\tdevice
+123a76565509e124\tdevice`;
+const [, emulatorLine, deviceLine] = adbOutput.split('\n');
+const emulatorId = emulatorLine.split('\t')[0];
+const deviceId = deviceLine.split('\t')[0];
+
+const alreadyExistsError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_ALREADY_EXISTS]';
+const certificateError = 'adb: failed to install app.apk: 
Failure[INSTALL_PARSE_FAILED_NO_CERTIFICATES]';
+const downgradeError = 'adb: failed to install app.apk: 
Failure[INSTALL_FAILED_VERSION_DOWNGRADE]';
+
+let Adb;
+let spawnSpy;
+
+beforeEach(() => {
+Adb = rewire('../../bin/templates/cordova/lib/Adb');
+spawnSpy = jasmine.createSpy('spawn');
+Adb.__set__('spawn', spawnSpy);
+});
+
+describe('isDevice', () => {
+it('should return true for a real device', () => {
+const isDevice = Adb.__get__('isDevice');
+
+expect(isDevice(deviceLine)).toBeTruthy();
+expect(isDevice(emulatorLine)).toBeFalsy();
+});
+});
+
+describe('isEmulator', () => {
+it('should return true for a real device', () => {
+const isEmulator = Adb.__get__('isEmulator');
+
+expect(isEmulator(emulatorLine)).toBeTruthy();
+expect(isEmulator(deviceLine)).toBeFalsy();
+});
+});
+
+describe('devices', () => {
+beforeEach(() => {
+spawnSpy.and.returnValue(Promise.resolve(adbOutput));
+});
+
+it('should return only devices if no options are specified', () => {
+return Adb.devices().then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(deviceId);
+});
+});
+
+it('should return only emulators if opts.emulators is true', () => {
+return Adb.devices({emulators: true}).then(devices => {
+expect(devices.length).toBe(1);
+expect(devices[0]).toBe(emulatorId);
+});
+});
+});
+
+describe('install', () => {
+it('should target the passed device id to adb', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId).then(() => {
+const args = spawnSpy.calls.argsFor(0);
+expect(args[0]).toBe('adb');
+
+const adbArgs = args[1].join(' ');
+expect(adbArgs).toMatch(`-s ${deviceId}`);
+});
+});
+
+it('should add the -r flag if opts.replace is set', () => {
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId, '', { replace: true }).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain('-r');
+});
+});
+
+it('should pass the correct package path to adb', () => {
+const packagePath = 'build/test/app.apk';
+spawnSpy.and.returnValue(Promise.resolve(''));
+
+return Adb.install(deviceId, packagePath).then(() => {
+const adbArgs = spawnSpy.calls.argsFor(0)[1];
+expect(adbArgs).toContain(packagePath);
+});
+});
+
+it('should reject with a CordovaError if the adb output suggests a 
failure', () => {
+spawnSpy.and.returnValue(Promise.resolve(alreadyExistsError));
+
+return Adb.install(deviceId, '')
+.then(() => fail('Unexpectedly resolved'))
+.catch(err => {
+expect(err instanceof 
Adb.__get__('CordovaError')).toBe(true);
+});
+});
+
+// The following two tests are somewhat brittle as they are dependent 
on the
+// exact message

[GitHub] liuxh0 opened a new issue #277: VS Professional 2017 v15.7: MSBuild v4.0 is not supported, aborting.

2018-06-21 Thread GitBox
liuxh0 opened a new issue #277: VS Professional 2017 v15.7: MSBuild v4.0 is not 
supported, aborting.
URL: https://github.com/apache/cordova-windows/issues/277
 
 
   Hello everyone,
   
   Installed cordova-windows@5.x + VS 2017 v15.5: MSBuild v4.0 is not 
supported, aborting.
   Updated to cordova-windows@6.0.0: Working fine.
   Updated VS2017 to v15.7: the same error again (MSBuild v4.0 is not 
supported, aborting).
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] codecov-io commented on issue #456: More android tests

2018-06-21 Thread GitBox
codecov-io commented on issue #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456#issuecomment-399022994
 
 
   # 
[Codecov](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=h1) 
Report
   > Merging 
[#456](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=desc) 
into 
[master](https://codecov.io/gh/apache/cordova-android/commit/559b0833b42402a2b0fba6d6369fbc713e1063c1?src=pr&el=desc)
 will **increase** coverage by `4.42%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/cordova-android/pull/456/graphs/tree.svg?width=650&height=150&token=q14nMf6C5a&src=pr)](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master #456  +/-   ##
   ==
   + Coverage   47.63%   52.06%   +4.42% 
   ==
 Files  17   17  
 Lines1694 1694  
 Branches  311  311  
   ==
   + Hits  807  882  +75 
   + Misses887  812  -75
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=tree) | 
Coverage Δ | |
   |---|---|---|
   | 
[bin/templates/cordova/lib/AndroidManifest.js](https://codecov.io/gh/apache/cordova-android/pull/456/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9jb3Jkb3ZhL2xpYi9BbmRyb2lkTWFuaWZlc3QuanM=)
 | `100% <0%> (+64.86%)` | :arrow_up: |
   | 
[bin/templates/cordova/lib/Adb.js](https://codecov.io/gh/apache/cordova-android/pull/456/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9jb3Jkb3ZhL2xpYi9BZGIuanM=)
 | `100% <0%> (+65.85%)` | :arrow_up: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=footer).
 Last update 
[559b083...75be0bb](https://codecov.io/gh/apache/cordova-android/pull/456?src=pr&el=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] codecov-io edited a comment on issue #448: CB-13685 android: Adaptive Icon Support

2018-06-21 Thread GitBox
codecov-io edited a comment on issue #448: CB-13685 android: Adaptive Icon 
Support
URL: https://github.com/apache/cordova-android/pull/448#issuecomment-397924030
 
 
   # 
[Codecov](https://codecov.io/gh/apache/cordova-android/pull/448?src=pr&el=h1) 
Report
   > Merging 
[#448](https://codecov.io/gh/apache/cordova-android/pull/448?src=pr&el=desc) 
into 
[master](https://codecov.io/gh/apache/cordova-android/commit/559b0833b42402a2b0fba6d6369fbc713e1063c1?src=pr&el=desc)
 will **decrease** coverage by `3.79%`.
   > The diff coverage is `66.92%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/cordova-android/pull/448/graphs/tree.svg?src=pr&width=650&height=150&token=q14nMf6C5a)](https://codecov.io/gh/apache/cordova-android/pull/448?src=pr&el=tree)
   
   ```diff
   @@Coverage Diff@@
   ##   master #448 +/-   ##
   =
   - Coverage   47.63%   43.84%   -3.8% 
   =
 Files  17   18  +1 
 Lines1694 2023+329 
 Branches  311  383 +72 
   =
   + Hits  807  887 +80 
   - Misses887 1136+249
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/cordova-android/pull/448?src=pr&el=tree) | 
Coverage Δ | |
   |---|---|---|
   | 
[bin/templates/cordova/lib/AndroidManifest.js](https://codecov.io/gh/apache/cordova-android/pull/448/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9jb3Jkb3ZhL2xpYi9BbmRyb2lkTWFuaWZlc3QuanM=)
 | `35.44% <40%> (+0.3%)` | :arrow_up: |
   | 
[bin/templates/cordova/lib/prepare.js](https://codecov.io/gh/apache/cordova-android/pull/448/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9jb3Jkb3ZhL2xpYi9wcmVwYXJlLmpz)
 | `41.66% <68%> (ø)` | |
   | 
[bin/templates/cordova/lib/retry.js](https://codecov.io/gh/apache/cordova-android/pull/448/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9jb3Jkb3ZhL2xpYi9yZXRyeS5qcw==)
 | `15.38% <0%> (-84.62%)` | :arrow_down: |
   | 
[bin/templates/cordova/lib/run.js](https://codecov.io/gh/apache/cordova-android/pull/448/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9jb3Jkb3ZhL2xpYi9ydW4uanM=)
 | `26.98% <0%> (-73.02%)` | :arrow_down: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/cordova-android/pull/448?src=pr&el=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/cordova-android/pull/448?src=pr&el=footer).
 Last update 
[559b083...22bb844](https://codecov.io/gh/apache/cordova-android/pull/448?src=pr&el=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] codecov-io edited a comment on issue #448: CB-13685 android: Adaptive Icon Support

2018-06-21 Thread GitBox
codecov-io edited a comment on issue #448: CB-13685 android: Adaptive Icon 
Support
URL: https://github.com/apache/cordova-android/pull/448#issuecomment-397924030
 
 
   # 
[Codecov](https://codecov.io/gh/apache/cordova-android/pull/448?src=pr&el=h1) 
Report
   > Merging 
[#448](https://codecov.io/gh/apache/cordova-android/pull/448?src=pr&el=desc) 
into 
[master](https://codecov.io/gh/apache/cordova-android/commit/559b0833b42402a2b0fba6d6369fbc713e1063c1?src=pr&el=desc)
 will **decrease** coverage by `3.79%`.
   > The diff coverage is `66.92%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/cordova-android/pull/448/graphs/tree.svg?height=150&src=pr&width=650&token=q14nMf6C5a)](https://codecov.io/gh/apache/cordova-android/pull/448?src=pr&el=tree)
   
   ```diff
   @@Coverage Diff@@
   ##   master #448 +/-   ##
   =
   - Coverage   47.63%   43.84%   -3.8% 
   =
 Files  17   18  +1 
 Lines1694 2023+329 
 Branches  311  383 +72 
   =
   + Hits  807  887 +80 
   - Misses887 1136+249
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/cordova-android/pull/448?src=pr&el=tree) | 
Coverage Δ | |
   |---|---|---|
   | 
[bin/templates/cordova/lib/AndroidManifest.js](https://codecov.io/gh/apache/cordova-android/pull/448/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9jb3Jkb3ZhL2xpYi9BbmRyb2lkTWFuaWZlc3QuanM=)
 | `35.44% <40%> (+0.3%)` | :arrow_up: |
   | 
[bin/templates/cordova/lib/prepare.js](https://codecov.io/gh/apache/cordova-android/pull/448/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9jb3Jkb3ZhL2xpYi9wcmVwYXJlLmpz)
 | `41.66% <68%> (ø)` | |
   | 
[bin/templates/cordova/lib/retry.js](https://codecov.io/gh/apache/cordova-android/pull/448/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9jb3Jkb3ZhL2xpYi9yZXRyeS5qcw==)
 | `15.38% <0%> (-84.62%)` | :arrow_down: |
   | 
[bin/templates/cordova/lib/run.js](https://codecov.io/gh/apache/cordova-android/pull/448/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9jb3Jkb3ZhL2xpYi9ydW4uanM=)
 | `26.98% <0%> (-73.02%)` | :arrow_down: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/cordova-android/pull/448?src=pr&el=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/cordova-android/pull/448?src=pr&el=footer).
 Last update 
[559b083...22bb844](https://codecov.io/gh/apache/cordova-android/pull/448?src=pr&el=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] Menardi opened a new pull request #456: More android tests

2018-06-21 Thread GitBox
Menardi opened a new pull request #456: More android tests
URL: https://github.com/apache/cordova-android/pull/456
 
 
   
   
   ### Platforms affected
   Android
   
   ### What does this PR do?
   Adds more unit tests for Android.
   
   Since my last PR adding tests went well, I decided to add some more. I have 
basically gone alphabetically and added tests to give full coverage for 
`Adb.js` and `AndroidManifest.js`. I may have time later in the next few days 
to add more tests, but I didn't want to make a huge PR which would take a long 
time to review.
   
   I also made a small change to the tests for `Api.js`. These tests previously 
logged `Android Studio project detected`, polluting the test reporter's output. 
They now no longer do this.
   
   I know the contribution guidelines say to squash PRs into one commit, but in 
this case, I believe the separate commits make sense. I suppose this could be 
two (or three) separate PRs. If I should do that next time, please let me know.
   
   ### What testing has been done on this change?
   Run `npm run unit-tests` locally
   
   ### Checklist
   - [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) 
in the JIRA database
   - [ ] Commit message follows the format: "CB-3232: (android) Fix bug with 
resolving file paths", where CB- is the JIRA ID & "android" is the platform 
affected.
   - [x] Added automated test coverage as appropriate for this change.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org