Skip to content

Commit

Permalink
make sure we can do forceiPad and safari
Browse files Browse the repository at this point in the history
heads up @DylanLacey, this will likely cause a conflict with your work
  • Loading branch information
jlipps committed Mar 14, 2014
1 parent 101dec6 commit 873d2df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/appium.js
Expand Up @@ -98,8 +98,8 @@ Appium.prototype.getDeviceType = function (args, caps) {
var device = caps.device ? caps.device.toString().toLowerCase() : '';
var pkg = args.androidPackage || caps['app-package'];
pkg = pkg ? pkg.toString().toLowerCase() : '';
var type = this.getDeviceTypeFromArgs(args) ||
this.getDeviceTypeFromNamedApp(app) ||
var type = this.getDeviceTypeFromNamedApp(app) ||
this.getDeviceTypeFromArgs(args) ||
this.getDeviceTypeFromDeviceCap(device) ||
this.getDeviceTypeFromApp(app) ||
this.getDeviceTypeFromPackage(pkg);
Expand Down
1 change: 1 addition & 0 deletions test/unit/configuration-specs.js
Expand Up @@ -21,6 +21,7 @@ describe('Appium', function () {
, [{safari: true}, {}, 'safari']
, [{safari: true}, {app: '/path/to/my.apk'}, 'safari']
, [{safari: false}, {app: 'safari'}, 'safari']
, [{forceIpad: true}, {app: 'safari'}, 'safari']
, [{}, {app: 'Safari'}, 'safari']
, [{}, {app: 'settings'}, 'ios']
, [{}, {app: 'Settings'}, 'ios']
Expand Down

0 comments on commit 873d2df

Please sign in to comment.