Skip to content

Commit

Permalink
CB-13002: (Android, iOS) Fix occasional Appium tests failures
Browse files Browse the repository at this point in the history
  • Loading branch information
alsorokin committed Jul 10, 2017
1 parent f1b0cce commit 5574490
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions appium-tests/android/android.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,16 @@ describe('Camera tests Android.', function () {
if (!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
.context(webviewContext)
Expand Down
10 changes: 10 additions & 0 deletions appium-tests/ios/ios.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@ describe('Camera tests iOS.', function () {
if (!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
.context(webviewContext)
Expand Down

0 comments on commit 5574490

Please sign in to comment.