[
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: <error message>' 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: [email protected]
For additional commands, e-mail: [email protected]