CB-11631 Appium tests: A fix for a flaky "selection cancelled" failure

This commit is contained in:
Alexander Sorokin 2016-08-13 16:58:33 +03:00
parent fee72c7c04
commit e588907ac7
2 changed files with 3 additions and 2 deletions

View File

@ -398,7 +398,9 @@ describe('Camera tests Android.', function () {
.then(function () { .then(function () {
// success means we're still in native app // success means we're still in native app
return driver return driver
.deviceKeyEvent(BACK_BUTTON); .deviceKeyEvent(BACK_BUTTON)
// give native app some time to close
.sleep(2000);
}, function () { }, function () {
// error means we're already in webview // error means we're already in webview
return driver; return driver;

View File

@ -125,7 +125,6 @@ module.exports.checkPicture = function (pid, options, cb) {
// Skip image type check if destination is NATIVE_URI and source - device's photoalbum // Skip image type check if destination is NATIVE_URI and source - device's photoalbum
// https://github.com/apache/cordova-plugin-camera/#ios-quirks-1 // https://github.com/apache/cordova-plugin-camera/#ios-quirks-1
// TODO: correct link above
var skipFileTypeCheckiOS = isIos && options.destinationType === Camera.DestinationType.NATIVE_URI && var skipFileTypeCheckiOS = isIos && options.destinationType === Camera.DestinationType.NATIVE_URI &&
(options.sourceType === Camera.PictureSourceType.PHOTOLIBRARY || (options.sourceType === Camera.PictureSourceType.PHOTOLIBRARY ||
options.sourceType === Camera.PictureSourceType.SAVEDPHOTOALBUM); options.sourceType === Camera.PictureSourceType.SAVEDPHOTOALBUM);