Details
-
Test
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Because they look more clean:
function getDriver() { driver = wdHelper.getDriver(PLATFORM); return wdHelper.getWebviewContext(driver) .then(function(context) { webviewContext = context; return driver.context(webviewContext); }) .then(function () { return wdHelper.waitForDeviceReady(driver); }) .then(function () { return wdHelper.injectLibraries(driver); }); }
vs
function getDriver() { driver = wdHelper.getDriver(PLATFORM); return driver.getWebviewContext() .then(function(context) { webviewContext = context; return driver.context(webviewContext); }) .waitForDeviceReady() .injectLibraries(); }