@intuitionrobotics/testelot 0.41.67 → 0.41.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/Action.js +125 -196
- package/core/Action.js.map +1 -1
- package/core/Action_Container.js +59 -123
- package/core/Action_Container.js.map +1 -1
- package/core/Action_Custom.js +10 -58
- package/core/Action_Custom.js.map +1 -1
- package/core/Action_Http.js +114 -194
- package/core/Action_Http.js.map +1 -1
- package/core/Action_Log.js +12 -58
- package/core/Action_Log.js.map +1 -1
- package/core/Action_Sleep.js +12 -57
- package/core/Action_Sleep.js.map +1 -1
- package/core/Action_ThrowException.js +11 -56
- package/core/Action_ThrowException.js.map +1 -1
- package/core/ContainerContext.js +14 -16
- package/core/ContainerContext.js.map +1 -1
- package/core/Reporter.js +56 -77
- package/core/Reporter.js.map +1 -1
- package/core/Scenario.js +9 -61
- package/core/Scenario.js.map +1 -1
- package/core/TestException.js +5 -20
- package/core/TestException.js.map +1 -1
- package/core/_base_apis.js +14 -46
- package/core/_base_apis.js.map +1 -1
- package/package.json +1 -1
- package/test-app/AppTester.js +32 -85
- package/test-app/AppTester.js.map +1 -1
package/core/Action_Sleep.js
CHANGED
|
@@ -16,19 +16,6 @@
|
|
|
16
16
|
* See the License for the specific language governing permissions and
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
|
-
var __extends = (this && this.__extends) || (function () {
|
|
20
|
-
var extendStatics = function (d, b) {
|
|
21
|
-
extendStatics = Object.setPrototypeOf ||
|
|
22
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
23
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
24
|
-
return extendStatics(d, b);
|
|
25
|
-
};
|
|
26
|
-
return function (d, b) {
|
|
27
|
-
extendStatics(d, b);
|
|
28
|
-
function __() { this.constructor = d; }
|
|
29
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
30
|
-
};
|
|
31
|
-
})();
|
|
32
19
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
33
20
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
34
21
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -38,56 +25,24 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
38
25
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
39
26
|
});
|
|
40
27
|
};
|
|
41
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
42
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
43
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
44
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
45
|
-
function step(op) {
|
|
46
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
47
|
-
while (_) try {
|
|
48
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
49
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
50
|
-
switch (op[0]) {
|
|
51
|
-
case 0: case 1: t = op; break;
|
|
52
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
53
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
54
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
55
|
-
default:
|
|
56
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
57
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
58
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
59
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
60
|
-
if (t[2]) _.ops.pop();
|
|
61
|
-
_.trys.pop(); continue;
|
|
62
|
-
}
|
|
63
|
-
op = body.call(thisArg, _);
|
|
64
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
65
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69
29
|
exports.Action_Sleep = void 0;
|
|
70
30
|
/**
|
|
71
31
|
* Created by IR on 3/18/17.
|
|
72
32
|
*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
_this.sleepMs = sleepMs;
|
|
81
|
-
return _this;
|
|
33
|
+
const Action_1 = require("./Action");
|
|
34
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
35
|
+
class Action_Sleep extends Action_1.Action {
|
|
36
|
+
constructor(sleepMs) {
|
|
37
|
+
super(Action_Sleep);
|
|
38
|
+
this.setLabel(`Sleeping for ${sleepMs} ms`);
|
|
39
|
+
this.sleepMs = sleepMs;
|
|
82
40
|
}
|
|
83
|
-
|
|
84
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
85
|
-
return
|
|
86
|
-
return [2 /*return*/, ts_common_1.timeout(this.sleepMs)];
|
|
87
|
-
});
|
|
41
|
+
execute() {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
return ts_common_1.timeout(this.sleepMs);
|
|
88
44
|
});
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
}(Action_1.Action));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
92
47
|
exports.Action_Sleep = Action_Sleep;
|
|
93
48
|
//# sourceMappingURL=Action_Sleep.js.map
|
package/core/Action_Sleep.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Action_Sleep.js","sourceRoot":"","sources":["../../src/main/core/Action_Sleep.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG
|
|
1
|
+
{"version":3,"file":"Action_Sleep.js","sourceRoot":"","sources":["../../src/main/core/Action_Sleep.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;;;;;AAEH;;GAEG;AACH,qCAAgC;AAChC,4DAAqD;AAGrD,MAAa,YACZ,SAAQ,eAAM;IAGd,YAAsB,OAAe;QACpC,KAAK,CAAC,YAAY,CAAC,CAAC;QACpB,IAAI,CAAC,QAAQ,CAAC,gBAAgB,OAAO,KAAK,CAAC,CAAC;QAC5C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACxB,CAAC;IAEe,OAAO;;YACtB,OAAO,mBAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9B,CAAC;KAAA;CACD;AAbD,oCAaC"}
|
|
@@ -16,19 +16,6 @@
|
|
|
16
16
|
* See the License for the specific language governing permissions and
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
|
-
var __extends = (this && this.__extends) || (function () {
|
|
20
|
-
var extendStatics = function (d, b) {
|
|
21
|
-
extendStatics = Object.setPrototypeOf ||
|
|
22
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
23
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
24
|
-
return extendStatics(d, b);
|
|
25
|
-
};
|
|
26
|
-
return function (d, b) {
|
|
27
|
-
extendStatics(d, b);
|
|
28
|
-
function __() { this.constructor = d; }
|
|
29
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
30
|
-
};
|
|
31
|
-
})();
|
|
32
19
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
33
20
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
34
21
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -38,55 +25,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
38
25
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
39
26
|
});
|
|
40
27
|
};
|
|
41
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
42
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
43
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
44
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
45
|
-
function step(op) {
|
|
46
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
47
|
-
while (_) try {
|
|
48
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
49
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
50
|
-
switch (op[0]) {
|
|
51
|
-
case 0: case 1: t = op; break;
|
|
52
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
53
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
54
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
55
|
-
default:
|
|
56
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
57
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
58
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
59
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
60
|
-
if (t[2]) _.ops.pop();
|
|
61
|
-
_.trys.pop(); continue;
|
|
62
|
-
}
|
|
63
|
-
op = body.call(thisArg, _);
|
|
64
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
65
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69
29
|
exports.Action_ThrowException = void 0;
|
|
70
30
|
/**
|
|
71
31
|
* Created by IR on 3/18/17.
|
|
72
32
|
*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
_this.message = message;
|
|
80
|
-
return _this;
|
|
33
|
+
const Action_1 = require("./Action");
|
|
34
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
35
|
+
class Action_ThrowException extends Action_1.Action {
|
|
36
|
+
constructor(message, tag) {
|
|
37
|
+
super(Action_ThrowException, tag);
|
|
38
|
+
this.message = message;
|
|
81
39
|
}
|
|
82
|
-
|
|
83
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
84
|
-
|
|
85
|
-
throw new ts_common_1.Exception(this.message);
|
|
86
|
-
});
|
|
40
|
+
execute() {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
throw new ts_common_1.Exception(this.message);
|
|
87
43
|
});
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
}(Action_1.Action));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
91
46
|
exports.Action_ThrowException = Action_ThrowException;
|
|
92
47
|
//# sourceMappingURL=Action_ThrowException.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Action_ThrowException.js","sourceRoot":"","sources":["../../src/main/core/Action_ThrowException.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG
|
|
1
|
+
{"version":3,"file":"Action_ThrowException.js","sourceRoot":"","sources":["../../src/main/core/Action_ThrowException.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;;;;;AAEH;;GAEG;AACH,qCAAgC;AAChC,4DAAuD;AAGvD,MAAa,qBACZ,SAAQ,eAAM;IAGd,YAAsB,OAAe,EAAE,GAAY;QAClD,KAAK,CAAC,qBAAqB,EAAE,GAAG,CAAC,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACxB,CAAC;IAEe,OAAO;;YACtB,MAAM,IAAI,qBAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnC,CAAC;KAAA;CACD;AAZD,sDAYC"}
|
package/core/ContainerContext.js
CHANGED
|
@@ -21,31 +21,29 @@ exports.TypedHashMap = exports.ContextKey = void 0;
|
|
|
21
21
|
/**
|
|
22
22
|
* Created by IR on 3/18/17.
|
|
23
23
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
class ContextKey {
|
|
25
|
+
constructor(key, defaultValue) {
|
|
26
26
|
this.key = key;
|
|
27
27
|
this.defaultValue = defaultValue;
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
}());
|
|
29
|
+
}
|
|
31
30
|
exports.ContextKey = ContextKey;
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
class TypedHashMap {
|
|
32
|
+
constructor() {
|
|
34
33
|
this.map = new Map();
|
|
35
34
|
}
|
|
36
|
-
|
|
35
|
+
delete(key) {
|
|
37
36
|
return this.map.delete(key.key);
|
|
38
|
-
}
|
|
39
|
-
|
|
37
|
+
}
|
|
38
|
+
get(key) {
|
|
40
39
|
return this.map.get(key.key);
|
|
41
|
-
}
|
|
42
|
-
|
|
40
|
+
}
|
|
41
|
+
set(key, value) {
|
|
43
42
|
return this.map.set(key.key, value);
|
|
44
|
-
}
|
|
45
|
-
|
|
43
|
+
}
|
|
44
|
+
clear() {
|
|
46
45
|
return this.map.clear();
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
}());
|
|
46
|
+
}
|
|
47
|
+
}
|
|
50
48
|
exports.TypedHashMap = TypedHashMap;
|
|
51
49
|
//# sourceMappingURL=ContainerContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContainerContext.js","sourceRoot":"","sources":["../../src/main/core/ContainerContext.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEH;;GAEG;AAEH;
|
|
1
|
+
{"version":3,"file":"ContainerContext.js","sourceRoot":"","sources":["../../src/main/core/ContainerContext.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEH;;GAEG;AAEH,MAAa,UAAU;IAItB,YAAY,GAAW,EAAE,YAAgB;QACxC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IAClC,CAAC;CACD;AARD,gCAQC;AAED,MAAa,YAAY;IAAzB;QAES,QAAG,GAAqB,IAAI,GAAG,EAAe,CAAC;IAiBxD,CAAC;IAfA,MAAM,CAAC,GAAoB;QAC1B,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;IAED,GAAG,CAAY,GAA0B;QACxC,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAc,CAAC;IAC3C,CAAC;IAED,GAAG,CAAY,GAA0B,EAAE,KAAgB;QAC1D,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACtC,CAAC;IAEA,KAAK;QACJ,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;CACD;AAnBD,oCAmBC"}
|
package/core/Reporter.js
CHANGED
|
@@ -16,58 +16,42 @@
|
|
|
16
16
|
* See the License for the specific language governing permissions and
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
|
-
var __extends = (this && this.__extends) || (function () {
|
|
20
|
-
var extendStatics = function (d, b) {
|
|
21
|
-
extendStatics = Object.setPrototypeOf ||
|
|
22
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
23
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
24
|
-
return extendStatics(d, b);
|
|
25
|
-
};
|
|
26
|
-
return function (d, b) {
|
|
27
|
-
extendStatics(d, b);
|
|
28
|
-
function __() { this.constructor = d; }
|
|
29
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
30
|
-
};
|
|
31
|
-
})();
|
|
32
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
20
|
exports.ActionReport = exports.Reporter = void 0;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
21
|
+
const Action_1 = require("./Action");
|
|
22
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
23
|
+
class ReportSummary {
|
|
24
|
+
constructor() {
|
|
38
25
|
this.Running = 0;
|
|
39
26
|
this.Skipped = 0;
|
|
40
27
|
this.Success = 0;
|
|
41
28
|
this.Error = 0;
|
|
42
29
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return _this;
|
|
30
|
+
}
|
|
31
|
+
class Reporter extends ts_common_1.Logger {
|
|
32
|
+
constructor() {
|
|
33
|
+
super("Testelot");
|
|
34
|
+
this.reports = {};
|
|
35
|
+
this.summary = new ReportSummary();
|
|
36
|
+
this.reporter = new ReporterLogClient(this);
|
|
37
|
+
ts_common_1.BeLogged.addClient(this.reporter);
|
|
38
|
+
}
|
|
39
|
+
init() {
|
|
54
40
|
}
|
|
55
|
-
|
|
56
|
-
};
|
|
57
|
-
Reporter.prototype.logMessage = function (logMessage) {
|
|
41
|
+
logMessage(logMessage) {
|
|
58
42
|
if (this.report)
|
|
59
43
|
this.report.appendLog(logMessage);
|
|
60
|
-
}
|
|
61
|
-
|
|
44
|
+
}
|
|
45
|
+
onActionStarted(action) {
|
|
62
46
|
this.reports[action.uuid] = this.report = new ActionReport(action);
|
|
63
47
|
// if (action.isContainer())
|
|
64
48
|
this.reporter.onContainerStarted();
|
|
65
|
-
}
|
|
66
|
-
|
|
49
|
+
}
|
|
50
|
+
onActionEnded(action) {
|
|
67
51
|
switch (action.status) {
|
|
68
52
|
case Action_1.Status.Ready:
|
|
69
53
|
case Action_1.Status.Running:
|
|
70
|
-
this.logWarning(
|
|
54
|
+
this.logWarning(`action state: ${action.status} found in action ended event`);
|
|
71
55
|
break;
|
|
72
56
|
case Action_1.Status.Skipped:
|
|
73
57
|
case Action_1.Status.Success:
|
|
@@ -79,62 +63,57 @@ var Reporter = /** @class */ (function (_super) {
|
|
|
79
63
|
this.summary[action.status]++;
|
|
80
64
|
break;
|
|
81
65
|
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
}(ts_common_1.Logger));
|
|
66
|
+
}
|
|
67
|
+
}
|
|
85
68
|
exports.Reporter = Reporter;
|
|
86
|
-
|
|
87
|
-
|
|
69
|
+
class ActionReport {
|
|
70
|
+
constructor(action) {
|
|
88
71
|
this.logs = "";
|
|
89
72
|
this.action = action;
|
|
90
73
|
}
|
|
91
|
-
|
|
74
|
+
getLog() {
|
|
92
75
|
return this.logs;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
this.logs += logMessage
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
}());
|
|
76
|
+
}
|
|
77
|
+
appendLog(logMessage) {
|
|
78
|
+
this.logs += `${logMessage}\n`;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
99
81
|
exports.ActionReport = ActionReport;
|
|
100
82
|
function pad(value, length) {
|
|
101
|
-
|
|
83
|
+
let s = "" + value;
|
|
102
84
|
while (s.length < (length || 2)) {
|
|
103
85
|
s = "0" + s;
|
|
104
86
|
}
|
|
105
87
|
return s;
|
|
106
88
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
return " " + defaultPrefix + " " + ts_common_1.NoColor + "[" + status + "]:" + color + " " + _this.indent;
|
|
89
|
+
class ReporterLogClient extends ts_common_1.LogClient {
|
|
90
|
+
constructor(report) {
|
|
91
|
+
super();
|
|
92
|
+
this.indent = "";
|
|
93
|
+
this.composer = (tag, level) => {
|
|
94
|
+
const successPart = `\x1b[32m${pad(this.report.summary.Success, 3)}${ts_common_1.NoColor}`;
|
|
95
|
+
const skippedPart = `\x1b[90m\x1b[1m${pad(this.report.summary.Skipped, 3)}${ts_common_1.NoColor}`;
|
|
96
|
+
const errorPart = `\x1b[31m${pad(this.report.summary.Error, 3)}${ts_common_1.NoColor}`;
|
|
97
|
+
const status = `${errorPart}/${skippedPart}/${successPart}`;
|
|
98
|
+
const defaultPrefix = ts_common_1.DefaultLogPrefixComposer("Testelot", level);
|
|
99
|
+
const color = ts_common_1.LogClient_Terminal.getColor(level);
|
|
100
|
+
return ` ${defaultPrefix} ${ts_common_1.NoColor}[${status}]:${color} ${this.indent}`;
|
|
120
101
|
};
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
102
|
+
this.report = report;
|
|
103
|
+
this.setComposer(this.composer);
|
|
104
|
+
}
|
|
105
|
+
logMessage(level, bold, prefix, toLog) {
|
|
106
|
+
const color = ts_common_1.LogClient_Terminal.getColor(level, bold);
|
|
107
|
+
const paramsAsStrings = ts_common_1._logger_convertLogParamsToStrings(toLog);
|
|
108
|
+
paramsAsStrings.forEach(str => console.log(ts_common_1._logger_indentNewLineBy(color + prefix, str), ts_common_1.NoColor));
|
|
124
109
|
}
|
|
125
|
-
|
|
126
|
-
var color = ts_common_1.LogClient_Terminal.getColor(level, bold);
|
|
127
|
-
var paramsAsStrings = ts_common_1._logger_convertLogParamsToStrings(toLog);
|
|
128
|
-
paramsAsStrings.forEach(function (str) { return console.log(ts_common_1._logger_indentNewLineBy(color + prefix, str), ts_common_1.NoColor); });
|
|
129
|
-
};
|
|
130
|
-
ReporterLogClient.prototype.onContainerStarted = function () {
|
|
110
|
+
onContainerStarted() {
|
|
131
111
|
this.indent += ReporterLogClient.indent;
|
|
132
|
-
}
|
|
133
|
-
|
|
112
|
+
}
|
|
113
|
+
onContainerEnded() {
|
|
134
114
|
this.indent = this.indent.substring(0, this.indent.length - ReporterLogClient.indent.length);
|
|
135
115
|
return;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}(ts_common_1.LogClient));
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
ReporterLogClient.indent = " ";
|
|
140
119
|
//# sourceMappingURL=Reporter.js.map
|
package/core/Reporter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Reporter.js","sourceRoot":"","sources":["../../src/main/core/Reporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG
|
|
1
|
+
{"version":3,"file":"Reporter.js","sourceRoot":"","sources":["../../src/main/core/Reporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEH,qCAGkB;AAElB,4DAYsC;AAEtC,MAAM,aAAa;IAAnB;QACC,YAAO,GAAW,CAAC,CAAC;QACpB,YAAO,GAAW,CAAC,CAAC;QACpB,YAAO,GAAW,CAAC,CAAC;QACpB,UAAK,GAAW,CAAC,CAAC;IACnB,CAAC;CAAA;AAED,MAAa,QACZ,SAAQ,kBAAM;IASd;QACC,KAAK,CAAC,UAAU,CAAC,CAAC;QARF,YAAO,GAAoC,EAAE,CAAC;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AK,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;QAC1E,CAAC,CAAA;QAfA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC;IAeS,UAAU,CAAC,KAAe,EAAE,IAAa,EAAE,MAAc,EAAE,KAAiB;QACrF,MAAM,KAAK,GAAG,8BAAkB,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACvD,MAAM,eAAe,GAAG,6CAAiC,CAAC,KAAK,CAAC,CAAC;QACjE,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,mCAAuB,CAAC,KAAK,GAAG,MAAM,EAAE,GAAG,CAAC,EAAE,mBAAO,CAAC,CAAC,CAAA;IACnG,CAAC;IAED,kBAAkB;QACjB,IAAI,CAAC,MAAM,IAAI,iBAAiB,CAAC,MAAM,CAAC;IACzC,CAAC;IAED,gBAAgB;QACf,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC7F,OAAO;IACR,CAAC;;AAlCc,wBAAM,GAAW,IAAI,CAAC"}
|
package/core/Scenario.js
CHANGED
|
@@ -16,19 +16,6 @@
|
|
|
16
16
|
* See the License for the specific language governing permissions and
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
|
-
var __extends = (this && this.__extends) || (function () {
|
|
20
|
-
var extendStatics = function (d, b) {
|
|
21
|
-
extendStatics = Object.setPrototypeOf ||
|
|
22
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
23
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
24
|
-
return extendStatics(d, b);
|
|
25
|
-
};
|
|
26
|
-
return function (d, b) {
|
|
27
|
-
extendStatics(d, b);
|
|
28
|
-
function __() { this.constructor = d; }
|
|
29
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
30
|
-
};
|
|
31
|
-
})();
|
|
32
19
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
33
20
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
34
21
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -38,59 +25,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
38
25
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
39
26
|
});
|
|
40
27
|
};
|
|
41
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
42
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
43
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
44
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
45
|
-
function step(op) {
|
|
46
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
47
|
-
while (_) try {
|
|
48
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
49
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
50
|
-
switch (op[0]) {
|
|
51
|
-
case 0: case 1: t = op; break;
|
|
52
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
53
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
54
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
55
|
-
default:
|
|
56
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
57
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
58
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
59
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
60
|
-
if (t[2]) _.ops.pop();
|
|
61
|
-
_.trys.pop(); continue;
|
|
62
|
-
}
|
|
63
|
-
op = body.call(thisArg, _);
|
|
64
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
65
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69
29
|
exports.Scenario = void 0;
|
|
70
30
|
/**
|
|
71
31
|
* Created by IR on 3/18/17.
|
|
72
32
|
*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
case 0:
|
|
82
|
-
// @ts-ignore
|
|
83
|
-
return [4 /*yield*/, this._execute()];
|
|
84
|
-
case 1:
|
|
85
|
-
// @ts-ignore
|
|
86
|
-
_a.sent();
|
|
87
|
-
return [2 /*return*/];
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
}); };
|
|
91
|
-
return _this;
|
|
33
|
+
const Action_Container_1 = require("./Action_Container");
|
|
34
|
+
class Scenario extends Action_Container_1.Action_Container {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(Scenario);
|
|
37
|
+
this.run = () => __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
// @ts-ignore
|
|
39
|
+
yield this._execute();
|
|
40
|
+
});
|
|
92
41
|
}
|
|
93
|
-
|
|
94
|
-
}(Action_Container_1.Action_Container));
|
|
42
|
+
}
|
|
95
43
|
exports.Scenario = Scenario;
|
|
96
44
|
//# sourceMappingURL=Scenario.js.map
|
package/core/Scenario.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Scenario.js","sourceRoot":"","sources":["../../src/main/core/Scenario.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG
|
|
1
|
+
{"version":3,"file":"Scenario.js","sourceRoot":"","sources":["../../src/main/core/Scenario.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;;;;;AAEH;;GAEG;AACH,yDAAoD;AAEpD,MAAa,QACZ,SAAQ,mCAAgB;IAExB;QACC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAGV,QAAG,GAAG,GAAS,EAAE;YACvB,aAAa;YACb,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;QACvB,CAAC,CAAA,CAAC;IALF,CAAC;CAMD;AAXD,4BAWC"}
|
package/core/TestException.js
CHANGED
|
@@ -16,31 +16,16 @@
|
|
|
16
16
|
* See the License for the specific language governing permissions and
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
|
-
var __extends = (this && this.__extends) || (function () {
|
|
20
|
-
var extendStatics = function (d, b) {
|
|
21
|
-
extendStatics = Object.setPrototypeOf ||
|
|
22
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
23
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
24
|
-
return extendStatics(d, b);
|
|
25
|
-
};
|
|
26
|
-
return function (d, b) {
|
|
27
|
-
extendStatics(d, b);
|
|
28
|
-
function __() { this.constructor = d; }
|
|
29
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
30
|
-
};
|
|
31
|
-
})();
|
|
32
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
20
|
exports.TestException = void 0;
|
|
34
21
|
/**
|
|
35
22
|
* Created by IR on 3/18/17.
|
|
36
23
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return _super.call(this, TestException, message) || this;
|
|
24
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
25
|
+
class TestException extends ts_common_1.CustomException {
|
|
26
|
+
constructor(message) {
|
|
27
|
+
super(TestException, message);
|
|
42
28
|
}
|
|
43
|
-
|
|
44
|
-
}(ts_common_1.CustomException));
|
|
29
|
+
}
|
|
45
30
|
exports.TestException = TestException;
|
|
46
31
|
//# sourceMappingURL=TestException.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestException.js","sourceRoot":"","sources":["../../src/main/core/TestException.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG
|
|
1
|
+
{"version":3,"file":"TestException.js","sourceRoot":"","sources":["../../src/main/core/TestException.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEH;;GAEG;AACH,4DAA6D;AAG7D,MAAa,aACZ,SAAQ,2BAAe;IAEvB,YAAY,OAAe;QAC1B,KAAK,CAAC,aAAa,EAAE,OAAO,CAAC,CAAA;IAC9B,CAAC;CACD;AAND,sCAMC"}
|