botium-core 1.13.8 → 1.13.10
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 +214 -1481
- package/dist/botium-cjs.js.map +1 -1
- package/dist/botium-es.js +214 -1481
- package/dist/botium-es.js.map +1 -1
- package/package.json +24 -24
- package/src/scripting/Convo.js +42 -15
- package/src/scripting/MatchFunctions.js +3 -4
- package/src/scripting/ScriptingProvider.js +11 -8
- package/src/scripting/helper.js +61 -2
- package/src/scripting/logichook/asserter/JsonPathAsserter.js +1 -1
- package/src/scripting/logichook/asserter/WerAsserter.js +3 -2
- package/src/scripting/logichook/logichooks/SetScriptingMemoryLogicHook.js +1 -1
- package/test/convo/convos/applyscriptingmemoryinbegin.convo.txt +14 -0
- package/test/convo/fillAndApplyScriptingMemory.spec.js +20 -0
- package/test/scripting/asserters/convos/wer_threshold_wildcard_nok_float.yml +7 -0
- package/test/scripting/asserters/convos/wer_threshold_wildcard_nok_percentage.yml +7 -0
- package/test/scripting/asserters/convos/wer_threshold_wildcard_ok_float.yml +7 -0
- package/test/scripting/asserters/convos/wer_threshold_wildcard_ok_percentage.yml +7 -0
- package/test/scripting/asserters/jsonpathAsserter.spec.js +11 -0
- package/test/scripting/asserters/werAsserter.spec.js +41 -0
- package/test/scripting/matching/matchingmode.spec.js +82 -0
- package/test/scripting/scriptingModificator.spec.js +2 -0
- package/test/scripting/scriptingmemory/convosPartial/buy.convo.txt +7 -0
- package/test/scripting/scriptingmemory/convosPartial/product.scriptingmemory.txt +2 -0
- package/test/scripting/scriptingmemory/convosPartial/sub1.pconvo.txt +7 -0
- package/test/scripting/scriptingmemory/convosPartial/sub2.pconvo.txt +7 -0
- package/test/scripting/scriptingmemory/fillScriptingMemoryFromFile.spec.js +10 -1
|
@@ -9,7 +9,7 @@ const echoConnector = ({ queueBotSays }) => {
|
|
|
9
9
|
const response = `You said: ${msg.messageText.replace('forcereplace1', 'OUTPUT1').replace('forcereplace2', 'OUTPUT2')}`
|
|
10
10
|
const botMsg = {
|
|
11
11
|
sender: 'bot',
|
|
12
|
-
sourceData: msg.sourceData,
|
|
12
|
+
sourceData: msg.sourceData || { request: msg.messageText },
|
|
13
13
|
messageText: response
|
|
14
14
|
}
|
|
15
15
|
queueBotSays(botMsg)
|
|
@@ -289,6 +289,15 @@ describe('scripting.scriptingmemory.fillingScriptingMemoryFromFile', function ()
|
|
|
289
289
|
this.compiler.ExpandScriptingMemoryToConvos()
|
|
290
290
|
assert.equal(this.compiler.convos.length, 1)
|
|
291
291
|
})
|
|
292
|
+
|
|
293
|
+
it('should replace scripting memory in partial convo', async function () {
|
|
294
|
+
this.compiler.ReadScriptsFromDirectory(path.resolve(__dirname, 'convosPartial'))
|
|
295
|
+
this.compiler.ExpandScriptingMemoryToConvos()
|
|
296
|
+
this.compiler.ExpandConvos()
|
|
297
|
+
assert.equal(this.compiler.convos.length, 1)
|
|
298
|
+
|
|
299
|
+
await this.compiler.convos[0].Run(this.container)
|
|
300
|
+
})
|
|
292
301
|
})
|
|
293
302
|
|
|
294
303
|
describe('memoryenabled.originalkept', function () {
|