Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

testcafe-legacy-api

Package Overview
Dependencies
Maintainers
6
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

testcafe-legacy-api - npm Package Compare versions

Comparing version 3.1.7 to 3.1.8

351

lib/compiler/index.js
'use strict';
var _classCallCheck = require('babel-runtime/helpers/class-call-check').default;
exports.__esModule = true;
var _Object$keys = require('babel-runtime/core-js/object/keys').default;
var _getIterator2 = require('babel-runtime/core-js/get-iterator');
var _regeneratorRuntime = require('babel-runtime/regenerator').default;
var _getIterator3 = _interopRequireDefault(_getIterator2);
var _getIterator = require('babel-runtime/core-js/get-iterator').default;
var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard').default;
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default').default;
var _keys = require('babel-runtime/core-js/object/keys');
exports.__esModule = true;
var _keys2 = _interopRequireDefault(_keys);

@@ -47,22 +47,22 @@ var _fs = require('fs');

var _utilsPromisify = require('../utils/promisify');
var _promisify = require('../utils/promisify');
var _utilsPromisify2 = _interopRequireDefault(_utilsPromisify);
var _promisify2 = _interopRequireDefault(_promisify);
var readFile = _utilsPromisify2.default(fs.readFile);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var readFile = (0, _promisify2.default)(fs.readFile);
function exists(filePath) {
return new _pinkie2.default(function (resolve) {
return fs.exists(filePath, resolve);
});
return new _pinkie2.default(resolve => fs.exists(filePath, resolve));
}
var FIXTURE_RE = /(^|;|\s+)('|")@fixture\s+.+?\2/;
var PAGE_RE = /(^|;|\s+)('|")@page\s+.+?\2/;
var TEST_RE = /(^|;|\s+)('|")@test\2\s*\[('|").+?\3\]\s*=\s*\{/;
const FIXTURE_RE = /(^|;|\s+)('|")@fixture\s+.+?\2/;
const PAGE_RE = /(^|;|\s+)('|")@page\s+.+?\2/;
const TEST_RE = /(^|;|\s+)('|")@test\2\s*\[('|").+?\3\]\s*=\s*\{/;
var CompilerAdapter = (function () {
function CompilerAdapter(hammerheadProcessScript) {
_classCallCheck(this, CompilerAdapter);
class CompilerAdapter {
constructor(hammerheadProcessScript) {
this.cache = {

@@ -79,10 +79,8 @@ requires: {},

CompilerAdapter._resolveConfigModules = function _resolveConfigModules(cfg, dirName) {
static _resolveConfigModules(cfg, dirName) {
if (cfg.modules) {
_Object$keys(cfg.modules).forEach(function (name) {
(0, _keys2.default)(cfg.modules).forEach(name => {
var mod = cfg.modules[name];
if (Array.isArray(mod)) mod = mod.map(function (filePath) {
return path.resolve(dirName, filePath);
});else mod = path.resolve(dirName, mod);
if (Array.isArray(mod)) mod = mod.map(filePath => path.resolve(dirName, filePath));else mod = path.resolve(dirName, mod);

@@ -92,169 +90,91 @@ cfg.modules[name] = mod;

}
};
}
CompilerAdapter._collectDirConfigs = function _collectDirConfigs(dirName) {
var cfgs, dirHierarchy, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, dir, cfgPath, isExists, data, cfg;
static _collectDirConfigs(dirName) {
return (0, _asyncToGenerator3.default)(function* () {
var cfgs = [];
return _regeneratorRuntime.async(function _collectDirConfigs$(context$2$0) {
while (1) switch (context$2$0.prev = context$2$0.next) {
case 0:
cfgs = [];
dirHierarchy = dirName.split(path.sep).reduce(function (dirs, chunk) {
var dir = null;
var dirHierarchy = dirName.split(path.sep).reduce(function (dirs, chunk) {
var dir = null;
if (dirs.length) dir = path.join(dirs[dirs.length - 1], chunk);else if (_osFamily2.default.win) dir = chunk;else dir = path.sep + chunk;
if (dirs.length) dir = path.join(dirs[dirs.length - 1], chunk);else if (_osFamily2.default.win) dir = chunk;else dir = path.sep + chunk;
dirs.push(dir);
dirs.push(dir);
return dirs;
}, []);
_iteratorNormalCompletion = true;
_didIteratorError = false;
_iteratorError = undefined;
context$2$0.prev = 5;
_iterator = _getIterator(dirHierarchy);
return dirs;
}, []);
case 7:
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
context$2$0.next = 23;
break;
}
for (var _iterator = dirHierarchy, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
var _ref;
dir = _step.value;
cfgPath = path.join(dir, 'test_config.json');
context$2$0.next = 12;
return _regeneratorRuntime.awrap(exists(cfgPath));
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
case 12:
isExists = context$2$0.sent;
var dir = _ref;
if (!isExists) {
context$2$0.next = 20;
break;
}
var cfgPath = path.join(dir, 'test_config.json');
var isExists = yield exists(cfgPath);
context$2$0.next = 16;
return _regeneratorRuntime.awrap(readFile(cfgPath));
if (isExists) {
var data = yield readFile(cfgPath);
var cfg = JSON.parse((0, _stripBom2.default)(data));
case 16:
data = context$2$0.sent;
cfg = JSON.parse(_stripBom2.default(data));
CompilerAdapter._resolveConfigModules(cfg, dir);
cfgs.push(cfg);
}
}
case 20:
_iteratorNormalCompletion = true;
context$2$0.next = 7;
break;
return cfgs;
})();
}
case 23:
context$2$0.next = 29;
break;
_getConfig(filePath) {
var _this = this;
case 25:
context$2$0.prev = 25;
context$2$0.t0 = context$2$0['catch'](5);
_didIteratorError = true;
_iteratorError = context$2$0.t0;
return (0, _asyncToGenerator3.default)(function* () {
var dirName = path.dirname(filePath);
var cfg = {};
var cachedCfg = _this.cache.configs[dirName];
case 29:
context$2$0.prev = 29;
context$2$0.prev = 30;
if (cachedCfg) cfg = cachedCfg;else {
// NOTE: walk up in the directories hierarchy and collect test_config.json files
var dirConfigs = yield CompilerAdapter._collectDirConfigs(dirName);
if (!_iteratorNormalCompletion && _iterator['return']) {
_iterator['return']();
}
cfg = {
modules: {},
baseUrl: ''
};
case 32:
context$2$0.prev = 32;
if (!_didIteratorError) {
context$2$0.next = 35;
break;
dirConfigs.forEach(function (dirCfg) {
if (dirCfg.modules) {
(0, _keys2.default)(dirCfg.modules).forEach(function (name) {
cfg.modules[name] = dirCfg.modules[name];
});
}
throw _iteratorError;
if (dirCfg.baseUrl) cfg.baseUrl = (0, _url.resolve)(cfg.baseUrl, dirCfg.baseUrl);
});
case 35:
return context$2$0.finish(32);
case 36:
return context$2$0.finish(29);
case 37:
return context$2$0.abrupt('return', cfgs);
case 38:
case 'end':
return context$2$0.stop();
_this.cache.configs[dirName] = cfg;
}
}, null, this, [[5, 25, 29, 37], [30,, 32, 36]]);
};
CompilerAdapter.prototype._getConfig = function _getConfig(filePath) {
var dirName, cfg, cachedCfg, dirConfigs;
return _regeneratorRuntime.async(function _getConfig$(context$2$0) {
while (1) switch (context$2$0.prev = context$2$0.next) {
case 0:
dirName = path.dirname(filePath);
cfg = {};
cachedCfg = this.cache.configs[dirName];
return cfg;
})();
}
if (!cachedCfg) {
context$2$0.next = 7;
break;
}
_createLegacyCompilerPromise(code, filename, modules) {
return new _pinkie2.default((resolve, reject) => {
var legacyCompiler = new _legacy.Compiler(code, filename, modules, this.requireReader, this.cache.sourceIndex, this.hammerheadProcessScript);
cfg = cachedCfg;
context$2$0.next = 13;
break;
case 7:
context$2$0.next = 9;
return _regeneratorRuntime.awrap(CompilerAdapter._collectDirConfigs(dirName));
case 9:
dirConfigs = context$2$0.sent;
cfg = {
modules: {},
baseUrl: ''
};
dirConfigs.forEach(function (dirCfg) {
if (dirCfg.modules) {
_Object$keys(dirCfg.modules).forEach(function (name) {
cfg.modules[name] = dirCfg.modules[name];
});
}
if (dirCfg.baseUrl) cfg.baseUrl = _url.resolve(cfg.baseUrl, dirCfg.baseUrl);
});
this.cache.configs[dirName] = cfg;
case 13:
return context$2$0.abrupt('return', cfg);
case 14:
case 'end':
return context$2$0.stop();
}
}, null, this);
};
CompilerAdapter.prototype._createLegacyCompilerPromise = function _createLegacyCompilerPromise(code, filename, modules) {
var _this = this;
return new _pinkie2.default(function (resolve, reject) {
var legacyCompiler = new _legacy.Compiler(code, filename, modules, _this.requireReader, _this.cache.sourceIndex, _this.hammerheadProcessScript);
legacyCompiler.compile(function (errs, out) {
legacyCompiler.compile((errs, out) => {
if (errs) {
var msg = 'There are test compilation errors:\n';
msg += errs.map(function (err) {
return ' * ' + _legacy.getErrMsg(err);
}).join('\n');
msg += errs.map(err => ` * ${(0, _legacy.getErrMsg)(err)}`).join('\n');

@@ -265,89 +185,64 @@ reject(new Error(msg));

});
};
}
CompilerAdapter.prototype._createTests = function _createTests(compiled, filePath, baseUrl, requireJsMapKey, remainderJs) {
var _this2 = this;
_createTests(compiled, filePath, baseUrl, requireJsMapKey, remainderJs) {
var fixture = {
name: compiled.fixture,
path: filePath,
pageUrl: _url.resolve(baseUrl, compiled.page),
pageUrl: (0, _url.resolve)(baseUrl, compiled.page),
authCredentials: compiled.authCredentials,
getSharedJs: function () {
return _this2.cache.requireJsMap[requireJsMapKey] + remainderJs;
}
getSharedJs: () => this.cache.requireJsMap[requireJsMapKey] + remainderJs
};
return _Object$keys(compiled.testsStepData).map(function (testName) {
return {
name: testName,
sourceIndex: _this2.cache.sourceIndex,
stepData: compiled.testsStepData[testName],
fixture: fixture,
isLegacy: true,
pageUrl: fixture.pageUrl,
authCredentials: fixture.authCredentials
};
});
};
return (0, _keys2.default)(compiled.testsStepData).map(testName => ({
name: testName,
sourceIndex: this.cache.sourceIndex,
stepData: compiled.testsStepData[testName],
fixture: fixture,
isLegacy: true,
pageUrl: fixture.pageUrl,
authCredentials: fixture.authCredentials
}));
}
CompilerAdapter.prototype.canCompile = function canCompile(code, filename) {
canCompile(code, filename) {
return (/\.test\.js$/.test(filename) && FIXTURE_RE.test(code) && PAGE_RE.test(code) && TEST_RE.test(code)
);
};
}
CompilerAdapter.prototype.getSupportedExtension = function getSupportedExtension() {
getSupportedExtension() {
return '.test.js';
};
}
CompilerAdapter.prototype.cleanUp = function cleanUp() {
cleanUp() {
// NOTE: Do nothing.
};
}
CompilerAdapter.prototype.compile = function compile(code, filename) {
var _ref, modules, baseUrl, compiled, hash, requireJsMap, remainderJs, requireJsMapKey;
compile(code, filename) {
var _this2 = this;
return _regeneratorRuntime.async(function compile$(context$2$0) {
while (1) switch (context$2$0.prev = context$2$0.next) {
case 0:
context$2$0.next = 2;
return _regeneratorRuntime.awrap(this._getConfig(filename));
return (0, _asyncToGenerator3.default)(function* () {
var _ref2 = yield _this2._getConfig(filename),
modules = _ref2.modules,
baseUrl = _ref2.baseUrl;
case 2:
_ref = context$2$0.sent;
modules = _ref.modules;
baseUrl = _ref.baseUrl;
context$2$0.next = 7;
return _regeneratorRuntime.awrap(this._createLegacyCompilerPromise(code, filename, modules));
var compiled = yield _this2._createLegacyCompilerPromise(code, filename, modules);
case 7:
compiled = context$2$0.sent;
hash = _crypto.createHash('md5');
requireJsMap = this.cache.requireJsMap;
remainderJs = compiled.remainderJs;
//NOTE: solve memory overuse issue by storing requireJs in the suite-level hash-based map
//(see: B237609 - Fixture file compiler memory overuse)
var hash = (0, _crypto.createHash)('md5');
var requireJsMap = _this2.cache.requireJsMap;
var remainderJs = compiled.remainderJs;
hash.update(compiled.requireJs);
hash.update(compiled.requireJs);
requireJsMapKey = hash.digest('hex');
var requireJsMapKey = hash.digest('hex');
if (!requireJsMap[requireJsMapKey]) requireJsMap[requireJsMapKey] = compiled.requireJs;
if (!requireJsMap[requireJsMapKey]) requireJsMap[requireJsMapKey] = compiled.requireJs;
return context$2$0.abrupt('return', this._createTests(compiled, filename, baseUrl, requireJsMapKey, remainderJs));
case 15:
case 'end':
return context$2$0.stop();
}
}, null, this);
};
return CompilerAdapter;
})();
return _this2._createTests(compiled, filename, baseUrl, requireJsMapKey, remainderJs);
})();
}
}
exports.default = CompilerAdapter;
module.exports = exports.default;
// NOTE: walk up in the directories hierarchy and collect test_config.json files
//NOTE: solve memory overuse issue by storing requireJs in the suite-level hash-based map
//(see: B237609 - Fixture file compiler memory overuse)
module.exports = exports['default'];

@@ -13,3 +13,3 @@ 'use strict';

exports.construct = function (fileName, ownerFilename, callback) {
readFile(fileName).then(function (data) {
readFile(fileName).then(data => {
data = stripBom(data);

@@ -27,3 +27,3 @@

callback(null, constructed.ast, constructed.preprocessedCode);
})['catch'](function () {
}).catch(() => {
callback({

@@ -30,0 +30,0 @@ type: ownerFilename ? ErrCodes.FAILED_LOAD_REQUIRE : ErrCodes.READ_FILE_FAILED,

@@ -35,3 +35,3 @@ 'use strict';

exports.TEST_CASE_INIT_STEP_NAME = '-INIT TEST CASE-';
exports.TEST_CASE_NAME_SEPARATOR = ' → ';
exports.TEST_CASE_NAME_SEPARATOR = ' \u2192 ';
exports.TEST_CASE_DEFAULT_NAME_PATTERN = 'Test case at index %s';

@@ -38,0 +38,0 @@

'use strict';
var _keys = require('babel-runtime/core-js/object/keys');
var _keys2 = _interopRequireDefault(_keys);
var _defineProperties = require('babel-runtime/core-js/object/define-properties');
var _defineProperties2 = _interopRequireDefault(_defineProperties);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var path = require('path'),

@@ -67,3 +77,3 @@ fs = require('fs'),

Object.defineProperties(Compiler.prototype, {
(0, _defineProperties2.default)(Compiler.prototype, {
ok: {

@@ -228,3 +238,3 @@ get: function get() {

Object.keys(requireDescriptor.rawMixinsStepData).forEach(function (name) {
(0, _keys2.default)(requireDescriptor.rawMixinsStepData).forEach(function (name) {
if (compiler.rawMixinsStepData[name]) {

@@ -244,9 +254,7 @@ compiler._fixtureErr(ErrCodes.DUPLICATE_MIXIN_NAME_IN_REQUIRE, null, {

Compiler.prototype._analyzeRequires = function (callback) {
var _this = this;
var requireReaderPromises = this.requires.map(function (require) {
return _this.requireReader.read(require, _this.filename, _this.sourceIndex).then(function (res) {
var requireReaderPromises = this.requires.map(require => {
return this.requireReader.read(require, this.filename, this.sourceIndex).then(res => {
var descriptor = res.descriptor;
if (res.fromCache) _this.ok = _this.ok && !descriptor.hasErrs;else _this.errs = _this.errs.concat(res.errs);
if (res.fromCache) this.ok = this.ok && !descriptor.hasErrs;else this.errs = this.errs.concat(res.errs);

@@ -257,7 +265,7 @@ return descriptor;

Promise.all(requireReaderPromises).then(function (descriptors) {
descriptors.forEach(function (descriptor) {
_this._mergeRequireMixins(descriptor);
Promise.all(requireReaderPromises).then(descriptors => {
descriptors.forEach(descriptor => {
this._mergeRequireMixins(descriptor);
if (_this.ok) _this.out.requireJs += descriptor.jsCode;
if (this.ok) this.out.requireJs += descriptor.jsCode;
});

@@ -336,3 +344,3 @@

var compiler = this,
testNames = Object.keys(this.rawTestsStepData);
testNames = (0, _keys2.default)(this.rawTestsStepData);

@@ -419,3 +427,3 @@ testNames.forEach(function (testName) {

return function (readerCallback) {
readFile(testCasesPath).then(function (data) {
readFile(testCasesPath).then(data => {
data = stripBom(data);

@@ -431,3 +439,3 @@

readerCallback();
})['catch'](function () {
}).catch(() => {
compiler._fixtureErr(ErrCodes.FAILED_TO_READ_EXTERNAL_TEST_CASES, 0, { testCasesPath: testCasesPath });

@@ -444,3 +452,3 @@ readerCallback();

Object.keys(this.rawTestsStepData).forEach(function (testName) {
(0, _keys2.default)(this.rawTestsStepData).forEach(function (testName) {
var testStepData = compiler.rawTestsStepData[testName];

@@ -466,3 +474,3 @@

//NOTE: run external test cases analyzers
Object.keys(externalTestCases).forEach(function (testCasesPath) {
(0, _keys2.default)(externalTestCases).forEach(function (testCasesPath) {
externalTestCasesAnalyzers.push(compiler._createExternalTestCasesAnalyzer(testCasesPath, externalTestCases[testCasesPath]));

@@ -469,0 +477,0 @@ });

@@ -0,1 +1,4 @@

'use strict';
exports.__esModule = true;
// --------------------------------------------------------

@@ -6,8 +9,3 @@ // WARNING: this file is used by both the client and the server.

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports['default'] = {
exports.default = {
ACTION_FUNC_NAMES: ['click', 'rclick', 'dblclick', 'drag', 'type', 'wait', 'waitFor', 'hover', 'press', 'select', 'navigateTo', 'upload', 'screenshot'],

@@ -14,0 +12,0 @@

'use strict';
var _classCallCheck = require('babel-runtime/helpers/class-call-check').default;
exports.__esModule = true;
var _regeneratorRuntime = require('babel-runtime/regenerator').default;
var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default').default;
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
exports.__esModule = true;
var _pinkie = require('pinkie');

@@ -15,14 +13,14 @@

var _legacyAnalysisRequire_analyzer = require('./legacy/analysis/require_analyzer');
var _require_analyzer = require('./legacy/analysis/require_analyzer');
var _legacyAnalysisRequire_analyzer2 = _interopRequireDefault(_legacyAnalysisRequire_analyzer);
var _require_analyzer2 = _interopRequireDefault(_require_analyzer);
var _utilsArrayRemove = require('../utils/array-remove');
var _arrayRemove = require('../utils/array-remove');
var _utilsArrayRemove2 = _interopRequireDefault(_utilsArrayRemove);
var _arrayRemove2 = _interopRequireDefault(_arrayRemove);
var RequireReader = (function () {
function RequireReader(descriptorsCache, hammerheadProcessScript) {
_classCallCheck(this, RequireReader);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
class RequireReader {
constructor(descriptorsCache, hammerheadProcessScript) {
this.descriptorsCache = descriptorsCache || {};

@@ -34,94 +32,58 @@ this.readings = [];

RequireReader.prototype._analyzeRequire = function _analyzeRequire(require, filename, sourceIndex) {
return _regeneratorRuntime.async(function _analyzeRequire$(context$2$0) {
var _this = this;
_analyzeRequire(require, filename, sourceIndex) {
var _this = this;
while (1) switch (context$2$0.prev = context$2$0.next) {
case 0:
this.readings.push(require);
return (0, _asyncToGenerator3.default)(function* () {
_this.readings.push(require);
return context$2$0.abrupt('return', new _pinkie2.default(function (resolve) {
_legacyAnalysisRequire_analyzer2.default.run(require, filename, sourceIndex, _this.hammerheadProcessScript, function (errs, descriptor) {
_this.descriptorsCache[require] = descriptor;
return new _pinkie2.default(function (resolve) {
_require_analyzer2.default.run(require, filename, sourceIndex, _this.hammerheadProcessScript, function (errs, descriptor) {
_this.descriptorsCache[require] = descriptor;
_utilsArrayRemove2.default(_this.readings, require);
resolve({ errs: errs, descriptor: descriptor });
(0, _arrayRemove2.default)(_this.readings, require);
resolve({ errs, descriptor });
if (_this.waiters[require]) {
_this.waiters[require].forEach(function (waiter) {
return waiter(descriptor);
});
_this.waiters[require] = null;
}
if (_this.waiters[require]) {
_this.waiters[require].forEach(function (waiter) {
return waiter(descriptor);
});
}));
case 2:
case 'end':
return context$2$0.stop();
}
}, null, this);
};
RequireReader.prototype._waitForReading = function _waitForReading(require) {
return _regeneratorRuntime.async(function _waitForReading$(context$2$0) {
var _this2 = this;
while (1) switch (context$2$0.prev = context$2$0.next) {
case 0:
return context$2$0.abrupt('return', new _pinkie2.default(function (resolve) {
if (!_this2.waiters[require]) _this2.waiters[require] = [];
_this2.waiters[require].push(function (descriptor) {
return resolve({ descriptor: descriptor, fromCache: true });
});
}));
case 1:
case 'end':
return context$2$0.stop();
}
}, null, this);
};
RequireReader.prototype.read = function read(require, filename, sourceIndex) {
return _regeneratorRuntime.async(function read$(context$2$0) {
while (1) switch (context$2$0.prev = context$2$0.next) {
case 0:
if (!this.descriptorsCache[require]) {
context$2$0.next = 2;
break;
_this.waiters[require] = null;
}
});
});
})();
}
return context$2$0.abrupt('return', {
descriptor: this.descriptorsCache[require],
fromCache: true
});
_waitForReading(require) {
var _this2 = this;
case 2:
if (!(this.readings.indexOf(require) > -1)) {
context$2$0.next = 6;
break;
}
return (0, _asyncToGenerator3.default)(function* () {
return new _pinkie2.default(function (resolve) {
if (!_this2.waiters[require]) _this2.waiters[require] = [];
context$2$0.next = 5;
return _regeneratorRuntime.awrap(this._waitForReading(require));
_this2.waiters[require].push(function (descriptor) {
return resolve({ descriptor, fromCache: true });
});
});
})();
}
case 5:
return context$2$0.abrupt('return', context$2$0.sent);
read(require, filename, sourceIndex) {
var _this3 = this;
case 6:
return context$2$0.abrupt('return', this._analyzeRequire(require, filename, sourceIndex));
case 7:
case 'end':
return context$2$0.stop();
return (0, _asyncToGenerator3.default)(function* () {
if (_this3.descriptorsCache[require]) {
return {
descriptor: _this3.descriptorsCache[require],
fromCache: true
};
}
}, null, this);
};
return RequireReader;
})();
if (_this3.readings.indexOf(require) > -1) return yield _this3._waitForReading(require);
return _this3._analyzeRequire(require, filename, sourceIndex);
})();
}
}
exports.default = RequireReader;
module.exports = exports.default;
module.exports = exports['default'];

@@ -0,1 +1,3 @@

"use strict";
/***********************************************************************

@@ -62,4 +64,2 @@

"use strict";
var KEYWORDS = array_to_hash(["break", "case", "catch", "const", "continue", "debugger", "default", "delete", "do", "else", "finally", "for", "function", "if", "in", "instanceof", "new", "return", "switch", "throw", "try", "typeof", "var", "void", "while", "with"]);

@@ -125,3 +125,3 @@

return is_identifier_start(ch) || is_unicode_combining_mark(ch) || is_digit(ch) || is_unicode_connector_punctuation(ch) || ch == "\u200c" // zero-width non-joiner <ZWNJ>
|| ch == "\u200d" // zero-width joiner <ZWJ> (in my ECMA-262 PDF, this is also 200c)
|| ch == "\u200d" // zero-width joiner <ZWJ> (in my ECMA-262 PDF, this is also 200c)
;

@@ -511,3 +511,3 @@ };

var ASSIGNMENT = (function (a, ret, i) {
var ASSIGNMENT = function (a, ret, i) {
while (i < a.length) {

@@ -518,5 +518,5 @@ ret[a[i]] = a[i].substr(0, a[i].length - 1);

return ret;
})(["+=", "-=", "/=", "*=", "%=", ">>=", "<<=", ">>>=", "|=", "^=", "&="], { "=": true }, 0);
}(["+=", "-=", "/=", "*=", "%=", ">>=", "<<=", ">>>=", "|=", "^=", "&="], { "=": true }, 0);
var PRECEDENCE = (function (a, ret) {
var PRECEDENCE = function (a, ret) {
for (var i = 0, n = 1; i < a.length; ++i, ++n) {

@@ -529,3 +529,3 @@ var b = a[i];

return ret;
})([["||"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"]], {});
}([["||"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"]], {});

@@ -685,6 +685,6 @@ var STATEMENTS_WITH_LABELS = array_to_hash(["for", "do", "while", "switch"]);

case "do":
return (function (body) {
return function (body) {
expect_token("keyword", "while");
return as("do", prog1(parenthesised, semicolon), body);
})(in_loop(statement));
}(in_loop(statement));

@@ -788,3 +788,3 @@ case "for":

var function_ = function (in_statement) {
var function_ = function function_(in_statement) {
var name = is("name") ? prog1(S.token.value, next) : null;

@@ -795,3 +795,3 @@ if (in_statement && !name) unexpected();

// arguments
(function (first, a) {
function (first, a) {
while (!is("punc", ")")) {

@@ -805,5 +805,5 @@ if (first) first = false;else expect(",");

return a;
})(true, []),
}(true, []),
// body
(function () {
function () {
++S.in_function;

@@ -816,3 +816,3 @@ var loop = S.in_loop;

return a;
})());
}());
};

@@ -1123,6 +1123,6 @@

return as("toplevel", (function (a) {
return as("toplevel", function (a) {
while (!is("eof")) a.push(statement());
return a;
})([]));
}([]));
};

@@ -1168,3 +1168,3 @@

var warn = function () {};
var warn = function warn() {};

@@ -1171,0 +1171,0 @@ /* -----[ Exports ]----- */

@@ -28,3 +28,3 @@ "use strict";

return w.with_walkers({
"toplevel": function (body) {
"toplevel": function toplevel(body) {
return [this[0], with_scope(this.scope, curry(MAP, body, walk))];

@@ -34,3 +34,3 @@ },

"defun": _lambda,
"new": function (ctor, args) {
"new": function _new(ctor, args) {
if (ctor[0] == "name") {

@@ -54,3 +54,3 @@ if (ctor[1] == "Array" && !scope.has("Array")) {

},
"call": function (expr, args) {
"call": function call(expr, args) {
if (expr[0] == "dot" && expr[1][0] == "string" && args.length == 1 && (args[0][1] > 0 && expr[2] == "substring" || expr[2] == "substr")) {

@@ -57,0 +57,0 @@ return ["call", ["dot", expr[1], "slice"], args];

@@ -0,1 +1,3 @@

"use strict";
/*

@@ -14,4 +16,2 @@ This is a patched version of the uglify-js@1.2.6 module.

//convienence function(src, [options]);
"use strict";
function uglify(orig_code, options) {

@@ -18,0 +18,0 @@ options || (options = {});

'use strict';
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default').default;
exports.__esModule = true;

@@ -17,19 +15,21 @@

var _testRunErrorType = require('./test-run-error/type');
var _type = require('./test-run-error/type');
var _testRunErrorType2 = _interopRequireDefault(_testRunErrorType);
var _type2 = _interopRequireDefault(_type);
var _testRunErrorFormattableAdapter = require('./test-run-error/formattable-adapter');
var _formattableAdapter = require('./test-run-error/formattable-adapter');
var _testRunErrorFormattableAdapter2 = _interopRequireDefault(_testRunErrorFormattableAdapter);
var _formattableAdapter2 = _interopRequireDefault(_formattableAdapter);
var CLIENT_RUNNER_SCRIPT = _readFileRelative.readSync('./client/index.js');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const CLIENT_RUNNER_SCRIPT = (0, _readFileRelative.readSync)('./client/index.js');
exports.default = {
TEST_RUN_ERROR_TYPE: _testRunErrorType2.default,
TEST_RUN_ERROR_TYPE: _type2.default,
CLIENT_RUNNER_SCRIPT: CLIENT_RUNNER_SCRIPT,
Compiler: _compiler2.default,
TestRun: _testRun2.default,
TestRunErrorFormattableAdapter: _testRunErrorFormattableAdapter2.default
TestRunErrorFormattableAdapter: _formattableAdapter2.default
};
module.exports = exports.default;
module.exports = exports['default'];
'use strict';
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default').default;
exports.__esModule = true;

@@ -12,2 +10,4 @@ exports.default = getArraysDiff;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function addDiffIndexPrefix(diff, arrayIndexStr) {

@@ -25,7 +25,7 @@ //NOTE: add gaps with length equal the length of prefix

function getArraysDiff(err, maxStringLength) {
var arrayIndexStr = '[' + err.key + ']: ';
var arrayIndexStr = `[${err.key}]: `;
maxStringLength -= arrayIndexStr.length;
var diff = _object2.default(err, maxStringLength);
var diff = (0, _object2.default)(err, maxStringLength);

@@ -36,3 +36,2 @@ addDiffIndexPrefix(diff, arrayIndexStr);

}
module.exports = exports.default;
module.exports = exports['default'];
'use strict';
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default').default;
exports.__esModule = true;

@@ -12,4 +10,6 @@ exports.default = getDatesDiff;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function formatDateTime(date) {
return _moment2.default(date).format('ddd MMM DD YYYY hh:mm:ss.SSS [GMT]ZZ');
return (0, _moment2.default)(date).format('ddd MMM DD YYYY hh:mm:ss.SSS [GMT]ZZ');
}

@@ -24,3 +24,2 @@

}
module.exports = exports.default;
module.exports = exports['default'];
'use strict';
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default').default;
exports.__esModule = true;

@@ -28,11 +26,12 @@ exports.default = buildDiff;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function buildDiff(err, maxStringLength) {
if (err.isArrays) return _array2.default(err, maxStringLength);
if (err.isObjects) return _object2.default(err, maxStringLength);
if (err.isStrings) return _string2.default(err, maxStringLength);
if (err.isDates) return _date2.default(err);
if (err.isArrays) return (0, _array2.default)(err, maxStringLength);
if (err.isObjects) return (0, _object2.default)(err, maxStringLength);
if (err.isStrings) return (0, _string2.default)(err, maxStringLength);
if (err.isDates) return (0, _date2.default)(err);
return _truncateDiff2.default(err, maxStringLength);
return (0, _truncateDiff2.default)(err, maxStringLength);
}
module.exports = exports.default;
module.exports = exports['default'];
'use strict';
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default').default;
exports.__esModule = true;

@@ -20,9 +18,10 @@ exports.default = getObjectsDiff;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function getObjectsDiff(err, maxStringLength) {
if (err.diffType && err.diffType.isDates) return _date2.default(err);
if (err.diffType && err.diffType.isStrings) return _string2.default(err, maxStringLength);
if (err.diffType && err.diffType.isDates) return (0, _date2.default)(err);
if (err.diffType && err.diffType.isStrings) return (0, _string2.default)(err, maxStringLength);
return _truncateDiff2.default(err, maxStringLength);
return (0, _truncateDiff2.default)(err, maxStringLength);
}
module.exports = exports.default;
module.exports = exports['default'];
'use strict';
exports.__esModule = true;
var _markerPositionCalculators, _cutStringCalculators;
exports.default = getStringsDiff;
var EMPTY_STRING_LENGTH = '""'.length;
var STRING_OVERFLOW_MARKER = '...';
const EMPTY_STRING_LENGTH = '""'.length;
const STRING_OVERFLOW_MARKER = '...';
var OVERFLOW_TYPES = {
const OVERFLOW_TYPES = {
noOverflow: 'noOverflow',

@@ -18,34 +15,44 @@ rightOverflow: 'rightOverflow',

var markerPositionCalculators = (_markerPositionCalculators = {}, _markerPositionCalculators[OVERFLOW_TYPES.noOverflow] = function (str, diffIndex) {
return diffIndex + 1;
}, _markerPositionCalculators[OVERFLOW_TYPES.rightOverflow] = function (str, diffIndex) {
return diffIndex + 1;
}, _markerPositionCalculators[OVERFLOW_TYPES.leftOverflow] = function (str, diffIndex, maxStringLength) {
str = str.substr(1, str.length - EMPTY_STRING_LENGTH);
var markerPositionCalculators = {
[OVERFLOW_TYPES.noOverflow]: (str, diffIndex) => diffIndex + 1,
return diffIndex - (str.length - maxStringLength) + 1;
}, _markerPositionCalculators[OVERFLOW_TYPES.bothSidesOverflow] = function (str, diffIndex, maxStringLength) {
var maxLength = maxStringLength - STRING_OVERFLOW_MARKER.length * 2;
var maxStringOffsetFromMiddle = Math.floor(maxLength / 2);
[OVERFLOW_TYPES.rightOverflow]: (str, diffIndex) => diffIndex + 1,
return STRING_OVERFLOW_MARKER.length + maxStringOffsetFromMiddle + 1;
}, _markerPositionCalculators);
[OVERFLOW_TYPES.leftOverflow]: (str, diffIndex, maxStringLength) => {
str = str.substr(1, str.length - EMPTY_STRING_LENGTH);
var cutStringCalculators = (_cutStringCalculators = {}, _cutStringCalculators[OVERFLOW_TYPES.noOverflow] = function (str) {
return str;
}, _cutStringCalculators[OVERFLOW_TYPES.rightOverflow] = function (str, diffIndex, maxStringLength, quote) {
var maxLength = maxStringLength - STRING_OVERFLOW_MARKER.length;
return diffIndex - (str.length - maxStringLength) + 1;
},
return quote + str.substr(1, maxLength) + STRING_OVERFLOW_MARKER + quote;
}, _cutStringCalculators[OVERFLOW_TYPES.leftOverflow] = function (str, diffIndex, maxStringLength, quote) {
var maxLength = maxStringLength - STRING_OVERFLOW_MARKER.length;
[OVERFLOW_TYPES.bothSidesOverflow]: (str, diffIndex, maxStringLength) => {
var maxLength = maxStringLength - STRING_OVERFLOW_MARKER.length * 2;
var maxStringOffsetFromMiddle = Math.floor(maxLength / 2);
return quote + STRING_OVERFLOW_MARKER + str.substr(str.length - 1 - maxLength, maxLength) + quote;
}, _cutStringCalculators[OVERFLOW_TYPES.bothSidesOverflow] = function (str, diffIndex, maxStringLength, quote) {
var maxLength = maxStringLength - STRING_OVERFLOW_MARKER.length * 2;
var maxStringOffsetFromMiddle = Math.floor(maxLength / 2);
return STRING_OVERFLOW_MARKER.length + maxStringOffsetFromMiddle + 1;
}
};
return quote + STRING_OVERFLOW_MARKER + str.substr(diffIndex + 1 - maxStringOffsetFromMiddle, maxLength) + STRING_OVERFLOW_MARKER + quote;
}, _cutStringCalculators);
var cutStringCalculators = {
[OVERFLOW_TYPES.noOverflow]: str => str,
[OVERFLOW_TYPES.rightOverflow]: (str, diffIndex, maxStringLength, quote) => {
var maxLength = maxStringLength - STRING_OVERFLOW_MARKER.length;
return quote + str.substr(1, maxLength) + STRING_OVERFLOW_MARKER + quote;
},
[OVERFLOW_TYPES.leftOverflow]: (str, diffIndex, maxStringLength, quote) => {
var maxLength = maxStringLength - STRING_OVERFLOW_MARKER.length;
return quote + STRING_OVERFLOW_MARKER + str.substr(str.length - 1 - maxLength, maxLength) + quote;
},
[OVERFLOW_TYPES.bothSidesOverflow]: (str, diffIndex, maxStringLength, quote) => {
var maxLength = maxStringLength - STRING_OVERFLOW_MARKER.length * 2;
var maxStringOffsetFromMiddle = Math.floor(maxLength / 2);
return quote + STRING_OVERFLOW_MARKER + str.substr(diffIndex + 1 - maxStringOffsetFromMiddle, maxLength) + STRING_OVERFLOW_MARKER + quote;
}
};
function cutNewLines(str) {

@@ -105,3 +112,2 @@ return typeof str === 'string' ? str.replace(/(\r\n|\n|\r)/gm, '\\n') : str;

}
module.exports = exports.default;
module.exports = exports['default'];

@@ -5,3 +5,3 @@ 'use strict';

exports.default = truncateDiff;
var STRING_OVERFLOW_MARKER = '...';
const STRING_OVERFLOW_MARKER = '...';

@@ -21,3 +21,2 @@ function cutOverflowString(str, maxStrLength) {

}
module.exports = exports.default;
module.exports = exports['default'];
'use strict';
var _classCallCheck = require('babel-runtime/helpers/class-call-check').default;
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default').default;
exports.__esModule = true;

@@ -15,5 +11,5 @@

var _parse5 = require('parse5');
var _parse = require('parse5');
var _parse52 = _interopRequireDefault(_parse5);
var _parse2 = _interopRequireDefault(_parse);

@@ -24,16 +20,14 @@ var _templates = require('./templates');

var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var renderer = ['string', 'punctuator', 'keyword', 'number', 'regex', 'comment', 'invalid'].reduce(function (syntaxRenderer, tokenType) {
syntaxRenderer[tokenType] = function (str) {
return '<span class="syntax-' + tokenType + '">' + _lodash.escape(str) + '</span>';
};
const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
var renderer = ['string', 'punctuator', 'keyword', 'number', 'regex', 'comment', 'invalid'].reduce((syntaxRenderer, tokenType) => {
syntaxRenderer[tokenType] = str => `<span class="syntax-${tokenType}">${(0, _lodash.escape)(str)}</span>`;
return syntaxRenderer;
}, {});
var TestRunErrorFormattableAdapter = (function () {
function TestRunErrorFormattableAdapter(err, metaInfo) {
_classCallCheck(this, TestRunErrorFormattableAdapter);
class TestRunErrorFormattableAdapter {
constructor(err, metaInfo) {
this.TEMPLATES = _templates2.default;

@@ -45,3 +39,3 @@

_lodash.assignIn(this, err);
(0, _lodash.assignIn)(this, err);

@@ -51,10 +45,10 @@ this.callsite = this.callsite || metaInfo.callsite;

TestRunErrorFormattableAdapter._getSelector = function _getSelector(node) {
var classAttr = _lodash.find(node.attrs, { name: 'class' });
static _getSelector(node) {
var classAttr = (0, _lodash.find)(node.attrs, { name: 'class' });
var cls = classAttr && classAttr.value;
return cls ? node.tagName + ' ' + cls : node.tagName;
};
return cls ? `${node.tagName} ${cls}` : node.tagName;
}
TestRunErrorFormattableAdapter._decorateHtml = function _decorateHtml(node, decorator) {
static _decorateHtml(node, decorator) {
var msg = '';

@@ -64,5 +58,3 @@

if (node.childNodes.length) {
msg += node.childNodes.map(function (childNode) {
return TestRunErrorFormattableAdapter._decorateHtml(childNode, decorator);
}).join('');
msg += node.childNodes.map(childNode => TestRunErrorFormattableAdapter._decorateHtml(childNode, decorator)).join('');
}

@@ -78,34 +70,29 @@

return msg;
};
}
TestRunErrorFormattableAdapter.prototype.getErrorMarkup = function getErrorMarkup(viewportWidth) {
getErrorMarkup(viewportWidth) {
return this.TEMPLATES[this.type](this, viewportWidth);
};
}
TestRunErrorFormattableAdapter.prototype.getCallsiteMarkup = function getCallsiteMarkup() {
getCallsiteMarkup() {
if (!this.callsite) return null;
var code = _highlightEs2.default(this.callsite, renderer);
var code = (0, _highlightEs2.default)(this.callsite, renderer);
var lines = code.split(NEWLINE);
var lastLine = lines.pop();
lastLine = '<div class="code-line-last">' + lastLine + '</div>';
lines = lines.map(function (line) {
return '<div class="code-line"><div class="code-line-src">' + line + '</div></div>';
});
lastLine = `<div class="code-line-last">${lastLine}</div>`;
lines = lines.map(line => `<div class="code-line"><div class="code-line-src">${line}</div></div>`);
return '<div class="code-frame">' + lines.join('') + lastLine + '</div>';
};
return `<div class="code-frame">${lines.join('')}${lastLine}</div>`;
}
TestRunErrorFormattableAdapter.prototype.formatMessage = function formatMessage(decorator, viewportWidth) {
formatMessage(decorator, viewportWidth) {
var msgHtml = this.getErrorMarkup(viewportWidth);
var fragment = _parse52.default.parseFragment(msgHtml);
var fragment = _parse2.default.parseFragment(msgHtml);
return TestRunErrorFormattableAdapter._decorateHtml(fragment, decorator);
};
return TestRunErrorFormattableAdapter;
})();
}
}
exports.default = TestRunErrorFormattableAdapter;
module.exports = exports.default;
module.exports = exports['default'];
'use strict';
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default').default;
exports.__esModule = true;
var _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded;
var _dedent = require('dedent');

@@ -23,16 +19,18 @@

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function escapeNewLines(str) {
return _lodash.escape(str).replace(/(\r\n|\n|\r)/gm, '\\n');
return (0, _lodash.escape)(str).replace(/(\r\n|\n|\r)/gm, '\\n');
}
function getAssertionMsgPrefix(err) {
return err.message ? '"' + _lodash.escape(err.message) + '" assertion' : 'Assertion';
return err.message ? `"${(0, _lodash.escape)(err.message)}" assertion` : 'Assertion';
}
function getDiffHeader(err) {
if (err.isArrays) return 'Arrays differ at index <code>' + err.key + '</code>:';
if (err.isArrays) return `Arrays differ at index <code>${err.key}</code>:`;
if (err.isObjects) return 'Objects differ at the <code>' + _lodash.escape(err.key) + '</code> field:';
if (err.isObjects) return `Objects differ at the <code>${(0, _lodash.escape)(err.key)}</code> field:`;
if (err.isStrings) return 'Strings differ at index <code>' + err.key + '</code>:';
if (err.isStrings) return `Strings differ at index <code>${err.key}</code>:`;

@@ -42,8 +40,10 @@ return '';

function markup(err, msgMarkup) {
var opts = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
function markup(err, msgMarkup, opts = {}) {
msgMarkup = (0, _dedent2.default)(`
<div class="message">${(0, _dedent2.default)(msgMarkup)}</div>
msgMarkup = _dedent2.default('\n <div class="message">' + _dedent2.default(msgMarkup) + '</div>\n\n <strong>Browser:</strong> <span class="user-agent">' + err.userAgent + '</span>\n ');
<strong>Browser:</strong> <span class="user-agent">${err.userAgent}</span>
`);
if (err.screenshotPath) msgMarkup += '\n<div class="screenshot-info"><strong>Screenshot:</strong> <a class="screenshot-path">' + _lodash.escape(err.screenshotPath) + '</a></div>';
if (err.screenshotPath) msgMarkup += `\n<div class="screenshot-info"><strong>Screenshot:</strong> <a class="screenshot-path">${(0, _lodash.escape)(err.screenshotPath)}</a></div>`;

@@ -53,3 +53,3 @@ if (!opts.withoutCallsite) {

if (callsiteMarkup) msgMarkup += '\n\n<strong>Code:</strong>\n' + callsiteMarkup;
if (callsiteMarkup) msgMarkup += `\n\n<strong>Code:</strong>\n${callsiteMarkup}`;
}

@@ -60,76 +60,188 @@

exports.default = (_TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded = {}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.okAssertion] = function (err) {
return markup(err, '\n ' + getAssertionMsgPrefix(err) + ' failed at step "' + _lodash.escape(err.stepName) + '":\n\n <strong>Expected: </strong>not <code>null</code>, not <code>undefined</code>, not <code>false</code>, not <code>NaN</code> and not <code>\'\'</code>\n <strong>Actual: </strong><code>' + escapeNewLines(err.actual) + '</code>\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.notOkAssertion] = function (err) {
return markup(err, '\n ' + getAssertionMsgPrefix(err) + ' failed at step "' + _lodash.escape(err.stepName) + '":\n\n <strong>Expected: </strong><code>null</code>, <code>undefined</code>, <code>false</code>, <code>NaN</code> or <code>\'\'</code>\n <strong>Actual: </strong><code>' + escapeNewLines(err.actual) + '</code>\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.eqAssertion] = function (err, maxStringLength) {
var diff = _assertionDiffs2.default(err, maxStringLength);
var diffMarkerStr = diff.marker ? ' ' + diff.marker : '';
exports.default = {
[_type2.default.okAssertion]: err => markup(err, `
${getAssertionMsgPrefix(err)} failed at step "${(0, _lodash.escape)(err.stepName)}":
return markup(err, '\n ' + getAssertionMsgPrefix(err) + ' failed at step "' + _lodash.escape(err.stepName) + '":\n\n ' + getDiffHeader(err) + '\n\n <strong>Expected: </strong><code>' + escapeNewLines(diff.expected) + '</code>\n <strong>Actual: </strong><code>' + escapeNewLines(diff.actual) + '</code>\n <code>' + diffMarkerStr + '</code>\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.notEqAssertion] = function (err) {
return markup(err, '\n ' + getAssertionMsgPrefix(err) + ' failed at step "' + _lodash.escape(err.stepName) + '":\n\n <strong>Expected: </strong>not <code>' + escapeNewLines(err.actual) + '</code>\n <strong>Actual: </strong><code>' + escapeNewLines(err.actual) + '</code>\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.iframeLoadingTimeout] = function (err) {
return markup(err, '\n IFrame loading timed out.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.inIFrameTargetLoadingTimeout] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n IFrame target loading timed out.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.uncaughtJSError] = function (err) {
if (err.pageDestUrl) {
return markup(err, '\n Uncaught JavaScript error <code>' + _lodash.escape(err.scriptErr) + '</code> on page <a href="' + err.pageDestUrl + '">' + err.pageDestUrl + '</a>\n ');
}
<strong>Expected: </strong>not <code>null</code>, not <code>undefined</code>, not <code>false</code>, not <code>NaN</code> and not <code>''</code>
<strong>Actual: </strong><code>${escapeNewLines(err.actual)}</code>
`),
return markup(err, '\n Uncaught JavaScript error <code>' + _lodash.escape(err.scriptErr) + '</code> on page.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.uncaughtJSErrorInTestCodeStep] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n Uncaught JavaScript error in test code - <code>' + _lodash.escape(err.scriptErr) + '</code>.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.storeDomNodeOrJqueryObject] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n It is not allowed to share the DOM element, jQuery object or a function between test steps via "this" object.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.emptyFirstArgument] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n A target element of the <code>' + err.action + '</code> action has not been found in the DOM tree.\n If this element should be created after animation or a time-consuming operation is finished, use the <code>waitFor</code> action (available for use in code) to pause test execution until this element appears.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.invisibleActionElement] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n A target element <code>' + _lodash.escape(err.element) + '</code> of the <code>' + err.action + '</code> action is not visible.\n If this element should appear when you are hovering over another element, make sure that you properly recorded the <code>hover</code> action.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.incorrectDraggingSecondArgument] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n <code>drag</code> action drop target is incorrect.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.incorrectPressActionArgument] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n <code>press</code> action parameter contains incorrect key code.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.emptyTypeActionArgument] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n The <code>type<code> action\'s parameter text is empty.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.unexpectedDialog] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n Unexpected system <code>' + err.dialog + '</code> dialog <code>' + _lodash.escape(err.message) + '</code> appeared.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.expectedDialogDoesntAppear] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n The expected system <code>' + err.dialog + '</code> dialog did not appear.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.incorrectSelectActionArguments] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n <code>select</code> action\'s parameters contain an incorrect value.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.incorrectWaitActionMillisecondsArgument] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n <code>wait</code> action\'s "milliseconds" parameter should be a positive number.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.incorrectWaitForActionEventArgument] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n <code>waitFor</code> action\'s first parameter should be a function, a CSS selector or an array of CSS selectors.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.incorrectWaitForActionTimeoutArgument] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n <code>waitFor</code> action\'s "timeout" parameter should be a positive number.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.waitForActionTimeoutExceeded] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n <code>waitFor</code> action\'s timeout exceeded.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.incorrectGlobalWaitForActionEventArgument] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n <code>__waitFor</code> action\'s first parameter should be a function.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.incorrectGlobalWaitForActionTimeoutArgument] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n <code>__waitFor</code> action\'s "timeout" parameter should be a positive number.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.globalWaitForActionTimeoutExceeded] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n <code>__waitFor</code> action\'s timeout exceeded.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.emptyIFrameArgument] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n The selector within the <code>inIFrame</code> function returns an empty value.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.iframeArgumentIsNotIFrame] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n The selector within the <code>inIFrame</code> function doesn’t return an iframe element.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.multipleIFrameArgument] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n The selector within the <code>inIFrame</code> function returns more than one iframe element.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.incorrectIFrameArgument] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n The <code>inIFrame</code> function contains an invalid argument.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.uploadCanNotFindFileToUpload] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n Cannot find the following file(s) to upload:\n\n ' + err.filePaths.map(function (path) {
return '<code>' + _lodash.escape(path) + '</code>';
}).join(',\n') + '\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.uploadElementIsNotFileInput] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n <code>upload</code> action argument does not contain a file input element.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.uploadInvalidFilePathArgument] = function (err) {
return markup(err, '\n Error at step "' + _lodash.escape(err.stepName) + '":\n <code>upload</code> action\'s "path" parameter should be a string or an array of strings.\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded[_type2.default.pageNotLoaded] = function (err) {
return markup(err, '\n ' + err.message + '\n ');
}, _TYPE$okAssertion$TYPE$notOkAssertion$TYPE$eqAssertion$TYPE$notEqAssertion$TYPE$iframeLoadingTimeout$TYPE$inIFrameTargetLoadingTimeout$TYPE$uncaughtJSError$TYPE$uncaughtJSErrorInTestCodeStep$TYPE$storeDomNodeOrJqueryObject$TYPE$emptyFirstArgument$TYPE$invisibleActionElement$TYPE$incorrectDraggingSecondArgument$TYPE$incorrectPressActionArgument$TYPE$emptyTypeActionArgument$TYPE$unexpectedDialog$TYPE$expectedDialogDoesntAppear$TYPE$incorrectSelectActionArguments$TYPE$incorrectWaitActionMillisecondsArgument$TYPE$incorrectWaitForActionEventArgument$TYPE$incorrectWaitForActionTimeoutArgument$TYPE$waitForActionTimeoutExceeded$TYPE$incorrectGlobalWaitForActionEventArgument$TYPE$incorrectGlobalWaitForActionTimeoutArgument$TYPE$globalWaitForActionTimeoutExceeded$TYPE$emptyIFrameArgument$TYPE$iframeArgumentIsNotIFrame$TYPE$multipleIFrameArgument$TYPE$incorrectIFrameArgument$TYPE$uploadCanNotFindFileToUpload$TYPE$uploadElementIsNotFileInput$TYPE$uploadInvalidFilePathArgument$TYPE$pageNotLoaded);
module.exports = exports.default;
[_type2.default.notOkAssertion]: err => markup(err, `
${getAssertionMsgPrefix(err)} failed at step "${(0, _lodash.escape)(err.stepName)}":
<strong>Expected: </strong><code>null</code>, <code>undefined</code>, <code>false</code>, <code>NaN</code> or <code>''</code>
<strong>Actual: </strong><code>${escapeNewLines(err.actual)}</code>
`),
[_type2.default.eqAssertion]: (err, maxStringLength) => {
var diff = (0, _assertionDiffs2.default)(err, maxStringLength);
var diffMarkerStr = diff.marker ? ` ${diff.marker}` : '';
return markup(err, `
${getAssertionMsgPrefix(err)} failed at step "${(0, _lodash.escape)(err.stepName)}":
${getDiffHeader(err)}
<strong>Expected: </strong><code>${escapeNewLines(diff.expected)}</code>
<strong>Actual: </strong><code>${escapeNewLines(diff.actual)}</code>
<code>${diffMarkerStr}</code>
`);
},
[_type2.default.notEqAssertion]: err => markup(err, `
${getAssertionMsgPrefix(err)} failed at step "${(0, _lodash.escape)(err.stepName)}":
<strong>Expected: </strong>not <code>${escapeNewLines(err.actual)}</code>
<strong>Actual: </strong><code>${escapeNewLines(err.actual)}</code>
`),
[_type2.default.iframeLoadingTimeout]: err => markup(err, `
IFrame loading timed out.
`),
[_type2.default.inIFrameTargetLoadingTimeout]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
IFrame target loading timed out.
`),
[_type2.default.uncaughtJSError]: err => {
if (err.pageDestUrl) {
return markup(err, `
Uncaught JavaScript error <code>${(0, _lodash.escape)(err.scriptErr)}</code> on page <a href="${err.pageDestUrl}">${err.pageDestUrl}</a>
`);
}
return markup(err, `
Uncaught JavaScript error <code>${(0, _lodash.escape)(err.scriptErr)}</code> on page.
`);
},
[_type2.default.uncaughtJSErrorInTestCodeStep]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
Uncaught JavaScript error in test code - <code>${(0, _lodash.escape)(err.scriptErr)}</code>.
`),
[_type2.default.storeDomNodeOrJqueryObject]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
It is not allowed to share the DOM element, jQuery object or a function between test steps via "this" object.
`),
[_type2.default.emptyFirstArgument]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
A target element of the <code>${err.action}</code> action has not been found in the DOM tree.
If this element should be created after animation or a time-consuming operation is finished, use the <code>waitFor</code> action (available for use in code) to pause test execution until this element appears.
`),
[_type2.default.invisibleActionElement]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
A target element <code>${(0, _lodash.escape)(err.element)}</code> of the <code>${err.action}</code> action is not visible.
If this element should appear when you are hovering over another element, make sure that you properly recorded the <code>hover</code> action.
`),
[_type2.default.incorrectDraggingSecondArgument]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
<code>drag</code> action drop target is incorrect.
`),
[_type2.default.incorrectPressActionArgument]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
<code>press</code> action parameter contains incorrect key code.
`),
[_type2.default.emptyTypeActionArgument]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
The <code>type<code> action's parameter text is empty.
`),
[_type2.default.unexpectedDialog]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
Unexpected system <code>${err.dialog}</code> dialog <code>${(0, _lodash.escape)(err.message)}</code> appeared.
`),
[_type2.default.expectedDialogDoesntAppear]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
The expected system <code>${err.dialog}</code> dialog did not appear.
`),
[_type2.default.incorrectSelectActionArguments]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
<code>select</code> action's parameters contain an incorrect value.
`),
[_type2.default.incorrectWaitActionMillisecondsArgument]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
<code>wait</code> action's "milliseconds" parameter should be a positive number.
`),
[_type2.default.incorrectWaitForActionEventArgument]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
<code>waitFor</code> action's first parameter should be a function, a CSS selector or an array of CSS selectors.
`),
[_type2.default.incorrectWaitForActionTimeoutArgument]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
<code>waitFor</code> action's "timeout" parameter should be a positive number.
`),
[_type2.default.waitForActionTimeoutExceeded]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
<code>waitFor</code> action's timeout exceeded.
`),
[_type2.default.incorrectGlobalWaitForActionEventArgument]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
<code>__waitFor</code> action's first parameter should be a function.
`),
[_type2.default.incorrectGlobalWaitForActionTimeoutArgument]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
<code>__waitFor</code> action's "timeout" parameter should be a positive number.
`),
[_type2.default.globalWaitForActionTimeoutExceeded]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
<code>__waitFor</code> action's timeout exceeded.
`),
[_type2.default.emptyIFrameArgument]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
The selector within the <code>inIFrame</code> function returns an empty value.
`),
[_type2.default.iframeArgumentIsNotIFrame]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
The selector within the <code>inIFrame</code> function doesn’t return an iframe element.
`),
[_type2.default.multipleIFrameArgument]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
The selector within the <code>inIFrame</code> function returns more than one iframe element.
`),
[_type2.default.incorrectIFrameArgument]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
The <code>inIFrame</code> function contains an invalid argument.
`),
[_type2.default.uploadCanNotFindFileToUpload]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
Cannot find the following file(s) to upload:
${err.filePaths.map(path => `<code>${(0, _lodash.escape)(path)}</code>`).join(',\n')}
`),
[_type2.default.uploadElementIsNotFileInput]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
<code>upload</code> action argument does not contain a file input element.
`),
[_type2.default.uploadInvalidFilePathArgument]: err => markup(err, `
Error at step "${(0, _lodash.escape)(err.stepName)}":
<code>upload</code> action's "path" parameter should be a string or an array of strings.
`),
[_type2.default.pageNotLoaded]: err => markup(err, `
${err.message}
`)
};
module.exports = exports['default'];

@@ -0,1 +1,4 @@

'use strict';
exports.__esModule = true;
// -------------------------------------------------------------

@@ -6,5 +9,2 @@ // WARNING: this file is used by both the client and the server.

'use strict';
exports.__esModule = true;
exports.default = {

@@ -45,2 +45,2 @@ okAssertion: 'legacy|okAssertion',

};
module.exports = exports.default;
module.exports = exports['default'];

@@ -0,1 +1,4 @@

'use strict';
exports.__esModule = true;
// --------------------------------------------------------

@@ -6,5 +9,2 @@ // WARNING: this file is used by both the client and the server.

'use strict';
exports.__esModule = true;
exports.default = {

@@ -21,2 +21,2 @@ assertionFailed: 'assertion-failed',

};
module.exports = exports.default;
module.exports = exports['default'];
'use strict';
var _inherits = require('babel-runtime/helpers/inherits').default;
exports.__esModule = true;
var _classCallCheck = require('babel-runtime/helpers/class-call-check').default;
var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
var _regeneratorRuntime = require('babel-runtime/regenerator').default;
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default').default;
var _stringify = require('babel-runtime/core-js/json/stringify');
exports.__esModule = true;
var _stringify2 = _interopRequireDefault(_stringify);

@@ -29,23 +29,21 @@ var _path = require('path');

var _testRunErrorType = require('../test-run-error/type');
var _type = require('../test-run-error/type');
var _testRunErrorType2 = _interopRequireDefault(_testRunErrorType);
var _type2 = _interopRequireDefault(_type);
var _testRunErrorFormattableAdapter = require('../test-run-error/formattable-adapter');
var _formattableAdapter = require('../test-run-error/formattable-adapter');
var _testRunErrorFormattableAdapter2 = _interopRequireDefault(_testRunErrorFormattableAdapter);
var _formattableAdapter2 = _interopRequireDefault(_formattableAdapter);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// Const
var TEST_RUN_TEMPLATE = _readFileRelative.readSync('../client/test-run/index.js.mustache');
var IFRAME_TEST_RUN_TEMPLATE = _readFileRelative.readSync('../client/test-run/iframe.js.mustache');
const TEST_RUN_TEMPLATE = (0, _readFileRelative.readSync)('../client/test-run/index.js.mustache');
const IFRAME_TEST_RUN_TEMPLATE = (0, _readFileRelative.readSync)('../client/test-run/iframe.js.mustache');
var LegacyTestRun = (function (_Session) {
_inherits(LegacyTestRun, _Session);
function LegacyTestRun(test, browserConnection, screenshotCapturer, warningLog, opts) {
_classCallCheck(this, LegacyTestRun);
class LegacyTestRun extends _testcafeHammerhead.Session {
constructor(test, browserConnection, screenshotCapturer, warningLog, opts) {
var uploadsRoot = _path2.default.dirname(test.fixture.path);
_Session.call(this, uploadsRoot);
super(uploadsRoot);

@@ -73,9 +71,7 @@ this.unstable = false;

// Service message handlers
LegacyTestRun.prototype._getPayloadScript = function _getPayloadScript() {
_getPayloadScript() {
var sharedJs = this.test.fixture.getSharedJs();
return _mustache2.default.render(TEST_RUN_TEMPLATE, {
stepNames: JSON.stringify(this.test.stepData.names),
stepNames: (0, _stringify2.default)(this.test.stepData.names),
testSteps: this.test.stepData.js,

@@ -90,8 +86,8 @@ sharedJs: sharedJs,

skipJsErrors: this.opts.skipJsErrors,
nativeDialogsInfo: JSON.stringify(this.nativeDialogsInfo),
nativeDialogsInfo: (0, _stringify2.default)(this.nativeDialogsInfo),
selectorTimeout: this.opts.selectorTimeout
});
};
}
LegacyTestRun.prototype._getIframePayloadScript = function _getIframePayloadScript(iframeWithoutSrc) {
_getIframePayloadScript(iframeWithoutSrc) {
var sharedJs = this.test.fixture.getSharedJs();

@@ -102,3 +98,3 @@ var payloadScript = _mustache2.default.render(IFRAME_TEST_RUN_TEMPLATE, {

skipJsErrors: this.opts.skipJsErrors,
nativeDialogsInfo: JSON.stringify(this.nativeDialogsInfo),
nativeDialogsInfo: (0, _stringify2.default)(this.nativeDialogsInfo),
selectorTimeout: this.opts.selectorTimeout

@@ -108,68 +104,48 @@ });

return iframeWithoutSrc ? 'var isIFrameWithoutSrc = true;' + payloadScript : payloadScript;
};
}
LegacyTestRun.prototype._addError = function _addError(err) {
var screenshotPath, callsite, errAdapter;
return _regeneratorRuntime.async(function _addError$(context$2$0) {
while (1) switch (context$2$0.prev = context$2$0.next) {
case 0:
screenshotPath = null;
callsite = err.__sourceIndex !== void 0 && err.__sourceIndex !== null && this.test.sourceIndex[err.__sourceIndex];
context$2$0.prev = 2;
context$2$0.next = 5;
return _regeneratorRuntime.awrap(this.screenshotCapturer.captureError(err));
_addError(err) {
var _this = this;
case 5:
screenshotPath = context$2$0.sent;
context$2$0.next = 10;
break;
return (0, _asyncToGenerator3.default)(function* () {
var screenshotPath = null;
var callsite = err.__sourceIndex !== void 0 && err.__sourceIndex !== null && _this.test.sourceIndex[err.__sourceIndex];
case 8:
context$2$0.prev = 8;
context$2$0.t0 = context$2$0['catch'](2);
try {
screenshotPath = yield _this.screenshotCapturer.captureError(err);
} catch (e) {
// NOTE: swallow the error silently if we can't take screenshots for some
// reason (e.g. we don't have permissions to write a screenshot file).
}
case 10:
errAdapter = new _testRunErrorFormattableAdapter2.default(err, {
userAgent: this.browserConnection.userAgent,
screenshotPath: screenshotPath,
callsite: callsite
});
var errAdapter = new _formattableAdapter2.default(err, {
userAgent: _this.browserConnection.userAgent,
screenshotPath: screenshotPath,
callsite: callsite
});
this.errs.push(errAdapter);
_this.errs.push(errAdapter);
})();
}
case 12:
case 'end':
return context$2$0.stop();
}
}, null, this, [[2, 8]]);
};
_fatalError(err) {
var _this2 = this;
LegacyTestRun.prototype._fatalError = function _fatalError(err) {
return _regeneratorRuntime.async(function _fatalError$(context$2$0) {
while (1) switch (context$2$0.prev = context$2$0.next) {
case 0:
context$2$0.next = 2;
return _regeneratorRuntime.awrap(this._addError(err));
return (0, _asyncToGenerator3.default)(function* () {
yield _this2._addError(err);
_this2.emit('done');
})();
}
case 2:
this.emit('done');
case 3:
case 'end':
return context$2$0.stop();
}
}, null, this);
};
LegacyTestRun.prototype.getAuthCredentials = function getAuthCredentials() {
getAuthCredentials() {
return this.test.fixture.authCredentials;
};
}
LegacyTestRun.prototype.handleFileDownload = function handleFileDownload() {
handleFileDownload() {
this.isFileDownloading = true;
};
}
LegacyTestRun.prototype.handlePageError = function handlePageError(ctx, errMsg) {
handlePageError(ctx, errMsg) {
this._fatalError({
type: _testRunErrorType2.default.pageNotLoaded,
type: _type2.default.pageNotLoaded,
message: errMsg

@@ -179,22 +155,16 @@ });

ctx.redirect(this.browserConnection.forcedIdleUrl);
};
}
LegacyTestRun.prototype.start = function start() {
return _regeneratorRuntime.async(function start$(context$2$0) {
while (1) switch (context$2$0.prev = context$2$0.next) {
case 0:
// NOTE: required to keep API similar to TestRun. Just do nothing here.
this.emit('start');
start() {
var _this3 = this;
case 1:
case 'end':
return context$2$0.stop();
}
}, null, this);
};
return (0, _asyncToGenerator3.default)(function* () {
// NOTE: required to keep API similar to TestRun. Just do nothing here.
_this3.emit('start');
})();
}
}
return LegacyTestRun;
})(_testcafeHammerhead.Session);
exports.default = LegacyTestRun; // Service message handlers
exports.default = LegacyTestRun;
var ServiceMessages = LegacyTestRun.prototype;

@@ -243,30 +213,17 @@

ServiceMessages[_command2.default.takeScreenshot] = function callee$0$0(msg) {
return _regeneratorRuntime.async(function callee$0$0$(context$1$0) {
while (1) switch (context$1$0.prev = context$1$0.next) {
case 0:
context$1$0.prev = 0;
context$1$0.next = 3;
return _regeneratorRuntime.awrap(this.screenshotCapturer.captureAction(msg));
case 3:
return context$1$0.abrupt('return', context$1$0.sent);
case 6:
context$1$0.prev = 6;
context$1$0.t0 = context$1$0['catch'](0);
return context$1$0.abrupt('return', null);
case 9:
case 'end':
return context$1$0.stop();
ServiceMessages[_command2.default.takeScreenshot] = (() => {
var _ref = (0, _asyncToGenerator3.default)(function* (msg) {
try {
return yield this.screenshotCapturer.captureAction(msg);
} catch (e) {
// NOTE: swallow the error silently if we can't take screenshots for some
// reason (e.g. we don't have permissions to write a screenshot file).
return null;
}
}, null, this, [[0, 6]]);
};
module.exports = exports.default;
});
// NOTE: swallow the error silently if we can't take screenshots for some
// reason (e.g. we don't have permissions to write a screenshot file).
// NOTE: swallow the error silently if we can't take screenshots for some
// reason (e.g. we don't have permissions to write a screenshot file).
return function (_x) {
return _ref.apply(this, arguments);
};
})();
module.exports = exports['default'];

@@ -11,2 +11,2 @@ "use strict";

module.exports = exports.default;
module.exports = exports["default"];
'use strict';
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default').default;
exports.__esModule = true;
exports.default = function (fn) {
return (0, _pify2.default)(fn, _pinkie2.default);
};
var _pify = require('pify');

@@ -15,6 +17,4 @@

exports.default = function (fn) {
return _pify2.default(fn, _pinkie2.default);
};
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
module.exports = exports.default;
module.exports = exports['default'];
{
"name": "testcafe-legacy-api",
"version": "3.1.7",
"version": "3.1.8",
"description": "Legacy API support for TestCafe",

@@ -30,4 +30,5 @@ "main": "lib/index.js",

"babel-plugin-add-module-exports": "^0.2.1",
"babel-preset-es2015": "^6.9.0",
"babel-preset-es2015-loose": "^7.0.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.7.0",
"babel-preset-stage-2": "^6.24.1",
"chai": "^3.4.1",

@@ -37,3 +38,3 @@ "del": "^1.2.0",

"gulp": "^3.9.0",
"gulp-babel": "^5.2.1",
"gulp-babel": "^6.1.1",
"gulp-eslint": "^1.1.1",

@@ -40,0 +41,0 @@ "gulp-if": "^2.0.1",

@@ -0,0 +0,0 @@ # testcafe-legacy-api

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

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

Sorry, the diff of this file is not supported yet

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