From e4ff41c07c8cf817d17bce6fcbe60fd507428bc0 Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Tue, 28 Feb 2017 17:41:23 -0800 Subject: [PATCH 01/11] CB-12519 Updated version and RELEASENOTES.md for release 2.4.0 --- RELEASENOTES.md | 12 ++ package.json | 2 +- plugin.xml | 477 +++++++++++++++++++---------------------------- tests/plugin.xml | 38 +--- 4 files changed, 215 insertions(+), 314 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 9aa85ed..81eec43 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -20,6 +20,18 @@ --> # Release Notes +### 2.3.2 (Feb 28, 2017) +* [CB-12501](https://issues.apache.org/jira/browse/CB-12501) **Android**: Appium tests don't use `XPath` selectors anymore +* [CB-12469](https://issues.apache.org/jira/browse/CB-12469) Appium tests can now run on **iOS 10** +* [CB-12005](https://issues.apache.org/jira/browse/CB-12005) Changing the `getOrientation` method to return the defined enumerated `EXIF` instead of orientation in degrees for Consistency +* [CB-12368](https://issues.apache.org/jira/browse/CB-12368) Fix permission check on **Android** +* [CB-12353](https://issues.apache.org/jira/browse/CB-12353) Corrected merges usage in `plugin.xml` +* [CB-12369](https://issues.apache.org/jira/browse/CB-12369) Add plugin typings from `DefinitelyTyped` +* [CB-12363](https://issues.apache.org/jira/browse/CB-12363) Added build badges for **iOS 9.3** and **iOS 10.0** +* [CB-12312](https://issues.apache.org/jira/browse/CB-12312) [Appium] [Android] A few changes to the tests: - updated comments on how to run the tests. extra comments around functionality at certain points in the automation. - stub of a resolution checker on test startup - still need to figure out acceptable values. - moved session shutdown to an afterAll clause. - changed resolution determiner from using webview-based values to using the native windows dimensions - this helps as the webview values may be scaled down intentionally by manufacturers (via changing devicePixelRatio). furthermore, since the screen dimension automation is used purely for native UI automation, better to use the dimensions reported by the native context rather than the web context. - when finding elements by XPath, use multiple calls to avoid a Windows emulator + Android bug. Made this pattern consistent in the entire test. +* [CB-12236](https://issues.apache.org/jira/browse/CB-12236) - Fixed RELEASENOTES for cordova-plugin-camera +* [CB-12230](https://issues.apache.org/jira/browse/CB-12230) Removed Windows 8.1 build badges + ### 2.3.1 (Dec 07, 2016) * [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 2.3.1 * Fix missing license headers. diff --git a/package.json b/package.json index 8109011..4bac73c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-camera", - "version": "2.3.2-dev", + "version": "2.4.0", "description": "Cordova Camera Plugin", "types": "./types/index.d.ts", "cordova": { diff --git a/plugin.xml b/plugin.xml index 98ed6a6..f1684d9 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,285 +1,200 @@ - - - - - Camera - Cordova Camera Plugin - Apache 2.0 - cordova,camera - https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git - https://issues.apache.org/jira/browse/CB/component/12320645 - - - - - + + + Camera + Cordova Camera Plugin + Apache 2.0 + cordova,camera + https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git + https://issues.apache.org/jira/browse/CB/component/12320645 + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $CAMERA_USAGE_DESCRIPTION - - - - - $PHOTOLIBRARY_USAGE_DESCRIPTION - - - - - - - - - - - - - - - - access_shared - use_camera - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + $CAMERA_USAGE_DESCRIPTION + + + $PHOTOLIBRARY_USAGE_DESCRIPTION + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + access_shared + use_camera + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugin.xml b/tests/plugin.xml index eca9722..286f4e6 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -1,33 +1,7 @@ - - - - - Cordova Camera Plugin Tests - Apache 2.0 - - - - - + + + Cordova Camera Plugin Tests + Apache 2.0 + + From 926fbf0e8ccce6f70c34520e507dc9c08dd15f6f Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Tue, 28 Feb 2017 17:55:56 -0800 Subject: [PATCH 02/11] Set VERSION to 2.4.1-dev (via coho) --- package.json | 2 +- plugin.xml | 477 ++++++++++++++++++++++++++++------------------- tests/plugin.xml | 38 +++- 3 files changed, 314 insertions(+), 203 deletions(-) diff --git a/package.json b/package.json index 4bac73c..c1fdea7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-camera", - "version": "2.4.0", + "version": "2.4.1-dev", "description": "Cordova Camera Plugin", "types": "./types/index.d.ts", "cordova": { diff --git a/plugin.xml b/plugin.xml index f1684d9..d363e3a 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,200 +1,285 @@ - - - Camera - Cordova Camera Plugin - Apache 2.0 - cordova,camera - https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git - https://issues.apache.org/jira/browse/CB/component/12320645 - - - - - - - - - - - - - - - - - - + + + + + Camera + Cordova Camera Plugin + Apache 2.0 + cordova,camera + https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git + https://issues.apache.org/jira/browse/CB/component/12320645 + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - $CAMERA_USAGE_DESCRIPTION - - - $PHOTOLIBRARY_USAGE_DESCRIPTION - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - access_shared - use_camera - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $CAMERA_USAGE_DESCRIPTION + + + + + $PHOTOLIBRARY_USAGE_DESCRIPTION + + + + + + + + + + + + + + + + access_shared + use_camera + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugin.xml b/tests/plugin.xml index 286f4e6..f7e902a 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -1,7 +1,33 @@ - - - Cordova Camera Plugin Tests - Apache 2.0 - - + + + + + Cordova Camera Plugin Tests + Apache 2.0 + + + + + From d0b381aad86ac94042b4cb33fde1b9e9e813e8e1 Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Thu, 2 Mar 2017 16:06:15 -0800 Subject: [PATCH 03/11] CB-12519 updated incorrect version in RELEASENOTES --- RELEASENOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 81eec43..001470e 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -20,7 +20,7 @@ --> # Release Notes -### 2.3.2 (Feb 28, 2017) +### 2.4.0 (Feb 28, 2017) * [CB-12501](https://issues.apache.org/jira/browse/CB-12501) **Android**: Appium tests don't use `XPath` selectors anymore * [CB-12469](https://issues.apache.org/jira/browse/CB-12469) Appium tests can now run on **iOS 10** * [CB-12005](https://issues.apache.org/jira/browse/CB-12005) Changing the `getOrientation` method to return the defined enumerated `EXIF` instead of orientation in degrees for Consistency From 180f7b5510a7055e11ae7c13c7ea54c4d95f7ebb Mon Sep 17 00:00:00 2001 From: Alexander Sorokin Date: Thu, 30 Mar 2017 17:52:15 +0300 Subject: [PATCH 04/11] CB-12618: (android) Appium tests: Handle native cling --- appium-tests/android/android.spec.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/appium-tests/android/android.spec.js b/appium-tests/android/android.spec.js index 6b259c3..34e65b5 100644 --- a/appium-tests/android/android.spec.js +++ b/appium-tests/android/android.spec.js @@ -610,6 +610,15 @@ describe('Camera tests Android.', function () { .deviceKeyEvent(BACK_BUTTON) .elementById('Apps') .click() + .then(function () { + return driver + .elementByXPath('//android.widget.Button[@text="OK"]') + .click() + .fail(function () { + // no cling is all right + // it is not a brand new emulator, then + }); + }) .elementByAndroidUIAutomator('new UiSelector().text("Gallery")') .click() .elementByAndroidUIAutomator('new UiSelector().textContains("Pictures")') From 9badea4c9509d8d40f17530fb84ea49f223fc925 Mon Sep 17 00:00:00 2001 From: Alexander Sorokin Date: Thu, 20 Apr 2017 09:01:54 +0300 Subject: [PATCH 05/11] CB-12622: (android) Appium tests: Bust Android 6 and 7 permission dialogs --- appium-tests/android/android.spec.js | 37 +++++++++++++++++++++++++++- appium-tests/helpers/cameraHelper.js | 3 +++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/appium-tests/android/android.spec.js b/appium-tests/android/android.spec.js index 34e65b5..69f7e35 100644 --- a/appium-tests/android/android.spec.js +++ b/appium-tests/android/android.spec.js @@ -225,6 +225,40 @@ describe('Camera tests Android.', function () { }) .waitForDeviceReady() .injectLibraries() + .then(function () { + var options = { + quality: 50, + allowEdit: false, + sourceType: cameraConstants.PictureSourceType.SAVEDPHOTOALBUM, + saveToPhotoAlbum: false, + targetWidth: 210, + targetHeight: 210 + }; + return driver + .then(function () { return getPicture(options, true); }) + .context(CONTEXT_NATIVE_APP) + // case insensitive select, will be handy with Android 7 support + .elementByXPath('//android.widget.Button[translate(@text, "alow", "ALOW")="ALLOW"]') + .click() + .fail(function noAlert() { }) + .deviceKeyEvent(BACK_BUTTON) + .sleep(2000) + .elementById('action_bar_title') + .then(function () { + // success means we're still in native app + return driver + .deviceKeyEvent(BACK_BUTTON); + }, function () { + // error means we're already in webview + return driver; + }); + }) + .then(function () { + // doing it inside a function because otherwise + // it would not hook up to the webviewContext var change + // in the first methods of this chain + return driver.context(webviewContext); + }) .deleteFillerImage(fillerImagePath) .then(function () { fillerImagePath = null; @@ -291,6 +325,7 @@ describe('Camera tests Android.', function () { pending('This test requires a functioning camera on the Android device/emulator, and this test suite\'s functional camera test failed on your target environment.'); } } + afterAll(function (done) { checkSession(done); driver @@ -390,7 +425,7 @@ describe('Camera tests Android.', function () { return driver .elementByAndroidUIAutomator('new UiSelector().text("Choose video")') .fail(function () { - throw 'Couldn\'t find "Choose video" element.'; + throw 'Couldn\'t find a "Choose video" element.'; }); }) .deviceKeyEvent(BACK_BUTTON) diff --git a/appium-tests/helpers/cameraHelper.js b/appium-tests/helpers/cameraHelper.js index a16916f..caf0f9e 100644 --- a/appium-tests/helpers/cameraHelper.js +++ b/appium-tests/helpers/cameraHelper.js @@ -169,6 +169,7 @@ module.exports.checkPicture = function (pid, options, cb) { return; } } + try { if (result.indexOf('file:') === 0 || result.indexOf('content:') === 0 || @@ -184,6 +185,8 @@ module.exports.checkPicture = function (pid, options, cb) { } else { verifyFile(entry); } + }, function (err) { + errorCallback(err); }); } else { displayImage(result); From 2286bb3bb2d32dcff0c98099eabd78ea3bf0137a Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Fri, 21 Apr 2017 18:15:33 -0700 Subject: [PATCH 06/11] CB-12685: added package.json to tests folder --- tests/package.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/package.json diff --git a/tests/package.json b/tests/package.json new file mode 100644 index 0000000..646e22c --- /dev/null +++ b/tests/package.json @@ -0,0 +1,14 @@ +{ + "name": "cordova-plugin-camera-tests", + "version": "2.4.1-dev", + "description": "", + "cordova": { + "id": "cordova-plugin-camera-tests", + "platforms": [] + }, + "keywords": [ + "ecosystem:cordova" + ], + "author": "", + "license": "Apache 2.0" +} From 3c48ea9c9c452c6fa0326f666622656ebfa4d161 Mon Sep 17 00:00:00 2001 From: filmaj Date: Mon, 24 Apr 2017 16:30:53 -0700 Subject: [PATCH 07/11] Close #258 From eb98015e8a73c7bc866e77c421db7b81b11a1fcf Mon Sep 17 00:00:00 2001 From: filmaj Date: Mon, 24 Apr 2017 16:40:08 -0700 Subject: [PATCH 08/11] Close #256 From a33c35152e806811350a1e1aff35a6e5e0a27249 Mon Sep 17 00:00:00 2001 From: Nikita Matrosov Date: Wed, 12 Apr 2017 16:54:39 +0300 Subject: [PATCH 09/11] CB-12650: Fix manual test for uploading image --- tests/plugin.xml | 2 +- tests/tests.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/plugin.xml b/tests/plugin.xml index f7e902a..7b39371 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -26,7 +26,7 @@ Cordova Camera Plugin Tests Apache 2.0 - + diff --git a/tests/tests.js b/tests/tests.js index 222a839..0c85188 100644 --- a/tests/tests.js +++ b/tests/tests.js @@ -177,7 +177,7 @@ exports.defineManualTests = function (contentEl, createActionButton) { ft.onprogress = function (progressEvent) { console.log('progress: ' + progressEvent.loaded + ' of ' + progressEvent.total); }; - var server = "http://cordova-filetransfer.jitsu.com"; + var server = "http://sheltered-retreat-43956.herokuapp.com"; ft.upload(pictureUrl, server + '/upload', win, fail, options); function win(information_back) { From 9615620843e57bd78339d66c57ec8fce51a7fb93 Mon Sep 17 00:00:00 2001 From: Alexander Sorokin Date: Wed, 26 Apr 2017 14:29:16 +0300 Subject: [PATCH 10/11] CB-12622: Updated build badges in README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f2b4562..436eefd 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,9 @@ description: Take pictures with the device camera. # under the License. --> -|Android|iOS| Windows 8.1 Store | Windows 8.1 Phone | Windows 10 Store | Travis CI | -|:-:|:-:|:-:|:-:|:-:|:-:| -|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android,PLUGIN=cordova-plugin-camera)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android,PLUGIN=cordova-plugin-camera/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-camera)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-camera/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-8.1-store,PLUGIN=cordova-plugin-camera)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-8.1-store,PLUGIN=cordova-plugin-camera/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-8.1-phone,PLUGIN=cordova-plugin-camera)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-8.1-phone,PLUGIN=cordova-plugin-camera/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-camera)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-camera/)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-camera.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-camera) +|Android 4.4|Android 5.1|Android 6.0|iOS 9.3|iOS 10.0|Windows 10 Store|Travis CI| +|:-:|:-:|:-:|:-:|:-:|:-:|:-:| +|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-camera)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-camera/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-camera)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-camera/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-6.0,PLUGIN=cordova-plugin-camera)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-6.0,PLUGIN=cordova-plugin-camera/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-camera)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-camera/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-camera)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-camera/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-camera)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-camera/)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-camera.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-camera) # cordova-plugin-camera From ba9a803b69fa08121177485f29dda8652117dc2c Mon Sep 17 00:00:00 2001 From: filmaj Date: Thu, 27 Apr 2017 10:26:08 -0700 Subject: [PATCH 11/11] CB-12736 Updated version and RELEASENOTES.md for release 2.4.1 --- RELEASENOTES.md | 7 +++++++ package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 001470e..cbb782c 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -20,6 +20,13 @@ --> # Release Notes +### 2.4.1 (Apr 27, 2017) +* [CB-12622](https://issues.apache.org/jira/browse/CB-12622) Updated build badges in `README` +* [CB-12650](https://issues.apache.org/jira/browse/CB-12650) Fix manual test for uploading image +* [CB-12685](https://issues.apache.org/jira/browse/CB-12685) added `package.json` to tests folder +* [CB-12622](https://issues.apache.org/jira/browse/CB-12622) (android) Appium tests: Bust **Android** 6 and 7 permission dialogs +* [CB-12618](https://issues.apache.org/jira/browse/CB-12618) (android) Appium tests: Handle native cling + ### 2.4.0 (Feb 28, 2017) * [CB-12501](https://issues.apache.org/jira/browse/CB-12501) **Android**: Appium tests don't use `XPath` selectors anymore * [CB-12469](https://issues.apache.org/jira/browse/CB-12469) Appium tests can now run on **iOS 10** diff --git a/package.json b/package.json index c1fdea7..18e18ed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-camera", - "version": "2.4.1-dev", + "version": "2.4.1", "description": "Cordova Camera Plugin", "types": "./types/index.d.ts", "cordova": { diff --git a/plugin.xml b/plugin.xml index d363e3a..b931110 100644 --- a/plugin.xml +++ b/plugin.xml @@ -22,7 +22,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:rim="http://www.blackberry.com/ns/widgets" id="cordova-plugin-camera" - version="2.4.1-dev"> + version="2.4.1"> Camera Cordova Camera Plugin Apache 2.0 diff --git a/tests/plugin.xml b/tests/plugin.xml index 7b39371..073ef28 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -22,7 +22,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:rim="http://www.blackberry.com/ns/widgets" id="cordova-plugin-camera-tests" - version="2.4.1-dev"> + version="2.4.1"> Cordova Camera Plugin Tests Apache 2.0