botium-core 1.15.10 → 1.15.13

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.
Files changed (84) hide show
  1. package/dist/botium-cjs.js +91 -51
  2. package/dist/botium-cjs.js.map +1 -1
  3. package/dist/botium-es.js +91 -50
  4. package/dist/botium-es.js.map +1 -1
  5. package/package.json +35 -40
  6. package/src/BotDriver.js +1 -1
  7. package/src/Events.js +1 -3
  8. package/src/containers/GridContainer.js +0 -4
  9. package/src/mocks/BotiumMockScripting.js +3 -0
  10. package/src/scripting/Convo.js +10 -0
  11. package/src/utils/boolean.js +39 -0
  12. package/test/compiler/compilercsv.spec.js +34 -0
  13. package/test/compiler/compilermarkdown.spec.js +11 -0
  14. package/test/compiler/compilertxt.spec.js +21 -0
  15. package/test/compiler/compilerxlsx.spec.js +27 -0
  16. package/test/compiler/precompilerjson.spec.js +1 -0
  17. package/test/compiler/precompilermarkdownrasa.spec.js +1 -0
  18. package/test/connectors/pluginconnectorcontainer.spec.js +1 -0
  19. package/test/connectors/simplerest.spec.js +3 -1
  20. package/test/convo/failure.spec.js +1 -0
  21. package/test/convo/fillAndApplyScriptingMemory.spec.js +56 -0
  22. package/test/convo/partialconvo.spec.js +3 -0
  23. package/test/convo/retry.spec.js +9 -0
  24. package/test/convo/retryasserter.spec.js +9 -0
  25. package/test/convo/transcript.spec.js +33 -0
  26. package/test/convo/tree.spec.js +5 -0
  27. package/test/driver/capabilities.spec.js +16 -0
  28. package/test/helpers/capabilitiesutils.spec.js +8 -0
  29. package/test/helpers/transcriptutils.spec.js +1 -0
  30. package/test/hooks/customhooks.spec.js +3 -0
  31. package/test/logichooks/hookfromsrc.spec.js +3 -0
  32. package/test/logichooks/textfromhook.spec.js +1 -0
  33. package/test/plugins/plugins.spec.js +3 -0
  34. package/test/scripting/asserters/buttonsAsserter.spec.js +15 -0
  35. package/test/scripting/asserters/cardsAsserter.spec.js +12 -0
  36. package/test/scripting/asserters/convoStepParameters.spec.js +11 -0
  37. package/test/scripting/asserters/entitiesAsserter.spec.js +1 -0
  38. package/test/scripting/asserters/entityValuesAsserter.spec.js +7 -0
  39. package/test/scripting/asserters/formsAsserter.spec.js +10 -0
  40. package/test/scripting/asserters/intentAsserter.spec.js +4 -0
  41. package/test/scripting/asserters/intentUniqueAsserter.spec.js +2 -0
  42. package/test/scripting/asserters/jsonpathAsserter.spec.js +25 -0
  43. package/test/scripting/asserters/mediaAsserter.spec.js +20 -0
  44. package/test/scripting/asserters/responseLengthAsserter.spec.js +4 -0
  45. package/test/scripting/asserters/textAsserter.spec.js +1 -0
  46. package/test/scripting/asserters/textContainsAllAsserter.spec.js +1 -0
  47. package/test/scripting/asserters/textContainsAnyAsserter.spec.js +1 -0
  48. package/test/scripting/asserters/textEqualsAsserter.spec.js +1 -0
  49. package/test/scripting/asserters/textRegexpAllAsserter.spec.js +1 -0
  50. package/test/scripting/asserters/textRegexpAnyAsserter.spec.js +1 -0
  51. package/test/scripting/asserters/textWildcardAllAsserter.spec.js +1 -0
  52. package/test/scripting/asserters/textWildcardAnyAsserter.spec.js +1 -0
  53. package/test/scripting/asserters/textWildcardExactAllAsserter.spec.js +1 -0
  54. package/test/scripting/asserters/textWildcardExactAnyAsserter.spec.js +1 -0
  55. package/test/scripting/asserters/werAsserter.spec.js +6 -0
  56. package/test/scripting/logichooks/convos/scripting_memory_resolved_args.convo.txt +11 -0
  57. package/test/scripting/logichooks/customConditionalStepLogicHook.spec.js +2 -0
  58. package/test/scripting/logichooks/localvsglobal.spec.js +1 -0
  59. package/test/scripting/logichooks/pauseLogic.spec.js +4 -0
  60. package/test/scripting/logichooks/setClearScriptingMemory.spec.js +17 -0
  61. package/test/scripting/logichooks/updateCustom.spec.js +2 -0
  62. package/test/scripting/matching/matchingmode.spec.js +48 -0
  63. package/test/scripting/scriptingModificator.spec.js +1 -0
  64. package/test/scripting/scriptingmemory/fillScriptingMemoryFromFile.spec.js +4 -0
  65. package/test/scripting/scriptingmemory/regexp.spec.js +1 -0
  66. package/test/scripting/scriptingmemory/useScriptingMemoryForAssertion.spec.js +3 -0
  67. package/test/scripting/txt/decompile.spec.js +20 -0
  68. package/test/scripting/userinputs/buttonInputConvos.spec.js +1 -0
  69. package/test/scripting/userinputs/defaultUserInputs.spec.js +13 -0
  70. package/test/scripting/userinputs/mediaInputConvos.spec.js +10 -0
  71. package/test/scripting/utteranceexpansion/associateByIndex.spec.js +2 -0
  72. package/test/security/allowUnsafe.spec.js +5 -0
  73. package/test/utils.spec.js +2 -0
  74. package/samples/postman/Botium Agent Sample.postman_collection.json +0 -834
  75. package/samples/postman/README.md +0 -5
  76. package/samples/postman/botiumFluent.js +0 -37
  77. package/src/grid/agent/AgentWorker.js +0 -204
  78. package/src/grid/agent/agent.js +0 -96
  79. package/src/grid/agent/agentworkerpool.js +0 -58
  80. package/src/grid/agent/routes.js +0 -353
  81. package/src/grid/agent/swagger.json +0 -327
  82. package/src/grid/agent/swaggerDef.json +0 -8
  83. package/src/grid/agent/views/index.html +0 -39
  84. package/test/grid/agent/client.js +0 -65
@@ -24,6 +24,7 @@ describe('scripting.asserters.mediaAsserter', function () {
24
24
  }
25
25
  })
26
26
  })
27
+
27
28
  it('should succeed on existing card image', async function () {
28
29
  await this.mediaAsserter.assertConvoStep({
29
30
  convoStep: { stepTag: 'test' },
@@ -37,6 +38,7 @@ describe('scripting.asserters.mediaAsserter', function () {
37
38
  }
38
39
  })
39
40
  })
41
+
40
42
  it('should succeed on existing card media', async function () {
41
43
  await this.mediaAsserter.assertConvoStep({
42
44
  convoStep: { stepTag: 'test' },
@@ -55,6 +57,7 @@ describe('scripting.asserters.mediaAsserter', function () {
55
57
  }
56
58
  })
57
59
  })
60
+
58
61
  it('should fail on missing media', async function () {
59
62
  try {
60
63
  await this.mediaAsserter.assertConvoStep({
@@ -74,6 +77,7 @@ describe('scripting.asserters.mediaAsserter', function () {
74
77
  assert.deepEqual(err.context.cause.diff, ['test.jpg'])
75
78
  }
76
79
  })
80
+
77
81
  it('should succeed on not existing media', async function () {
78
82
  await this.mediaAsserter.assertNotConvoStep({
79
83
  convoStep: { stepTag: 'test' },
@@ -87,6 +91,7 @@ describe('scripting.asserters.mediaAsserter', function () {
87
91
  }
88
92
  })
89
93
  })
94
+
90
95
  it('should fail on unexpected media', async function () {
91
96
  try {
92
97
  await this.mediaAsserter.assertNotConvoStep({
@@ -115,6 +120,7 @@ describe('scripting.asserters.mediaAsserter', function () {
115
120
  assert.deepEqual(err.context.cause.diff, ['test1.jpg'])
116
121
  }
117
122
  })
123
+
118
124
  it('should succeed on existing media if has no arg', async function () {
119
125
  await this.mediaAsserter.assertConvoStep({
120
126
  convoStep: { stepTag: 'test' },
@@ -128,6 +134,7 @@ describe('scripting.asserters.mediaAsserter', function () {
128
134
  }
129
135
  })
130
136
  })
137
+
131
138
  it('should fail on no media if has no arg', async function () {
132
139
  try {
133
140
  await this.mediaAsserter.assertConvoStep({ convoStep: { stepTag: 'test' } })
@@ -142,9 +149,11 @@ describe('scripting.asserters.mediaAsserter', function () {
142
149
  assert.deepEqual(err.context.cause.actual, [])
143
150
  }
144
151
  })
152
+
145
153
  it('should succeed on not existing media if has no arg and negated', async function () {
146
154
  await this.mediaAsserter.assertNotConvoStep({ convoStep: { stepTag: 'test' } })
147
155
  })
156
+
148
157
  it('should fail on media if has no arg and negated', async function () {
149
158
  try {
150
159
  await this.mediaAsserter.assertNotConvoStep({
@@ -186,6 +195,7 @@ describe('scripting.asserters.mediaAsserter', function () {
186
195
  }
187
196
  })
188
197
  })
198
+
189
199
  it('should fail on no args with no media', async function () {
190
200
  try {
191
201
  await this.mediaCountAsserter.assertConvoStep({
@@ -200,6 +210,7 @@ describe('scripting.asserters.mediaAsserter', function () {
200
210
  assert.isTrue(err.message.indexOf('Expected Media count 0 to be >0') >= 0)
201
211
  }
202
212
  })
213
+
203
214
  it('should succeed on >=0 with one media', async function () {
204
215
  await this.mediaCountAsserter.assertConvoStep({
205
216
  convoStep: { stepTag: 'test' },
@@ -209,6 +220,7 @@ describe('scripting.asserters.mediaAsserter', function () {
209
220
  }
210
221
  })
211
222
  })
223
+
212
224
  it('should succeed on >0 with one media', async function () {
213
225
  await this.mediaCountAsserter.assertConvoStep({
214
226
  convoStep: { stepTag: 'test' },
@@ -218,6 +230,7 @@ describe('scripting.asserters.mediaAsserter', function () {
218
230
  }
219
231
  })
220
232
  })
233
+
221
234
  it('should fail on >1 with one media', async function () {
222
235
  try {
223
236
  await this.mediaCountAsserter.assertConvoStep({
@@ -232,6 +245,7 @@ describe('scripting.asserters.mediaAsserter', function () {
232
245
  assert.isTrue(err.message.indexOf('Expected Media count 1 to be >1') >= 0)
233
246
  }
234
247
  })
248
+
235
249
  it('should succeed on <=1 with one media', async function () {
236
250
  await this.mediaCountAsserter.assertConvoStep({
237
251
  convoStep: { stepTag: 'test' },
@@ -241,6 +255,7 @@ describe('scripting.asserters.mediaAsserter', function () {
241
255
  }
242
256
  })
243
257
  })
258
+
244
259
  it('should succeed on <2 with one media', async function () {
245
260
  await this.mediaCountAsserter.assertConvoStep({
246
261
  convoStep: { stepTag: 'test' },
@@ -250,6 +265,7 @@ describe('scripting.asserters.mediaAsserter', function () {
250
265
  }
251
266
  })
252
267
  })
268
+
253
269
  it('should succeed on no args with ! no media', async function () {
254
270
  await this.mediaCountAsserter.assertNotConvoStep({
255
271
  convoStep: { stepTag: 'test' },
@@ -259,6 +275,7 @@ describe('scripting.asserters.mediaAsserter', function () {
259
275
  }
260
276
  })
261
277
  })
278
+
262
279
  it('should fail on one args with ! one media', async function () {
263
280
  try {
264
281
  await this.mediaCountAsserter.assertNotConvoStep({
@@ -273,6 +290,7 @@ describe('scripting.asserters.mediaAsserter', function () {
273
290
  assert.isTrue(err.message.indexOf('Not expected Media count 1 to be >0') >= 0)
274
291
  }
275
292
  })
293
+
276
294
  it('should succeed on >1 with ! no media', async function () {
277
295
  await this.mediaCountAsserter.assertNotConvoStep({
278
296
  convoStep: { stepTag: 'test' },
@@ -282,6 +300,7 @@ describe('scripting.asserters.mediaAsserter', function () {
282
300
  }
283
301
  })
284
302
  })
303
+
285
304
  it('should fail on >1 with ! two media', async function () {
286
305
  try {
287
306
  await this.mediaCountAsserter.assertNotConvoStep({
@@ -296,6 +315,7 @@ describe('scripting.asserters.mediaAsserter', function () {
296
315
  assert.isTrue(err.message.indexOf('Not expected Media count 2 to be >1') >= 0)
297
316
  }
298
317
  })
318
+
299
319
  it('should succeed on >3 with rec media', async function () {
300
320
  await this.mediaCountRecAsserter.assertConvoStep({
301
321
  convoStep: { stepTag: 'test' },
@@ -11,6 +11,7 @@ describe('scripting.asserters.responseLengthAsserter', function () {
11
11
  it('should do nothing on no arg', async function () {
12
12
  await this.responseLengthAsserter.assertConvoStep({ })
13
13
  })
14
+
14
15
  it('should succeed on short text', async function () {
15
16
  await this.responseLengthAsserter.assertConvoStep({
16
17
  convoStep: { stepTag: 'test' },
@@ -20,6 +21,7 @@ describe('scripting.asserters.responseLengthAsserter', function () {
20
21
  }
21
22
  })
22
23
  })
24
+
23
25
  it('should succeed on short texts', async function () {
24
26
  await this.responseLengthAsserter.assertConvoStep({
25
27
  convoStep: { stepTag: 'test' },
@@ -32,6 +34,7 @@ describe('scripting.asserters.responseLengthAsserter', function () {
32
34
  }
33
35
  })
34
36
  })
37
+
35
38
  it('should fail on long text', async function () {
36
39
  try {
37
40
  await this.responseLengthAsserter.assertConvoStep({
@@ -50,6 +53,7 @@ describe('scripting.asserters.responseLengthAsserter', function () {
50
53
  assert.equal(err.context.cause.actual, 35)
51
54
  }
52
55
  })
56
+
53
57
  it('should fail on lots of texts', async function () {
54
58
  try {
55
59
  await this.responseLengthAsserter.assertConvoStep({
@@ -37,6 +37,7 @@ describe('scripting.asserters.textAsserter', function () {
37
37
  this.compiler = driver.BuildCompiler()
38
38
  this.container = await driver.Build()
39
39
  })
40
+
40
41
  afterEach(async function () {
41
42
  this.container && await this.container.Clean()
42
43
  })
@@ -23,6 +23,7 @@ describe('scripting.asserters.textContainsAllAsserter', function () {
23
23
  this.compiler = driver.BuildCompiler()
24
24
  this.container = await driver.Build()
25
25
  })
26
+
26
27
  afterEach(async function () {
27
28
  this.container && await this.container.Clean()
28
29
  })
@@ -23,6 +23,7 @@ describe('scripting.asserters.textContainsAnyAsserter', function () {
23
23
  this.compiler = driver.BuildCompiler()
24
24
  this.container = await driver.Build()
25
25
  })
26
+
26
27
  afterEach(async function () {
27
28
  this.container && await this.container.Clean()
28
29
  })
@@ -23,6 +23,7 @@ describe('scripting.asserters.textEqualsAsserter', function () {
23
23
  this.compiler = driver.BuildCompiler()
24
24
  this.container = await driver.Build()
25
25
  })
26
+
26
27
  afterEach(async function () {
27
28
  this.container && await this.container.Clean()
28
29
  })
@@ -23,6 +23,7 @@ describe('scripting.asserters.textRegexpAllAsserter', function () {
23
23
  this.compiler = driver.BuildCompiler()
24
24
  this.container = await driver.Build()
25
25
  })
26
+
26
27
  afterEach(async function () {
27
28
  this.container && await this.container.Clean()
28
29
  })
@@ -23,6 +23,7 @@ describe('scripting.asserters.textRegexpAnyAsserter', function () {
23
23
  this.compiler = driver.BuildCompiler()
24
24
  this.container = await driver.Build()
25
25
  })
26
+
26
27
  afterEach(async function () {
27
28
  this.container && await this.container.Clean()
28
29
  })
@@ -23,6 +23,7 @@ describe('scripting.asserters.textWildcardAllAsserter', function () {
23
23
  this.compiler = driver.BuildCompiler()
24
24
  this.container = await driver.Build()
25
25
  })
26
+
26
27
  afterEach(async function () {
27
28
  this.container && await this.container.Clean()
28
29
  })
@@ -23,6 +23,7 @@ describe('scripting.asserters.textWildcardAnyAsserter', function () {
23
23
  this.compiler = driver.BuildCompiler()
24
24
  this.container = await driver.Build()
25
25
  })
26
+
26
27
  afterEach(async function () {
27
28
  this.container && await this.container.Clean()
28
29
  })
@@ -23,6 +23,7 @@ describe('scripting.asserters.textWildcardExactAllAsserter', function () {
23
23
  this.compiler = driver.BuildCompiler()
24
24
  this.container = await driver.Build()
25
25
  })
26
+
26
27
  afterEach(async function () {
27
28
  this.container && await this.container.Clean()
28
29
  })
@@ -23,6 +23,7 @@ describe('scripting.asserters.textWildcardExactAnyAsserter', function () {
23
23
  this.compiler = driver.BuildCompiler()
24
24
  this.container = await driver.Build()
25
25
  })
26
+
26
27
  afterEach(async function () {
27
28
  this.container && await this.container.Clean()
28
29
  })
@@ -23,6 +23,7 @@ describe('scripting.asserters.werAsserter', function () {
23
23
  this.compiler = driver.BuildCompiler()
24
24
  this.container = await driver.Build()
25
25
  })
26
+
26
27
  afterEach(async function () {
27
28
  this.container && await this.container.Clean()
28
29
  })
@@ -34,6 +35,7 @@ describe('scripting.asserters.werAsserter', function () {
34
35
  assert.equal(this.compiler.convos.length, 1)
35
36
  await this.compiler.convos[0].Run(this.container)
36
37
  })
38
+
37
39
  it('ok (percentage)', async function () {
38
40
  this.compiler.ReadScriptsFromDirectory(path.resolve(__dirname, 'convos', 'wer_threshold_ok_percentage.yml'))
39
41
 
@@ -55,6 +57,7 @@ describe('scripting.asserters.werAsserter', function () {
55
57
  assert.equal(err.message, 'wer_threshold_nok/Line 2: assertion error - Line 2: Word Error Rate (50%) higher than accepted (10%)')
56
58
  }
57
59
  })
60
+
58
61
  it('nok (percentage)', async function () {
59
62
  this.compiler.ReadScriptsFromDirectory(path.resolve(__dirname, 'convos', 'wer_threshold_nok_percentage.yml'))
60
63
 
@@ -76,6 +79,7 @@ describe('scripting.asserters.werAsserter', function () {
76
79
  assert.equal(this.compiler.convos.length, 1)
77
80
  await this.compiler.convos[0].Run(this.container)
78
81
  })
82
+
79
83
  it('ok wildcard (float)', async function () {
80
84
  this.compiler.ReadScriptsFromDirectory(path.resolve(__dirname, 'convos', 'wer_threshold_wildcard_ok_float.yml'))
81
85
 
@@ -83,6 +87,7 @@ describe('scripting.asserters.werAsserter', function () {
83
87
  assert.equal(this.compiler.convos.length, 1)
84
88
  await this.compiler.convos[0].Run(this.container)
85
89
  })
90
+
86
91
  it('nok wildcard (percentage)', async function () {
87
92
  this.compiler.ReadScriptsFromDirectory(path.resolve(__dirname, 'convos', 'wer_threshold_wildcard_nok_percentage.yml'))
88
93
 
@@ -96,6 +101,7 @@ describe('scripting.asserters.werAsserter', function () {
96
101
  assert.equal(err.message, 'wer_threshold_wildcard_nok/Line 2: assertion error - Line 2: Word Error Rate (33%) higher than accepted (1%)')
97
102
  }
98
103
  })
104
+
99
105
  it('nok wildcard (float)', async function () {
100
106
  this.compiler.ReadScriptsFromDirectory(path.resolve(__dirname, 'convos', 'wer_threshold_wildcard_nok_float.yml'))
101
107
 
@@ -0,0 +1,11 @@
1
+ scripting_memory_resolved_args
2
+
3
+ #begin
4
+ SET_SCRIPTING_MEMORY myword|hello
5
+
6
+ #me
7
+ say hello world
8
+
9
+ #bot
10
+ say hello world
11
+ TEXT_CONTAINS_ANY $myword
@@ -54,6 +54,7 @@ describe('convo with custom conditional logichook', function () {
54
54
  this.container = container
55
55
  await this.container.Start()
56
56
  })
57
+
57
58
  afterEach(async function () {
58
59
  await this.container.Stop()
59
60
  await this.container.Clean()
@@ -79,6 +80,7 @@ describe('convo with custom conditional logichook', function () {
79
80
  this.container = container
80
81
  await this.container.Start()
81
82
  })
83
+
82
84
  afterEach(async function () {
83
85
  await this.container.Stop()
84
86
  await this.container.Clean()
@@ -79,6 +79,7 @@ describe('Using local and global hooks together', function () {
79
79
  assert.equal(localAssertionCount, 1)
80
80
  assert.equal(globalAssertionCount, 1)
81
81
  })
82
+
82
83
  it('should use local and global logic hooks', async function () {
83
84
  let localHookCount = 0
84
85
  let globalHookCount = 0
@@ -13,6 +13,7 @@ describe('PauseLogic.pause', function () {
13
13
  assert.isTrue(time >= 1000, `pause should at least diff 1000 but it is ${time}`)
14
14
  })
15
15
  })
16
+
16
17
  it('negative case for pause logic', async function () {
17
18
  const pause = PauseLogic.pause
18
19
  const currentDate = new Date()
@@ -23,6 +24,7 @@ describe('PauseLogic.pause', function () {
23
24
  assert.isTrue(time < 1000, `pause should max diff 1000 but it is ${time}`)
24
25
  })
25
26
  })
27
+
26
28
  it('wrong number of args', async function () {
27
29
  const pause = PauseLogic.pause
28
30
  return pause('Test', 'test', ['500', '300'])
@@ -31,6 +33,7 @@ describe('PauseLogic.pause', function () {
31
33
  assert.instanceOf(err, Error)
32
34
  })
33
35
  })
36
+
34
37
  it('not a number as argument', async function () {
35
38
  const pause = PauseLogic.pause
36
39
  return pause('Test', 'test', ['a500'])
@@ -39,6 +42,7 @@ describe('PauseLogic.pause', function () {
39
42
  assert.instanceOf(err, Error)
40
43
  })
41
44
  })
45
+
42
46
  it('empty argument list', async function () {
43
47
  const pause = PauseLogic.pause
44
48
  return pause('Test', 'test', [])
@@ -126,6 +126,7 @@ describe('scripting.logichooks.global.setClearScriptingMemory', function () {
126
126
  assert.isTrue(err.message.indexOf('Bot response (on Line 6: #me - sending input: $input) "sending input: OUTPUT1" expected to match "sending input: INPUT1"') >= 0)
127
127
  }
128
128
  })
129
+
129
130
  it('should overwrite scripting memory and use for assertions', async function () {
130
131
  this.compiler.ReadScript(path.resolve(__dirname, 'convos'), 'scripting_memory_overwrite_and_check.convo.txt')
131
132
  try {
@@ -139,6 +140,7 @@ describe('scripting.logichooks.global.setClearScriptingMemory', function () {
139
140
  assert.equal(err.transcript.steps[3].scriptingMemory.$myvar, 'VARVALUE1')
140
141
  }
141
142
  })
143
+
142
144
  it('should be assigned from jsonpath', async function () {
143
145
  this.compiler.ReadScript(path.resolve(__dirname, 'convos'), 'scripting_memory_from_jsonpath.convo.txt')
144
146
  assert.equal(this.compiler.convos.length, 1)
@@ -148,6 +150,7 @@ describe('scripting.logichooks.global.setClearScriptingMemory', function () {
148
150
  assert.isDefined(transcript.scriptingMemory.$cardcontent)
149
151
  assert.equal(transcript.scriptingMemory.$cardcontent, 'card content')
150
152
  })
153
+
151
154
  it('should fail on invalid jsonpath', async function () {
152
155
  this.compiler.ReadScript(path.resolve(__dirname, 'convos'), 'scripting_memory_from_invalidjsonpath.convo.txt')
153
156
  try {
@@ -157,6 +160,20 @@ describe('scripting.logichooks.global.setClearScriptingMemory', function () {
157
160
  assert.isTrue(err.message.indexOf('no result from JSON-Path query') >= 0)
158
161
  }
159
162
  })
163
+
164
+ it('should populate resolvedArgs on transcript asserters', async function () {
165
+ this.compiler.ReadScript(path.resolve(__dirname, 'convos'), 'scripting_memory_resolved_args.convo.txt')
166
+ assert.equal(this.compiler.convos.length, 1)
167
+
168
+ const transcript = await this.compiler.convos[0].Run(this.container)
169
+ assert.equal(transcript.steps.length, 2)
170
+
171
+ const botStep = transcript.steps[1]
172
+ assert.isArray(botStep.expected.asserters)
173
+ assert.equal(botStep.expected.asserters.length, 1)
174
+ assert.deepEqual(botStep.expected.asserters[0].args, ['$myword'])
175
+ assert.deepEqual(botStep.expected.asserters[0].resolvedArgs, ['hello'])
176
+ })
160
177
  })
161
178
 
162
179
  describe('global', function () {
@@ -115,6 +115,7 @@ describe('UpdateCustomLogicHook', function () {
115
115
 
116
116
  await this.compiler.convos[0].Run(this.container)
117
117
  })
118
+
118
119
  it('should update me message from begin section skalar', async function () {
119
120
  const myCaps = {
120
121
  [Capabilities.PROJECTNAME]: 'scripting.logichooks',
@@ -130,6 +131,7 @@ describe('UpdateCustomLogicHook', function () {
130
131
 
131
132
  await this.compiler.convos[0].Run(this.container)
132
133
  })
134
+
133
135
  it('should update me message from begin section in partial convo', async function () {
134
136
  const myCaps = {
135
137
  [Capabilities.PROJECTNAME]: 'scripting.logichooks',