From 325f94219237a3ad041c25e8a7706a42d05c85fa Mon Sep 17 00:00:00 2001 From: Andrey Belym Date: Wed, 6 Dec 2017 12:55:28 +0300 Subject: [PATCH] Add missing options --- index.js | 28 ++++++++++++++++++++++++---- package.json | 2 +- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 7d63b54..158e04a 100644 --- a/index.js +++ b/index.js @@ -12,10 +12,21 @@ var DEFAULT_OPTS = { filter: null, screenshotsPath: null, takeScreenshotsOnFail: false, - reporter: [], + reporter: [], skipJsErrors: false, quarantineMode: false, - selectorTimeout: 10000 + assertionTimeout: 3000, + pageLoadTimeout: 3000, + selectorTimeout: 10000, + proxy: '', + hostname: '', + ports: [], + speed: 1, + concurrency: 0, + app: '', + appInitDelay: 1000, + debugMode: false, + debugOnFail: false }; module.exports = function gulpTestCafe (opts) { @@ -42,7 +53,7 @@ module.exports = function gulpTestCafe (opts) { var stream = this; var testcafe = null; - createTestCafe() + createTestCafe(opts.hostname, opts.ports[0], opts.ports[1]) .then(function (tc) { testcafe = tc; @@ -59,12 +70,21 @@ module.exports = function gulpTestCafe (opts) { runner.reporter(reporter); else { runner.reporter( - reporter.name || DEFAULT_REPORTER, + reporter.name || DEFAULT_REPORTER, reporter.file ? fs.createWriteStream(reporter.file) : reporter.outStream ); } }); + if (opts.concurrency) + runner.concurrency(opts.concurrency); + + if (opts.app) + runner.startApp(opts.app, opts.appInitDelay); + + if (opts.proxy) + runner.useProxy(opts.proxy); + return runner.run(opts); }) diff --git a/package.json b/package.json index 0059ee0..2990a01 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gulp-testcafe", - "version": "0.9.1", + "version": "0.9.2", "description": "Run TestCafe tests using Gulp.", "main": "index.js", "directories": {