mirror of
https://github.com/appium/appium.git
synced 2026-04-25 04:48:42 -05:00
test fixes
This commit is contained in:
@@ -81,19 +81,21 @@ module.exports.initSession = function (desired, opts) {
|
||||
});
|
||||
}
|
||||
deferred.resolve(browser);
|
||||
var caps = _.defaults(desired, env.CAPS);
|
||||
var caps = _.clone(desired);
|
||||
_.defaults(caps, env.CAPS);
|
||||
|
||||
if (env.SAUCE) {
|
||||
if (env.TRAVIS_JOB_NUMBER) name = '[' + env.TRAVIS_JOB_NUMBER + '] ' + name;
|
||||
if (name) desired.name = name.replace(/@[^\s]*/,'');
|
||||
if (env.TRAVIS_BUILD_NUMBER) desired.build = env.TRAVIS_BUILD_NUMBER;
|
||||
if (name) caps.name = name.replace(/@[^\s]*/,'');
|
||||
if (env.TRAVIS_BUILD_NUMBER) caps.build = env.TRAVIS_BUILD_NUMBER;
|
||||
if (opts['expect-error']){
|
||||
caps.tags.push('expect-error');
|
||||
}
|
||||
caps['max-duration'] = 600;
|
||||
if (caps['appium-version']){
|
||||
// locking cap list
|
||||
caps['appium-version']['filter-caps'] = _(caps).keys();
|
||||
}
|
||||
if (opts['expect-error']){
|
||||
caps.tags.push('expect-error');
|
||||
}
|
||||
}
|
||||
|
||||
if (env.VERBOSE) console.log("caps -->", caps);
|
||||
|
||||
@@ -35,6 +35,7 @@ var loadWebView = function (desired, browser, urlToLoad, titleToSpin) {
|
||||
if (_.contains(["safari", "iwebview", "chrome", "chromium", "chromebeta"], app)) {
|
||||
return browser
|
||||
.get(urlToLoad)
|
||||
.sleep(1000)
|
||||
.then(function () { return spinTitle(titleToSpin, browser); });
|
||||
} else {
|
||||
return browser
|
||||
|
||||
Reference in New Issue
Block a user