botium-core 1.13.6 → 1.13.8
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/dist/botium-cjs.js +6 -20
- package/dist/botium-cjs.js.map +1 -1
- package/dist/botium-es.js +6 -20
- package/dist/botium-es.js.map +1 -1
- package/package.json +1 -1
- package/src/scripting/ScriptingProvider.js +2 -9
- package/src/scripting/logichook/LogicHookUtils.js +3 -3
- package/src/scripting/logichook/asserter/JsonPathAsserter.js +9 -4
- package/test/scripting/asserters/jsonpathAsserter.spec.js +86 -10
package/dist/botium-cjs.js
CHANGED
|
@@ -81,7 +81,7 @@ var express__default = /*#__PURE__*/_interopDefaultLegacy(express);
|
|
|
81
81
|
var bodyParser__default = /*#__PURE__*/_interopDefaultLegacy(bodyParser);
|
|
82
82
|
|
|
83
83
|
var name = "botium-core";
|
|
84
|
-
var version$1 = "1.13.
|
|
84
|
+
var version$1 = "1.13.8";
|
|
85
85
|
var description = "The Selenium for Chatbots";
|
|
86
86
|
var main = "index.js";
|
|
87
87
|
var module$1 = "dist/botium-es.js";
|
|
@@ -1367,7 +1367,7 @@ var LogicHookUtils_1 = class LogicHookUtils {
|
|
|
1367
1367
|
|
|
1368
1368
|
|
|
1369
1369
|
if (hookType === 'asserter') {
|
|
1370
|
-
const asserter = DEFAULT_ASSERTERS.find(asserter => src === asserter.className);
|
|
1370
|
+
const asserter = DEFAULT_ASSERTERS.find(asserter => src === asserter.className || src === asserter.name);
|
|
1371
1371
|
|
|
1372
1372
|
if (asserter) {
|
|
1373
1373
|
return new asserter.Class({
|
|
@@ -1378,7 +1378,7 @@ var LogicHookUtils_1 = class LogicHookUtils {
|
|
|
1378
1378
|
}
|
|
1379
1379
|
|
|
1380
1380
|
if (hookType === 'logichook') {
|
|
1381
|
-
const lh = DEFAULT_LOGIC_HOOKS.find(lh => src === lh.className);
|
|
1381
|
+
const lh = DEFAULT_LOGIC_HOOKS.find(lh => src === lh.className || src === lh.name);
|
|
1382
1382
|
|
|
1383
1383
|
if (lh) {
|
|
1384
1384
|
return new lh.Class({
|
|
@@ -1389,7 +1389,7 @@ var LogicHookUtils_1 = class LogicHookUtils {
|
|
|
1389
1389
|
}
|
|
1390
1390
|
|
|
1391
1391
|
if (hookType === 'userinput') {
|
|
1392
|
-
const ui = DEFAULT_USER_INPUTS.find(ui => src === ui.className);
|
|
1392
|
+
const ui = DEFAULT_USER_INPUTS.find(ui => src === ui.className || src === ui.name);
|
|
1393
1393
|
|
|
1394
1394
|
if (ui) {
|
|
1395
1395
|
return new ui.Class({
|
|
@@ -7118,15 +7118,12 @@ var ScriptingProvider_1 = class ScriptingProvider {
|
|
|
7118
7118
|
// drop unwanted convos
|
|
7119
7119
|
convoFilter: null
|
|
7120
7120
|
}, options);
|
|
7121
|
-
const context = {
|
|
7122
|
-
count: 0
|
|
7123
|
-
};
|
|
7124
7121
|
const expandedConvos = [];
|
|
7125
7122
|
debug$9(`ExpandConvos - Using utterances expansion mode: ${this.caps[Capabilities.SCRIPTING_UTTEXPANSION_MODE]}`);
|
|
7126
7123
|
this.convos.forEach(convo => {
|
|
7127
7124
|
convo.expandPartialConvos();
|
|
7128
7125
|
|
|
7129
|
-
for (const expanded of this._expandConvo(convo, options,
|
|
7126
|
+
for (const expanded of this._expandConvo(convo, options, {})) {
|
|
7130
7127
|
expanded.header.assertionCount = this.GetAssertionCount(expanded);
|
|
7131
7128
|
|
|
7132
7129
|
if (options.justHeader) {
|
|
@@ -7160,13 +7157,9 @@ var ScriptingProvider_1 = class ScriptingProvider {
|
|
|
7160
7157
|
// We hope this.convos does not changes while this iterator is used
|
|
7161
7158
|
|
|
7162
7159
|
const _convosIterable = function* (options) {
|
|
7163
|
-
const context = {
|
|
7164
|
-
count: 0
|
|
7165
|
-
};
|
|
7166
|
-
|
|
7167
7160
|
for (const convo of this.convos) {
|
|
7168
7161
|
convo.expandPartialConvos();
|
|
7169
|
-
yield* this._expandConvo(convo, options,
|
|
7162
|
+
yield* this._expandConvo(convo, options, {});
|
|
7170
7163
|
}
|
|
7171
7164
|
}.bind(this);
|
|
7172
7165
|
|
|
@@ -7432,13 +7425,6 @@ var ScriptingProvider_1 = class ScriptingProvider {
|
|
|
7432
7425
|
});
|
|
7433
7426
|
|
|
7434
7427
|
if (!options.convoFilter || options.convoFilter(expanded)) {
|
|
7435
|
-
context.count++;
|
|
7436
|
-
const logPerEntry = context.count < 10 ? 1 : context.count < 100 ? 10 : context.count < 1000 ? 100 : context.count < 10000 ? 1000 : 10000;
|
|
7437
|
-
|
|
7438
|
-
if (context.count % logPerEntry === 0) {
|
|
7439
|
-
debug$9(`Convo #${context.count} expanded (${expanded.header.name})`);
|
|
7440
|
-
}
|
|
7441
|
-
|
|
7442
7428
|
yield expanded;
|
|
7443
7429
|
}
|
|
7444
7430
|
}
|