Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
import wd from 'wd';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
const Q = wd.Q;
chai.use(chaiAsPromised);
chai.should();
chaiAsPromised.transferPromiseness = wd.transferPromiseness;
// WebDriver browser instance
let browser;
// browser capabilities
// TODO: we should check Android later, seems currently (November 2015) Sauce
// Labs is having some problems with launching Android emulator fast enough or
// supporting setting a timeout long enough so that we don't intermittently
// get failing tests
const desireds = {
firefox: {
browserName: 'firefox',
/*global it:true, describe:true, before:true, after:true */
"use strict";
/*
1/ Set your sauce credentials (SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables)
2/ npm install mocha -g;
3/ Run:
mocha -R spec sauce-android-mocha-wd-notes.js
*/
var wd = require("wd"),
Q = wd.Q;
require('colors');
var chai = require("chai"),
chaiAsPromised = require("chai-as-promised");
chai.use(chaiAsPromised);
chai.should();
chaiAsPromised.transferPromiseness = wd.transferPromiseness;
var host = "ondemand.saucelabs.com",
port = 80,
username = process.env.SAUCE_USERNAME,
accessKey = process.env.SAUCE_ACCESS_KEY;
// Big timeout is needed
var timeout = process.env.TIMEOUT || 300000;
/*global it:true, describe:true, before:true, after:true */
"use strict";
/*
1/ Set your sauce credentials (SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables)
2/ npm install mocha -g;
3/ Start Sauce Connect
4/ Run:
mocha -R spec sauce-connect-ios-mocha-wd-raw.js
*/
var wd = require("wd"),
Q = wd.Q,
_ = require('underscore');
require('colors');
var chai = require("chai"),
chaiAsPromised = require("chai-as-promised");
chai.use(chaiAsPromised);
chai.should();
chaiAsPromised.transferPromiseness = wd.transferPromiseness;
var staticServer = require('node-static'),
path = require("path"),
http = require('http'),
assetDir = path.resolve(__dirname, "../../../assets"),
fileServer = new staticServer.Server(assetDir);
// create a local server to host our app
/*global it:true, describe:true, before:true, after:true */
"use strict";
/*
1/ Set your sauce credentials (SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables)
2/ npm install mocha -g;
3/ Run:
mocha -R spec sauce-ios-mocha-raw.js
*/
var wd = require("wd");
var Q = wd.Q;
var _ = require('underscore');
require('colors');
var chai = require("chai");
var chaiAsPromised = require("chai-as-promised");
chai.use(chaiAsPromised);
chai.should();
chaiAsPromised.transferPromiseness = wd.transferPromiseness;
var host = "ondemand.saucelabs.com",
port = 80,
username = process.env.SAUCE_USERNAME,
accessKey = process.env.SAUCE_ACCESS_KEY;
// Big timeout is needed
var timeout = process.env.TIMEOUT || 300000;
d.run(function() {
test(done);
});
});
};
module.exports.block = driverBlock;
module.exports.describe = describeWithDriver;
module.exports.describeForApp = describeForApp;
module.exports.describeForSauce = describeForSauce;
module.exports.describeForSafari = describeForSafari;
module.exports.describeForSettings = describeForSettings;
module.exports.describeForIWebView = describeForIWebView;
module.exports.describeForChrome = describeForChrome;
module.exports.Q = wd.Q;
"use strict";
var wd = require("wd")
, Q = wd.Q
, monocle = require("monocle-js")
, SauceLabs = require('saucelabs')
, apsc = function(obj) { return Array.prototype.slice.call(obj, 0); };
var yiewd = module.exports = {};
wd.addPromiseChainMethod('reportStatus', function(passed) {
if (this._yiewd_sauce === null) {
throw new Error("Status reporting is for Sauce Labs tests");
}
return Q.nfcall( this._yiewd_sauce.updateJob.bind(this._yiewd_sauce),
this.sessionID , {passed: passed});
});
wd.addPromiseChainMethod('reportPass', function() {
return this.reportStatus(true);