appium-uiauto
Advanced tools
Comparing version 1.10.2 to 1.10.3
@@ -35,3 +35,3 @@ // The Command Proxy relays UIAuto message to and from Appium. It is also the | ||
var Proxy = function (opts) { | ||
var TheProxy = function (opts) { | ||
opts = opts || {}; | ||
@@ -240,3 +240,3 @@ var curCommand = null; | ||
module.exports = Proxy; | ||
module.exports = TheProxy; | ||
{ | ||
"name": "appium-uiauto", | ||
"version": "1.10.2", | ||
"version": "1.10.3", | ||
"description": "appium uiauto ios driver", | ||
@@ -8,3 +8,3 @@ "main": "lib/main.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "make && make test_uiauto" | ||
}, | ||
@@ -33,3 +33,3 @@ "repository": { | ||
"devDependencies": { | ||
"appium-instruments": "~1.5.0", | ||
"appium-instruments": "1.5.3", | ||
"underscore": "~1.7.0", | ||
@@ -41,3 +41,3 @@ "chai": "~1.10.0", | ||
"jshint": "~2.5.1", | ||
"mocha": "~2.0.1", | ||
"mocha": "~2.1.0", | ||
"rimraf": "~2.2.8", | ||
@@ -44,0 +44,0 @@ "sinon": "~1.12.2", |
@@ -1,2 +0,2 @@ | ||
/* globals $, rootPage */ | ||
/* globals $, rootPage, alerts */ | ||
'use strict'; | ||
@@ -12,2 +12,3 @@ | ||
'uiauto/lib/element-patch/helper-patch.js', | ||
'uiauto/lib/mechanic-ext/basics-ext.js', | ||
'uiauto/lib/mechanic-ext/util-ext.js', | ||
@@ -14,0 +15,0 @@ 'uiauto/lib/mechanic-ext/lookup-ext.js', |
@@ -67,3 +67,4 @@ 'use strict'; | ||
logger: logger.instance(), | ||
simulatorSdkAndDevice: 'iPhone 6 (8.1 Simulator)' | ||
simulatorSdkAndDevice: 'iPhone 6 (8.1 Simulator)', | ||
launchTries: 2 | ||
}); | ||
@@ -75,6 +76,9 @@ }; | ||
var proxy = new CommandProxy(opts); | ||
var instruments; | ||
proxy.start( | ||
// first connection | ||
function () { | ||
// TODO | ||
function (err) { | ||
instruments.launchHandler(err); | ||
if (err) return deferred.reject(err); | ||
deferred.resolve({proxy: proxy, instruments: instruments}); | ||
}, | ||
@@ -85,10 +89,6 @@ // regular cb | ||
newInstruments(bootstrapFile).then(function (_instruments) { | ||
var instruments = _instruments; | ||
instruments = _instruments; | ||
instruments.start(null, function () { | ||
proxy.safeShutdown(function () {}); | ||
}); | ||
setTimeout(function () { | ||
instruments.launchHandler(); | ||
deferred.resolve({proxy: proxy, instruments: instruments}); | ||
}, 2000); | ||
}) | ||
@@ -95,0 +95,0 @@ .catch(function (err) { deferred.reject(err); }) |
@@ -17,4 +17,3 @@ /* globals $ */ | ||
// skipping, reenable when iwd is working again | ||
it.skip('should be quick when grace period is not set', function () { | ||
it('should be quick when grace period is not set', function () { | ||
var refMs = Date.now(); | ||
@@ -29,4 +28,3 @@ return ctx.execFunc( | ||
// skipping, reenable when iwd is working again | ||
it.skip('should be quick when pushing and poping 0 timeout', function () { | ||
it('should be quick when pushing and poping 0 timeout', function () { | ||
var refMs = Date.now(); | ||
@@ -33,0 +31,0 @@ return ctx.execFunc( |
@@ -1,2 +0,2 @@ | ||
/* globals $ */ | ||
/* globals $, env */ | ||
'use strict'; | ||
@@ -28,3 +28,3 @@ | ||
_([undefined,'oneByOne', 'grouped', 'setValue']).each(function(sendKeyStrategy) { | ||
_([undefined,'oneByOne', 'grouped', 'setValue']).each(function (sendKeyStrategy) { | ||
it('should work with strategy: ' + sendKeyStrategy, function () { | ||
@@ -31,0 +31,0 @@ return ctx.execFunc( |
@@ -7,3 +7,3 @@ /* globals $, env */ | ||
var ensureKeyboardOn = function (el) { | ||
var ensureKeyboardOn = function () { | ||
if (this.hasKeyboardFocus() === 0 || $.keyboard().isVisible() === 0) { | ||
@@ -10,0 +10,0 @@ $.debug('No keyboard found. Tapping to make visible.'); |
@@ -6,5 +6,9 @@ /* globals $, ERROR */ | ||
var alert = $.mainApp().alert(); | ||
if (alert.isNil()) alert = $('alert')[0] || alert; | ||
return alert; | ||
} | ||
if (alert.isValid()) return alert; | ||
alert = null; | ||
$('alert').forEach(function (_alert) { | ||
if (!alert && _alert.isValid()) alert = _alert; | ||
}); | ||
return alert || $.nil; | ||
}; | ||
@@ -11,0 +15,0 @@ $.extend($, { |
@@ -5,2 +5,7 @@ /* globals $ */ | ||
var delaySec = $.delay; | ||
var nil = new UIAElementNil(); | ||
// prototyping does not work when creating UIAElementNil | ||
nil.isNil = function () { return true; }; | ||
$.extend($, { | ||
@@ -17,3 +22,3 @@ | ||
if (!$.tryWaitForCondition(function() { | ||
if (!$.tryWaitForCondition(function () { | ||
app = $.target().frontMostApp(); | ||
@@ -30,3 +35,3 @@ return app && app.isValid(); })) { | ||
if (!$.tryWaitForCondition(function() { | ||
if (!$.tryWaitForCondition(function () { | ||
appKeyboard = $.mainApp().keyboard(); | ||
@@ -36,3 +41,3 @@ return appKeyboard && appKeyboard.isValid(); })) { | ||
} | ||
return appKeyboard; | ||
@@ -50,5 +55,5 @@ } | ||
, tryWaitForCondition: function(condition, interval) { | ||
, tryWaitForCondition: function (condition, interval) { | ||
if (typeof condition !== 'function') { | ||
throw new Error("Must provide a callback returning a boolean.") | ||
throw new Error("Must provide a callback returning a boolean."); | ||
} | ||
@@ -66,4 +71,4 @@ | ||
return isMet; | ||
} | ||
}, nil: nil | ||
}); | ||
})(); |
@@ -1,2 +0,2 @@ | ||
/* globals $, ERROR */ | ||
/* globals $ */ | ||
@@ -56,3 +56,3 @@ (function () { | ||
} else { | ||
throw new Error("Invalid key name.") | ||
throw new Error("Invalid key name."); | ||
} | ||
@@ -69,3 +69,3 @@ } | ||
, hideKeyboard: function (strategy, keyName) { | ||
if($.mainApp().keyboard().isNil()) { | ||
if ($.mainApp().keyboard().isNil()) { | ||
return; | ||
@@ -91,3 +91,3 @@ } | ||
if(!$.tryWaitForCondition(function(){ return $.mainApp().keyboard().isNil(); })) { | ||
if (!$.tryWaitForCondition(function () { return $.mainApp().keyboard().isNil(); })) { | ||
throw new Error("Failed to hide keyboard."); | ||
@@ -94,0 +94,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
13361356
158
3823
0