goose-abstract-environment
Advanced tools
Comparing version 1.0.10 to 1.0.11
'use strict'; | ||
var _regenerator = require('babel-runtime/regenerator'); | ||
var _regenerator2 = _interopRequireDefault(_regenerator); | ||
var _promise = require('babel-runtime/core-js/promise'); | ||
@@ -7,2 +11,6 @@ | ||
var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator'); | ||
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); | ||
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck'); | ||
@@ -37,2 +45,14 @@ | ||
} | ||
}, { | ||
key: 'addErrBack', | ||
value: function addErrBack(errback) { | ||
this._errbacks.push(errback); | ||
} | ||
}, { | ||
key: 'removeErrBack', | ||
value: function removeErrBack(errback) { | ||
this._errbacks = this._errbacks.filter(function (e) { | ||
return e !== errback; | ||
}); | ||
} | ||
@@ -46,7 +66,26 @@ /** | ||
key: 'prepare', | ||
value: function prepare() { | ||
debug('Preparing...'); | ||
return _promise2.default.resolve(); | ||
} | ||
value: function () { | ||
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() { | ||
return _regenerator2.default.wrap(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
debug('Preparing...'); | ||
return _context.abrupt('return', _promise2.default.resolve()); | ||
case 2: | ||
case 'end': | ||
return _context.stop(); | ||
} | ||
} | ||
}, _callee, this); | ||
})); | ||
function prepare() { | ||
return _ref.apply(this, arguments); | ||
} | ||
return prepare; | ||
}() | ||
/** | ||
@@ -59,7 +98,26 @@ * Tear down environment | ||
key: 'tearDown', | ||
value: function tearDown() { | ||
debug('Tear down...'); | ||
return _promise2.default.resolve(); | ||
} | ||
value: function () { | ||
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() { | ||
return _regenerator2.default.wrap(function _callee2$(_context2) { | ||
while (1) { | ||
switch (_context2.prev = _context2.next) { | ||
case 0: | ||
debug('Tear down...'); | ||
return _context2.abrupt('return', _promise2.default.resolve()); | ||
case 2: | ||
case 'end': | ||
return _context2.stop(); | ||
} | ||
} | ||
}, _callee2, this); | ||
})); | ||
function tearDown() { | ||
return _ref2.apply(this, arguments); | ||
} | ||
return tearDown; | ||
}() | ||
/** | ||
@@ -72,6 +130,25 @@ * EvaluateJs in the environment | ||
key: 'evaluateJs', | ||
value: function evaluateJs() { | ||
throw new Error('You must redefine evaluateJs method in child environment'); | ||
} | ||
value: function () { | ||
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() { | ||
return _regenerator2.default.wrap(function _callee3$(_context3) { | ||
while (1) { | ||
switch (_context3.prev = _context3.next) { | ||
case 0: | ||
throw new Error('You must redefine evaluateJs method in child environment'); | ||
case 1: | ||
case 'end': | ||
return _context3.stop(); | ||
} | ||
} | ||
}, _callee3, this); | ||
})); | ||
function evaluateJs() { | ||
return _ref3.apply(this, arguments); | ||
} | ||
return evaluateJs; | ||
}() | ||
/** | ||
@@ -84,6 +161,25 @@ * Take a snapshot | ||
key: 'snapshot', | ||
value: function snapshot() { | ||
throw new Error('Current environment does not support snapshots'); | ||
} | ||
value: function () { | ||
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() { | ||
return _regenerator2.default.wrap(function _callee4$(_context4) { | ||
while (1) { | ||
switch (_context4.prev = _context4.next) { | ||
case 0: | ||
throw new Error('Current environment does not support snapshots'); | ||
case 1: | ||
case 'end': | ||
return _context4.stop(); | ||
} | ||
} | ||
}, _callee4, this); | ||
})); | ||
function snapshot() { | ||
return _ref4.apply(this, arguments); | ||
} | ||
return snapshot; | ||
}() | ||
/** | ||
@@ -97,33 +193,169 @@ * Wait for page load | ||
key: 'waitForPage', | ||
value: function waitForPage(timeout) { | ||
throw new Error('You must redefine waitForPage method in child environment'); | ||
} | ||
value: function () { | ||
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(timeout) { | ||
return _regenerator2.default.wrap(function _callee5$(_context5) { | ||
while (1) { | ||
switch (_context5.prev = _context5.next) { | ||
case 0: | ||
throw new Error('You must redefine waitForPage method in child environment'); | ||
case 1: | ||
case 'end': | ||
return _context5.stop(); | ||
} | ||
} | ||
}, _callee5, this); | ||
})); | ||
function waitForPage(_x) { | ||
return _ref5.apply(this, arguments); | ||
} | ||
return waitForPage; | ||
}() | ||
}, { | ||
key: 'waitForQuery', | ||
value: function () { | ||
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(uri, timeout) { | ||
return _regenerator2.default.wrap(function _callee6$(_context6) { | ||
while (1) { | ||
switch (_context6.prev = _context6.next) { | ||
case 0: | ||
throw new Error('You must redefine waitForQuery method in child environment'); | ||
case 1: | ||
case 'end': | ||
return _context6.stop(); | ||
} | ||
} | ||
}, _callee6, this); | ||
})); | ||
function waitForQuery(_x2, _x3) { | ||
return _ref6.apply(this, arguments); | ||
} | ||
return waitForQuery; | ||
}() | ||
}, { | ||
key: 'back', | ||
value: function back() { | ||
throw new Error('You must redefine back method in child environment'); | ||
} | ||
value: function () { | ||
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7() { | ||
return _regenerator2.default.wrap(function _callee7$(_context7) { | ||
while (1) { | ||
switch (_context7.prev = _context7.next) { | ||
case 0: | ||
throw new Error('You must redefine back method in child environment'); | ||
case 1: | ||
case 'end': | ||
return _context7.stop(); | ||
} | ||
} | ||
}, _callee7, this); | ||
})); | ||
function back() { | ||
return _ref7.apply(this, arguments); | ||
} | ||
return back; | ||
}() | ||
}, { | ||
key: 'mousedown', | ||
value: function mousedown() { | ||
throw new Error('You must redefine back method in child environment'); | ||
} | ||
key: 'mouseDown', | ||
value: function () { | ||
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() { | ||
return _regenerator2.default.wrap(function _callee8$(_context8) { | ||
while (1) { | ||
switch (_context8.prev = _context8.next) { | ||
case 0: | ||
throw new Error('You must redefine mouseDown method in child environment'); | ||
case 1: | ||
case 'end': | ||
return _context8.stop(); | ||
} | ||
} | ||
}, _callee8, this); | ||
})); | ||
function mouseDown() { | ||
return _ref8.apply(this, arguments); | ||
} | ||
return mouseDown; | ||
}() | ||
}, { | ||
key: 'mouseup', | ||
value: function mouseup() { | ||
throw new Error('You must redefine back method in child environment'); | ||
} | ||
key: 'mouseUp', | ||
value: function () { | ||
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9() { | ||
return _regenerator2.default.wrap(function _callee9$(_context9) { | ||
while (1) { | ||
switch (_context9.prev = _context9.next) { | ||
case 0: | ||
throw new Error('You must redefine mouseUp method in child environment'); | ||
case 1: | ||
case 'end': | ||
return _context9.stop(); | ||
} | ||
} | ||
}, _callee9, this); | ||
})); | ||
function mouseUp() { | ||
return _ref9.apply(this, arguments); | ||
} | ||
return mouseUp; | ||
}() | ||
}, { | ||
key: 'addErrback', | ||
value: function addErrback(errback) { | ||
this._errbacks.push(errback); | ||
} | ||
key: 'mouseClick', | ||
value: function () { | ||
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10() { | ||
return _regenerator2.default.wrap(function _callee10$(_context10) { | ||
while (1) { | ||
switch (_context10.prev = _context10.next) { | ||
case 0: | ||
throw new Error('You must redefine mouseClick method in child environment'); | ||
case 1: | ||
case 'end': | ||
return _context10.stop(); | ||
} | ||
} | ||
}, _callee10, this); | ||
})); | ||
function mouseClick() { | ||
return _ref10.apply(this, arguments); | ||
} | ||
return mouseClick; | ||
}() | ||
}, { | ||
key: 'removeErrback', | ||
value: function removeErrback(errback) { | ||
this._errbacks = this._errbacks.filter(function (e) { | ||
return e !== errback; | ||
}); | ||
} | ||
key: 'mouseMove', | ||
value: function () { | ||
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11() { | ||
return _regenerator2.default.wrap(function _callee11$(_context11) { | ||
while (1) { | ||
switch (_context11.prev = _context11.next) { | ||
case 0: | ||
throw new Error('You must redefine mouseMove method in child environment'); | ||
case 1: | ||
case 'end': | ||
return _context11.stop(); | ||
} | ||
} | ||
}, _callee11, this); | ||
})); | ||
function mouseMove() { | ||
return _ref11.apply(this, arguments); | ||
} | ||
return mouseMove; | ||
}() | ||
/** | ||
@@ -130,0 +362,0 @@ * Get vendor file paths |
{ | ||
"version": "1.0.10", | ||
"version": "1.0.11", | ||
"name": "goose-abstract-environment", | ||
@@ -4,0 +4,0 @@ "main": "lib/AbstractEnvironment.js", |
# Goose Abstract Environment | ||
[![Build Status](https://img.shields.io/circleci/project/github/redco/goose-abstract-environment.svg?style=flat)](https://circleci.com/gh/redco/goose-abstract-environment) | ||
[![Coverage Status](https://img.shields.io/coveralls/redco/goose-abstract-environment/master.svg?style=flat)](https://coveralls.io/github/redco/goose-abstract-environment) | ||
Environment for Goose Parser which allows to create own Environments following Goose Protocol |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31745
392
7