CB-12764: (android) Adapt Appium tests for Android 7

This commit is contained in:
Alexander Sorokin
2017-06-02 15:02:01 +03:00
parent 51e5c02dcb
commit 1b218cd8a0
3 changed files with 122 additions and 56 deletions
+5 -1
View File
@@ -114,7 +114,7 @@ module.exports.getPicture = function (opts, pid) {
// 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) {
module.exports.checkPicture = function (pid, options, skipContentCheck, cb) {
var isIos = cordova.platformId === "ios";
var isAndroid = cordova.platformId === "android";
// skip image type check if it's unmodified on Android:
@@ -179,6 +179,10 @@ module.exports.checkPicture = function (pid, options, cb) {
errorCallback('Cannot read file. Please install cordova-plugin-file to fix this.');
return;
}
if (skipContentCheck) {
cb('OK');
return;
}
resolveLocalFileSystemURL(result, function (entry) {
if (skipFileTypeCheck) {
displayFile(entry);