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-es.js
CHANGED
|
@@ -37,7 +37,7 @@ import express from 'express';
|
|
|
37
37
|
import bodyParser from 'body-parser';
|
|
38
38
|
|
|
39
39
|
var name = "botium-core";
|
|
40
|
-
var version$1 = "1.13.
|
|
40
|
+
var version$1 = "1.13.8";
|
|
41
41
|
var description = "The Selenium for Chatbots";
|
|
42
42
|
var main = "index.js";
|
|
43
43
|
var module = "dist/botium-es.js";
|
|
@@ -1323,7 +1323,7 @@ var LogicHookUtils_1 = class LogicHookUtils {
|
|
|
1323
1323
|
|
|
1324
1324
|
|
|
1325
1325
|
if (hookType === 'asserter') {
|
|
1326
|
-
const asserter = DEFAULT_ASSERTERS.find(asserter => src === asserter.className);
|
|
1326
|
+
const asserter = DEFAULT_ASSERTERS.find(asserter => src === asserter.className || src === asserter.name);
|
|
1327
1327
|
|
|
1328
1328
|
if (asserter) {
|
|
1329
1329
|
return new asserter.Class({
|
|
@@ -1334,7 +1334,7 @@ var LogicHookUtils_1 = class LogicHookUtils {
|
|
|
1334
1334
|
}
|
|
1335
1335
|
|
|
1336
1336
|
if (hookType === 'logichook') {
|
|
1337
|
-
const lh = DEFAULT_LOGIC_HOOKS.find(lh => src === lh.className);
|
|
1337
|
+
const lh = DEFAULT_LOGIC_HOOKS.find(lh => src === lh.className || src === lh.name);
|
|
1338
1338
|
|
|
1339
1339
|
if (lh) {
|
|
1340
1340
|
return new lh.Class({
|
|
@@ -1345,7 +1345,7 @@ var LogicHookUtils_1 = class LogicHookUtils {
|
|
|
1345
1345
|
}
|
|
1346
1346
|
|
|
1347
1347
|
if (hookType === 'userinput') {
|
|
1348
|
-
const ui = DEFAULT_USER_INPUTS.find(ui => src === ui.className);
|
|
1348
|
+
const ui = DEFAULT_USER_INPUTS.find(ui => src === ui.className || src === ui.name);
|
|
1349
1349
|
|
|
1350
1350
|
if (ui) {
|
|
1351
1351
|
return new ui.Class({
|
|
@@ -7074,15 +7074,12 @@ var ScriptingProvider_1 = class ScriptingProvider {
|
|
|
7074
7074
|
// drop unwanted convos
|
|
7075
7075
|
convoFilter: null
|
|
7076
7076
|
}, options);
|
|
7077
|
-
const context = {
|
|
7078
|
-
count: 0
|
|
7079
|
-
};
|
|
7080
7077
|
const expandedConvos = [];
|
|
7081
7078
|
debug$9(`ExpandConvos - Using utterances expansion mode: ${this.caps[Capabilities.SCRIPTING_UTTEXPANSION_MODE]}`);
|
|
7082
7079
|
this.convos.forEach(convo => {
|
|
7083
7080
|
convo.expandPartialConvos();
|
|
7084
7081
|
|
|
7085
|
-
for (const expanded of this._expandConvo(convo, options,
|
|
7082
|
+
for (const expanded of this._expandConvo(convo, options, {})) {
|
|
7086
7083
|
expanded.header.assertionCount = this.GetAssertionCount(expanded);
|
|
7087
7084
|
|
|
7088
7085
|
if (options.justHeader) {
|
|
@@ -7116,13 +7113,9 @@ var ScriptingProvider_1 = class ScriptingProvider {
|
|
|
7116
7113
|
// We hope this.convos does not changes while this iterator is used
|
|
7117
7114
|
|
|
7118
7115
|
const _convosIterable = function* (options) {
|
|
7119
|
-
const context = {
|
|
7120
|
-
count: 0
|
|
7121
|
-
};
|
|
7122
|
-
|
|
7123
7116
|
for (const convo of this.convos) {
|
|
7124
7117
|
convo.expandPartialConvos();
|
|
7125
|
-
yield* this._expandConvo(convo, options,
|
|
7118
|
+
yield* this._expandConvo(convo, options, {});
|
|
7126
7119
|
}
|
|
7127
7120
|
}.bind(this);
|
|
7128
7121
|
|
|
@@ -7388,13 +7381,6 @@ var ScriptingProvider_1 = class ScriptingProvider {
|
|
|
7388
7381
|
});
|
|
7389
7382
|
|
|
7390
7383
|
if (!options.convoFilter || options.convoFilter(expanded)) {
|
|
7391
|
-
context.count++;
|
|
7392
|
-
const logPerEntry = context.count < 10 ? 1 : context.count < 100 ? 10 : context.count < 1000 ? 100 : context.count < 10000 ? 1000 : 10000;
|
|
7393
|
-
|
|
7394
|
-
if (context.count % logPerEntry === 0) {
|
|
7395
|
-
debug$9(`Convo #${context.count} expanded (${expanded.header.name})`);
|
|
7396
|
-
}
|
|
7397
|
-
|
|
7398
7384
|
yield expanded;
|
|
7399
7385
|
}
|
|
7400
7386
|
}
|