mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-18 19:22:51 +08:00
CB-13002: (Android, iOS) Fix occasional Appium tests failures
This commit is contained in:
parent
f1b0ccec56
commit
5574490bc3
@ -115,6 +115,16 @@ describe('Camera tests Android.', function () {
|
|||||||
if (!options) {
|
if (!options) {
|
||||||
options = {};
|
options = {};
|
||||||
}
|
}
|
||||||
|
// assign default values
|
||||||
|
if (!options.hasOwnProperty('allowEdit')) {
|
||||||
|
options.allowEdit = true;
|
||||||
|
}
|
||||||
|
if (!options.hasOwnProperty('destinationType')) {
|
||||||
|
options.destinationType = cameraConstants.DestinationType.FILE_URI;
|
||||||
|
}
|
||||||
|
if (!options.hasOwnProperty('sourceType')) {
|
||||||
|
options.destinationType = cameraConstants.PictureSourceType.CAMERA;
|
||||||
|
}
|
||||||
|
|
||||||
return driver
|
return driver
|
||||||
.context(webviewContext)
|
.context(webviewContext)
|
||||||
|
@ -128,6 +128,16 @@ describe('Camera tests iOS.', function () {
|
|||||||
if (!options) {
|
if (!options) {
|
||||||
options = {};
|
options = {};
|
||||||
}
|
}
|
||||||
|
// assign defaults
|
||||||
|
if (!options.hasOwnProperty('allowEdit')) {
|
||||||
|
options.allowEdit = true;
|
||||||
|
}
|
||||||
|
if (!options.hasOwnProperty('destinationType')) {
|
||||||
|
options.destinationType = cameraConstants.DestinationType.FILE_URI;
|
||||||
|
}
|
||||||
|
if (!options.hasOwnProperty('sourceType')) {
|
||||||
|
options.destinationType = cameraConstants.PictureSourceType.CAMERA;
|
||||||
|
}
|
||||||
|
|
||||||
return driver
|
return driver
|
||||||
.context(webviewContext)
|
.context(webviewContext)
|
||||||
|
Loading…
Reference in New Issue
Block a user