Socket
Socket
Sign inDemoInstall

wd

Package Overview
Dependencies
Maintainers
4
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wd - npm Package Compare versions

Comparing version 0.3.11 to 0.3.12

9

doc/release-notes.md

@@ -5,2 +5,11 @@ # Release Notes

### 0.3.12
- geolocation fix
- package update
- lodash upgrade
- doc fixes
### 0.3.11
- http retry on EPIPE
### 0.3.10

@@ -7,0 +16,0 @@ - package upgrade

40

gulpfile.js

@@ -30,3 +30,3 @@ var gulp = require('gulp'),

function buildMochaOpts(opts) {
var mochaOpts = {

@@ -36,7 +36,7 @@ flags: {

R: 'spec',
//R: 'nyan',
//R: 'nyan',
},
bin: path.join(__dirname, 'node_modules/.bin/mocha'),
concurrency: args.concurrency | process.env.CONCURRENCY || 3
};
};
if(args.grep) {

@@ -51,3 +51,3 @@ mochaOpts.flags.g = args.grep;

delete env.SAUCE_USERNAME;
delete env.SAUCE_ACCESS_KEY;
delete env.SAUCE_ACCESS_KEY;
} else {

@@ -68,3 +68,3 @@ // midway + e2e tests

env.TUNNEL_IDENTIFIER = process.env.TRAVIS_JOB_NUMBER;
}
}
}

@@ -110,3 +110,3 @@ return env;

.pipe(mocha)
.on('error', console.warn.bind(console));
.on('error', console.warn.bind(console));
});

@@ -120,3 +120,3 @@ gulp.task('test-e2e-' + browser, function () {

});
});
}).value();

@@ -136,3 +136,3 @@ _(MOBILE_BROWSERS).each(function(browser) {

});
});
}).value();

@@ -142,7 +142,7 @@ gulp.task('test-midway', function() {

_(args.browsers).each(function(browser) {
midwayTestTasks.push('test-midway-' + browser);
});
midwayTestTasks.push('test-midway-' + browser);
}).value();
return runSequence('pre-midway', midwayTestTasks)
.finally(function() {
return runSequence('post-midway');
return runSequence('post-midway');
});

@@ -154,4 +154,4 @@ });

_(args.browsers).chain().without('multi').each(function(browser) {
e2eTestTasks.push('test-e2e-' + browser);
});
e2eTestTasks.push('test-e2e-' + browser);
}).value();
if(e2eTestTasks.length > 0){

@@ -167,3 +167,3 @@ return runSequence(e2eTestTasks);

seq.push('test-e2e-' + browser);
});
}).value();
return runSequence.apply(null, seq);

@@ -184,3 +184,3 @@ });

});
}, parseInt(args.throttle, 10));
}, parseInt(args.throttle, 10));
}

@@ -231,7 +231,7 @@ server = require('http').createServer(function(req, res) {

}, 5000);
if(server) {
if(server) {
server.close(function() {
clearTimeout(t);
done();
});
});
}

@@ -246,3 +246,3 @@ else { done(); }

username: process.env.SAUCE_USERNAME,
accessKey: process.env.SAUCE_ACCESS_KEY,
accessKey: process.env.SAUCE_ACCESS_KEY,
verbose: process.env.SAUCE_CONNECT_VERBOSE,

@@ -262,6 +262,6 @@ directDomains: 'cdnjs.cloudflare.com,html5shiv.googlecode.com',

startTunnel(done, n-1);
}, 20000);
}, 20000);
} else {
console.error(err.message);
done(err);
done(err);
}

@@ -268,0 +268,0 @@ return;

@@ -35,4 +35,4 @@ var _ = require('lodash'),

}
});
if(finalOpts.el) {
}).value();
if(finalOpts.el) {
finalOpts.element = finalOpts.el;

@@ -173,3 +173,3 @@ delete finalOpts.el;

*/
MultiAction.prototype.add = function () {
MultiAction.prototype.add = function () {
var actions = __slice.call(arguments, 0);

@@ -176,0 +176,0 @@ this.actions = this.actions.concat(actions);

@@ -23,3 +23,3 @@ var _ = require('./lodash');

httpConfig[key] = opts[key];
}, this);
}, this).value();
}

@@ -26,0 +26,0 @@

@@ -125,4 +125,4 @@ var async = require("async");

browser[methodName] = deprecatedChain[methodName].bind(browser);
});
}).value();
}
};

@@ -54,4 +54,4 @@ //Element object

};
});
}).value();
module.exports = Element;
var request = require('request'),
utils = require("./utils"),
urllib = require('url');
urllib = require('url'),
packageDotJson = require('../package.json');

@@ -43,2 +44,3 @@ exports.buildInitUrl =function(baseUrl)

opts.headers.Connection = 'keep-alive';
opts.headers['User-Agent'] = 'admc/wd/' + packageDotJson.version;
opts.timeout = httpConfig.timeout;

@@ -54,3 +56,3 @@ if(httpConfig.proxy) { opts.proxy = httpConfig.proxy; }

data = JSON.stringify(data);
}
}
this.url = url;

@@ -67,3 +69,3 @@ if (opts.method === 'POST' || opts.method === 'PUT') {

var shouldRetryOn = function(err) {
return err.code === 'ECONNRESET' ||
return err.code === 'ECONNRESET' ||
err.code === 'ETIMEDOUT' ||

@@ -70,0 +72,0 @@ err.code === 'ESOCKETTIMEDOUT' ||

@@ -90,8 +90,8 @@ var __slice = Array.prototype.slice,

};
// wrapping browser methods with promises.
_(filterPromisedMethods(WebDriver.prototype)).each(function(fname) {
PromiseWebdriver.prototype[fname] = wrap(WebDriver.prototype[fname], fname);
});
}).value();

@@ -101,3 +101,3 @@ // wrapping element methods with promises.

PromiseElement.prototype[fname] = wrap(Element.prototype[fname], fname);
});
}).value();

@@ -126,3 +126,3 @@ PromiseWebdriver.prototype.newElement = function(jsonWireElement) {

};
});
}).value();

@@ -203,3 +203,3 @@ // we get the list of methods dynamically.

};
});
}).value();
// transfering _enrich

@@ -206,0 +206,0 @@ promise._enrich = function(target) {

@@ -59,3 +59,3 @@ var Args = require("vargs").Constructor,

}
});
}).value();
if(promise._enrich) {

@@ -107,3 +107,3 @@ promise._enrich(target);

}
});
}).value();
return x.join('');

@@ -110,0 +110,0 @@ };

@@ -227,2 +227,2 @@ var EventEmitter = require('events').EventEmitter,

};
});
}).value();

@@ -11,3 +11,3 @@ {

],
"version": "0.3.11",
"version": "0.3.12",
"author": "Adam Christian <adam.christian@gmail.com>",

@@ -32,8 +32,3 @@ "contributors": [

},
"licenses": [
{
"type": "Apache",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
}
],
"license": "Apache-2.0",
"bugs": {

@@ -53,8 +48,8 @@ "url": "https://github.com/admc/wd/issues"

"dependencies": {
"archiver": "~0.12.0",
"async": "~0.9.0",
"lodash": "~2.4.1",
"q": "~1.0.1",
"request": "~2.46.0",
"underscore.string": "~2.3.3",
"archiver": "~0.14.0",
"async": "~1.0.0",
"lodash": "~3.9.3",
"q": "~1.4.1",
"request": "~2.55.0",
"underscore.string": "~3.0.3",
"vargs": "~0.1.0"

@@ -64,25 +59,25 @@ },

"bdd-with-opts": "~1.0.0",
"chai": "~1.9.1",
"chai-as-promised": "~4.1.1",
"colors": "~1.0.3",
"dox": "~0.5.1",
"express": "~4.10.0",
"chai": "~2.3.0",
"chai-as-promised": "~5.0.0",
"colors": "~1.1.0",
"dox": "~0.8.0",
"express": "~4.12.4",
"gulp": "~3.8.1",
"gulp-jshint": "~1.8.4",
"hbs": "~2.7.0",
"http-proxy": "~1.5.3",
"gulp-jshint": "~1.11.0",
"hbs": "~3.0.1",
"http-proxy": "~1.11.1",
"imageinfo": "~1.0.4",
"istanbul": "~0.3.0",
"jshint": "~2.5.1",
"jshint-stylish": "~1.0.0",
"mocha": "~2.0.1",
"jshint": "~2.7.0",
"jshint-stylish": "~2.0.0",
"mocha": "~2.2.5",
"mu2": "~0.5.20",
"nock": "~0.48.0",
"nock": "~2.2.0",
"node-uuid": "~1.4.1",
"promise-simple": "~0.1.0",
"run-sequence": "~1.0.1",
"sauce-connect-launcher": "~0.6.0",
"spawn-mocha-parallel": "~1.0.0",
"run-sequence": "~1.1.0",
"sauce-connect-launcher": "~0.11.1",
"spawn-mocha-parallel": "~1.3.1",
"sv-selenium": "~0.2.5",
"yargs": "~1.3.1"
"yargs": "~3.9.1"
},

@@ -89,0 +84,0 @@ "scripts": {

@@ -17,6 +17,5 @@ # WD.js

## v0.3.0
## Release Notes
[here](https://github.com/admc/wd/blob/master/doc/release-notes.md)
Breaking changes: TouchAction/MultiAction api update. See [release note](https://github.com/admc/wd/blob/master/doc/release-notes.md).
## Install

@@ -28,2 +27,5 @@

Note: WD.js does not start the selenium server. You may use the [selenium-standalone](https://www.npmjs.com/package/selenium-standalone) package
to install and start a selenium server.
## Authors

@@ -30,0 +32,0 @@

@@ -27,3 +27,3 @@ /*global _:true, Q:true */

mocha[optName].apply(mocha, opt);
});
}).value();
mocha.run(function(err) {

@@ -44,3 +44,3 @@ // Need to cleanup require cache otherwise the test won't run twice

delete require.cache[path.resolve(key)];
});
}).value();
done(err);

@@ -47,0 +47,0 @@ });

@@ -47,5 +47,5 @@ var devices = {};

}
});
}).value();
}
});
}).value();

@@ -52,0 +52,0 @@ if(device){

@@ -72,3 +72,3 @@ require('./env');

}
});
}).value();
return desired;

@@ -75,0 +75,0 @@ };

@@ -9,3 +9,3 @@ var Args = require('vargs').Constructor;

'ios': 'ios',
'android': 'android'
'android': 'android'
};

@@ -17,3 +17,3 @@ _(patterns).each(function(_cat, pattern) {

}
});
}).value();
var args = new Args(arguments);

@@ -23,5 +23,5 @@ var found = _(args.all).find(function(skipConfig) {

return (env.BROWSER || "").match(re) || (cat||"").match(re);
});
});
return found ? {pending: true} : {};
};

@@ -56,3 +56,3 @@ require('../helpers/setup');

should.not.exist(wd.Webdriver.prototype[name]);
});
}).value();
};

@@ -67,3 +67,3 @@

wd.removeMethod(name);
});
}).value();
noExtraMethodCheck();

@@ -77,3 +77,3 @@ });

wd.addAsyncMethod(name, method);
});
}).value();
browser.sleepAndElementById('theDiv', function(err, el) {

@@ -105,3 +105,3 @@ if(err) { return done(err); }

wd.addElementAsyncMethod(name, method);
});
}).value();
browser.elementById('div1', function(err, el) {

@@ -108,0 +108,0 @@ if(err) { return done(err); }

@@ -125,3 +125,3 @@ require('../helpers/setup');

should.not.exist(wd.PromiseChainWebdriver.prototype[name]);
});
}).value();
};

@@ -136,3 +136,3 @@

wd.removeMethod(name);
});
}).value();
noExtraMethodCheck();

@@ -154,3 +154,3 @@ });

wd.addPromiseChainMethod(name, method);
});
}).value();
return browser

@@ -180,3 +180,3 @@ .sleepAndElementById('theDiv')

wd.addElementPromiseChainMethod(name, method);
});
}).value();
return browser

@@ -193,3 +193,3 @@ .elementById('div1')

wd.addPromiseMethod(name, method);
});
}).value();
return browser

@@ -219,3 +219,3 @@ .sleepAndElementById('theDiv')

wd.addElementPromiseMethod(name, method);
});
}).value();
return browser

@@ -232,3 +232,3 @@ .elementById('div1')

wd.addAsyncMethod(name, method);
});
}).value();
return browser

@@ -260,3 +260,3 @@ // .sleepAndElementById('theDiv')

wd.addElementAsyncMethod(name, method);
});
}).value();
return browser

@@ -263,0 +263,0 @@ .elementById('div1')

@@ -94,3 +94,3 @@ require('../helpers/setup');

should.not.exist(wd.PromiseChainWebdriver.prototype[name]);
});
}).value();
};

@@ -105,3 +105,3 @@

wd.removeMethod(name);
});
}).value();
noExtraMethodCheck();

@@ -115,3 +115,3 @@ });

wd.addPromiseMethod(name, method);
});
}).value();

@@ -144,3 +144,3 @@ return browser

wd.addElementPromiseMethod(name, method);
});
}).value();
return browser

@@ -159,3 +159,3 @@ .elementById('div1')

wd.addAsyncMethod(name, method);
});
}).value();
return browser

@@ -187,3 +187,3 @@ .sleepAndElementById('theDiv').should.be.fulfilled

wd.addElementAsyncMethod(name, method);
});
}).value();
return browser

@@ -190,0 +190,0 @@ .elementById('div1')

@@ -41,3 +41,3 @@ /* global sauceJobTitle, mergeDesired, midwayUrl, Express */

should.not.exist(wd.PromiseChainWebdriver.prototype[name]);
});
}).value();
};

@@ -60,3 +60,3 @@

wd.removeMethod(name);
});
}).value();
noExtraMethodCheck();

@@ -102,3 +102,3 @@ });

wd.addPromiseChainMethod(name, method);
});
}).value();

@@ -120,3 +120,3 @@ browser = newPromiseChainRemote();

wd.addPromiseChainMethod(name, method);
});
}).value();

@@ -123,0 +123,0 @@ browser = newPromiseChainRemote();

@@ -161,3 +161,4 @@ /* global sauceJobTitle, mergeDesired, midwayUrl, Express */

return browser
.get(relUrl).should.eventually.include('WD Tests - config-http')
.get(relUrl)
.should.eventually.include('WD Tests - config-http')
.should.be.rejected;

@@ -164,0 +165,0 @@ })

@@ -22,3 +22,3 @@ require('../helpers/setup');

}
});
}).value();
if(handles.length > 0) {

@@ -101,3 +101,4 @@ seq.push(function() {return browser.window(handles[0]);});

partials['browser.setWindowSize'] = "";
it('browser.setWindowSize', function() {
it('browser.setWindowSize', skip('chrome'), function() {
// bug with chrome
return browser

@@ -108,4 +109,4 @@ .getWindowSize().then(function(size) {

.getWindowSize().then(function(newSize) {
newSize.width.should.equal(size.width - 10);
newSize.height.should.equal(size.height - 5);
newSize.width.should.be.within(size.width - 11, size.width - 9);
newSize.height.should.be.within(size.height - 6, size.height - 4);
})

@@ -116,4 +117,4 @@ .windowHandle(function(handle) {

.getWindowSize().then(function(newSize) {
newSize.width.should.equal(size.width - 15);
newSize.height.should.equal(size.height - 10);
newSize.width.should.be.within(size.width - 16, size.width - 14);
newSize.height.should.be.within(size.height - 11, size.height - 9);
});

@@ -120,0 +121,0 @@ });

@@ -300,3 +300,3 @@ var nock = require('nock'),

.elementById('random').then(function(_el) { el = _el; })
.then(function() {
.then(function() {
nock.cleanAll();

@@ -322,3 +322,3 @@ server

var ma = new wd.MultiAction().add(a1, a2);
return browser.performMultiAction(el, ma);
return browser.performMultiAction(el, ma);
})

@@ -329,3 +329,3 @@ .then(function() {

var ma = new wd.MultiAction().add(a1, a2);
return browser.performMultiAction(el, ma);
return browser.performMultiAction(el, ma);
})

@@ -336,3 +336,3 @@ .then(function() {

var ma = new wd.MultiAction().add(a1, a2);
return el.performMultiAction(ma);
return el.performMultiAction(ma);
})

@@ -343,5 +343,5 @@ .then(function() {

var ma = new wd.MultiAction(el).add(a1, a2);
return ma.perform();
return ma.perform();
})
.then(function() {
.then(function() {
nock.cleanAll();

@@ -1067,3 +1067,3 @@ server

});
},
},
function(done) {

@@ -1090,3 +1090,3 @@ nock.cleanAll();

var a2 = new wd.TouchAction().tap({x: 50, y: 25});
var ma = new wd.MultiAction().add(a1, a2);
var ma = new wd.MultiAction().add(a1, a2);
browser.performMultiAction(el, ma, function(err, res) {

@@ -1101,3 +1101,3 @@ should.not.exist(err);

var a2 = new wd.TouchAction().tap({x: 50, y: 25});
var ma = new wd.MultiAction().add(a1, a2);
var ma = new wd.MultiAction().add(a1, a2);
el.performMultiAction(ma, function(err, res) {

@@ -1112,3 +1112,3 @@ should.not.exist(err);

var a2 = new wd.TouchAction().tap({x: 50, y: 25});
var ma = new wd.MultiAction(el).add(a1, a2);
var ma = new wd.MultiAction(el).add(a1, a2);
ma.perform(function(err, res) {

@@ -1136,7 +1136,7 @@ should.not.exist(err);

done();
},
},
function(done) {
var a1 = new wd.TouchAction().tap({x: 100, y: 200});
var a2 = new wd.TouchAction().tap({x: 50, y: 25});
var ma = new wd.MultiAction().add(a1, a2);
var ma = new wd.MultiAction().add(a1, a2);
browser.performMultiAction(ma, function(err, res) {

@@ -1151,3 +1151,3 @@ should.not.exist(err);

var a2 = new wd.TouchAction().tap({x: 50, y: 25});
var ma = new wd.MultiAction(browser).add(a1, a2);
var ma = new wd.MultiAction(browser).add(a1, a2);
ma.perform(function(err, res) {

@@ -1154,0 +1154,0 @@ should.not.exist(err);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc