[jira] [Commented] (CB-11183) Appium tests, Camera plugin: Better validation of the image

2016-05-18 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15288640#comment-15288640
 ] 

ASF subversion and git services commented on CB-11183:
--

Commit 278b5277027ba62d621cbc2dea10079abb2ef0c9 in cordova-plugin-camera's 
branch refs/heads/master from [~alsorokin]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-camera.git;h=278b527 
]

CB-11183 Appium tests: Added image verification


> Appium tests, Camera plugin: Better validation of the image
> ---
>
> Key: CB-11183
> URL: https://issues.apache.org/jira/browse/CB-11183
> Project: Apache Cordova
>  Issue Type: Test
>  Components: Appium, Plugin Camera
>Reporter: Alexander Sorokin
>Assignee: Alexander Sorokin
>
> Right now Appium tests only check that we get the picture and the app doesn't 
> crash doing it.
> Better validation needs to be performed. For example, we need to check if the 
> image has the right height and width.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (CB-11183) Appium tests, Camera plugin: Better validation of the image

2016-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15288642#comment-15288642
 ] 

ASF GitHub Bot commented on CB-11183:
-

Github user alsorokin closed the pull request at:

https://github.com/apache/cordova-plugin-camera/pull/209


> Appium tests, Camera plugin: Better validation of the image
> ---
>
> Key: CB-11183
> URL: https://issues.apache.org/jira/browse/CB-11183
> Project: Apache Cordova
>  Issue Type: Test
>  Components: Appium, Plugin Camera
>Reporter: Alexander Sorokin
>Assignee: Alexander Sorokin
>
> Right now Appium tests only check that we get the picture and the app doesn't 
> crash doing it.
> Better validation needs to be performed. For example, we need to check if the 
> image has the right height and width.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (CB-11183) Appium tests, Camera plugin: Better validation of the image

2016-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15288638#comment-15288638
 ] 

ASF GitHub Bot commented on CB-11183:
-

Github user cordova-qa commented on the pull request:


https://github.com/apache/cordova-plugin-camera/pull/209#issuecomment-219966472
  
Cordova CI Build has completed successfully. 

**Commit** - 
[Link](https://github.com/apache/cordova-plugin-camera/pull/209/commits/278b5277027ba62d621cbc2dea10079abb2ef0c9)
**Dashboard** - 
[Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-camera-pr/12/)

| Builder Name  | Console Output | Test Report | Device Logs  |
| :---: | :---:  |   :---: | :---:|
| [Windows 8.1 Store]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-camera-pr/12//label=windows-slave,platformName=windows-8.1-store/)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-camera-pr/12//label=windows-slave,platformName=windows-8.1-store/console)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-camera-pr/12//label=windows-slave,platformName=windows-8.1-store/testReport/)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-camera-pr/12//label=windows-slave,platformName=windows-8.1-store/artifact/)
 |
| [Windows 10  Store]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-camera-pr/12//label=windows-slave,platformName=windows-10-store/)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-camera-pr/12//label=windows-slave,platformName=windows-10-store/console)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-camera-pr/12//label=windows-slave,platformName=windows-10-store/testReport/)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-camera-pr/12//label=windows-slave,platformName=windows-10-store/artifact/)
 |
| [Windows 8.1 Phone]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-camera-pr/12//label=windows-slave,platformName=windows-8.1-phone/)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-camera-pr/12//label=windows-slave,platformName=windows-8.1-phone/console)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-camera-pr/12//label=windows-slave,platformName=windows-8.1-phone/testReport/)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-camera-pr/12//label=windows-slave,platformName=windows-8.1-phone/artifact/)
 |
| [iOS]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-camera-pr/12//label=mac-slave,platformName=ios/)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-camera-pr/12//label=mac-slave,platformName=ios/console)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-camera-pr/12//label=mac-slave,platformName=ios/testReport/)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-camera-pr/12//label=mac-slave,platformName=ios/artifact/)
 |
| [Android Mac]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-camera-pr/12//label=mac-slave,platformName=android/)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-camera-pr/12//label=mac-slave,platformName=android/console)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-camera-pr/12//label=mac-slave,platformName=android/testReport/)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-camera-pr/12//label=mac-slave,platformName=android/artifact/)
 |
 



> Appium tests, Camera plugin: Better validation of the image
> ---
>
> Key: CB-11183
> URL: https://issues.apache.org/jira/browse/CB-11183
> Project: Apache Cordova
>  Issue Type: Test
>  Components: Appium, Plugin Camera
>Reporter: Alexander Sorokin
>Assignee: Alexander Sorokin
>
> Right now Appium tests only check that we get the picture and the app doesn't 
> crash doing it.
> Better validation needs to be performed. For example, we need to check if the 
> image has the right height and width.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (CB-11183) Appium tests, Camera plugin: Better validation of the image

2016-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15286278#comment-15286278
 ] 

ASF GitHub Bot commented on CB-11183:
-

Github user alsorokin commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-camera/pull/209#discussion_r63490344
  
--- Diff: appium-tests/helpers/cameraHelper.js ---
@@ -103,11 +109,185 @@ module.exports.getPicture = function (opts, pid) {
 }, opts);
 };
 
-module.exports.checkPicture = function (pid, cb) {
+// verifies taken picture when the promise is resolved,
+// calls a callback with 'OK' if everything is good,
+// calls a callback with 'ERROR: ' if something is wrong
+// note that this function is executed in the context of tested app
+// and not in the context of tests
+module.exports.checkPicture = function (pid, options, cb) {
+var isIos = cordova.platformId === "ios";
+var isAndroid = cordova.platformId === "android";
+// skip image type check if it's unmodified on Android:
+// https://github.com/apache/cordova-plugin-camera/#android-quirks-1
+var skipFileTypeCheck = isAndroid &&
+(!options.quality || options.quality === 100) &&
--- End diff --

Default quality 100 sounds like a good idea, especially if it'll help 
reduce memory usage.
It is also intuitive: I was expecting it to be 100.


> Appium tests, Camera plugin: Better validation of the image
> ---
>
> Key: CB-11183
> URL: https://issues.apache.org/jira/browse/CB-11183
> Project: Apache Cordova
>  Issue Type: Test
>  Components: Appium, Plugin Camera
>Reporter: Alexander Sorokin
>Assignee: Alexander Sorokin
>
> Right now Appium tests only check that we get the picture and the app doesn't 
> crash doing it.
> Better validation needs to be performed. For example, we need to check if the 
> image has the right height and width.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (CB-11183) Appium tests, Camera plugin: Better validation of the image

2016-05-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15280520#comment-15280520
 ] 

ASF GitHub Bot commented on CB-11183:
-

Github user riknoll commented on the pull request:


https://github.com/apache/cordova-plugin-camera/pull/209#issuecomment-218538540
  
It would be nice to refactor the specs a bit, because they seem to be 90% 
shared code. This looks pretty good! Reading the file and checking the 
dimensions covers a lot of the bugs for camera.

Here are some other things that can be verified:

* Make sure that PNG files and JPEG files are actually encoded/named 
correctly (check the headers). We've had bugs in the past where we return a 
JPEG file with a .png file name
* Run specs with quality set to 100 in addition to 50. We often treat a 
quality of 100 as a special case on iOS and Android

It would also be nice to verify the type of URI we get back for the 
destination type. Unfortunately, that is horribly inconsistent right now on 
Android for NATIVE_URI and FILE_URI. It is possible to get back a `file:` URI, 
a `content:` URI, or a vanilla path depending on what camera options you pass. 
Can we try and verify it on iOS at least?

I think that covers most of the camera options that can be tested.


> Appium tests, Camera plugin: Better validation of the image
> ---
>
> Key: CB-11183
> URL: https://issues.apache.org/jira/browse/CB-11183
> Project: Apache Cordova
>  Issue Type: Test
>  Components: Appium, Plugin Camera
>Reporter: Alexander Sorokin
>Assignee: Alexander Sorokin
>
> Right now Appium tests only check that we get the picture and the app doesn't 
> crash doing it.
> Better validation needs to be performed. For example, we need to check if the 
> image has the right height and width.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (CB-11183) Appium tests, Camera plugin: Better validation of the image

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277358#comment-15277358
 ] 

ASF GitHub Bot commented on CB-11183:
-

Github user nikhilkh commented on the pull request:


https://github.com/apache/cordova-plugin-camera/pull/209#issuecomment-218023433
  
@riknoll  to help review


> Appium tests, Camera plugin: Better validation of the image
> ---
>
> Key: CB-11183
> URL: https://issues.apache.org/jira/browse/CB-11183
> Project: Apache Cordova
>  Issue Type: Test
>  Components: Appium, Plugin Camera
>Reporter: Alexander Sorokin
>Assignee: Alexander Sorokin
>
> Right now Appium tests only check that we get the picture and the app doesn't 
> crash doing it.
> Better validation needs to be performed. For example, we need to check if the 
> image has the right height and width.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (CB-11183) Appium tests, Camera plugin: Better validation of the image

2016-05-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15272592#comment-15272592
 ] 

ASF GitHub Bot commented on CB-11183:
-

GitHub user alsorokin opened a pull request:

https://github.com/apache/cordova-plugin-camera/pull/209

CB-11183 Appium tests: Added image verification

https://issues.apache.org/jira/browse/CB-11183

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-plugin-camera CB-11183

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-plugin-camera/pull/209.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #209


commit 249e3c08694c8a039313c1b5e054010269fbff06
Author: Alexander Sorokin 
Date:   2016-05-05T16:27:25Z

CB-11183 Appium tests: Added image verification




> Appium tests, Camera plugin: Better validation of the image
> ---
>
> Key: CB-11183
> URL: https://issues.apache.org/jira/browse/CB-11183
> Project: Apache Cordova
>  Issue Type: Test
>  Components: Appium, Plugin Camera
>Reporter: Alexander Sorokin
>Assignee: Alexander Sorokin
>
> Right now Appium tests only check that we get the picture and the app doesn't 
> crash doing it.
> Better validation needs to be performed. For example, we need to check if the 
> image has the right height and width.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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