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.cardsAsserter', function () {
24
24
  }
25
25
  })
26
26
  })
27
+
27
28
  it('should succeed on existing card subtext', async function () {
28
29
  await this.cardsAsserter.assertConvoStep({
29
30
  convoStep: { stepTag: 'test' },
@@ -37,6 +38,7 @@ describe('scripting.asserters.cardsAsserter', function () {
37
38
  }
38
39
  })
39
40
  })
41
+
40
42
  it('should succeed on existing card content', async function () {
41
43
  await this.cardsAsserter.assertConvoStep({
42
44
  convoStep: { stepTag: 'test' },
@@ -50,6 +52,7 @@ describe('scripting.asserters.cardsAsserter', function () {
50
52
  }
51
53
  })
52
54
  })
55
+
53
56
  it('should succeed on multiple existing cards', async function () {
54
57
  await this.cardsAsserter.assertConvoStep({
55
58
  convoStep: { stepTag: 'test' },
@@ -66,6 +69,7 @@ describe('scripting.asserters.cardsAsserter', function () {
66
69
  }
67
70
  })
68
71
  })
72
+
69
73
  it('should fail on missing card', async function () {
70
74
  try {
71
75
  await this.cardsAsserter.assertConvoStep({
@@ -84,6 +88,7 @@ describe('scripting.asserters.cardsAsserter', function () {
84
88
  assert.deepEqual(err.context.cause.diff, ['missingcard'])
85
89
  }
86
90
  })
91
+
87
92
  it('should fail on one missing card', async function () {
88
93
  try {
89
94
  await this.cardsAsserter.assertConvoStep({
@@ -112,6 +117,7 @@ describe('scripting.asserters.cardsAsserter', function () {
112
117
  assert.deepEqual(err.context.cause.diff, ['missingcard'])
113
118
  }
114
119
  })
120
+
115
121
  it('should succeed on unexpected card text', async function () {
116
122
  await this.cardsAsserter.assertNotConvoStep({
117
123
  convoStep: { stepTag: 'test' },
@@ -125,6 +131,7 @@ describe('scripting.asserters.cardsAsserter', function () {
125
131
  }
126
132
  })
127
133
  })
134
+
128
135
  it('should fail on one unexpected card', async function () {
129
136
  try {
130
137
  await this.cardsAsserter.assertNotConvoStep({
@@ -153,6 +160,7 @@ describe('scripting.asserters.cardsAsserter', function () {
153
160
  assert.deepEqual(err.context.cause.diff, ['existingcard'])
154
161
  }
155
162
  })
163
+
156
164
  it('should succeed on existing card if has no arg', async function () {
157
165
  await this.cardsAsserter.assertConvoStep({
158
166
  convoStep: { stepTag: 'test' },
@@ -166,6 +174,7 @@ describe('scripting.asserters.cardsAsserter', function () {
166
174
  }
167
175
  })
168
176
  })
177
+
169
178
  it('should fail on no card if has no arg', async function () {
170
179
  try {
171
180
  await this.cardsAsserter.assertConvoStep({ convoStep: { stepTag: 'test' } })
@@ -180,9 +189,11 @@ describe('scripting.asserters.cardsAsserter', function () {
180
189
  assert.deepEqual(err.context.cause.actual, [])
181
190
  }
182
191
  })
192
+
183
193
  it('should succeed on not existing card if has no arg and negated', async function () {
184
194
  await this.cardsAsserter.assertNotConvoStep({ convoStep: { stepTag: 'test' } })
185
195
  })
196
+
186
197
  it('should fail on card if has no arg and negated', async function () {
187
198
  try {
188
199
  await this.cardsAsserter.assertNotConvoStep({
@@ -208,6 +219,7 @@ describe('scripting.asserters.cardsAsserter', function () {
208
219
  }
209
220
  })
210
221
  })
222
+
211
223
  describe('cardsCountAsserter', function () {
212
224
  beforeEach(async function () {
213
225
  this.cardsCountAsserter = new CardsCountAsserter({}, {})
@@ -47,6 +47,7 @@ describe('scripting.asserters.convoStepParametersForAssert', function () {
47
47
  this.compiler = driver.BuildCompiler()
48
48
  this.container = await driver.Build()
49
49
  })
50
+
50
51
  afterEach(async function () {
51
52
  await this.container.Stop()
52
53
  await this.container.Clean()
@@ -64,6 +65,7 @@ describe('scripting.asserters.convoStepParametersForAssert', function () {
64
65
  assert.isTrue(err.message.indexOf('"You said Hello" expected to match "Hello"') >= 0)
65
66
  }
66
67
  })
68
+
67
69
  it('should not accept bad chatbot response on exact match defined on step even with WER asserter', async function () {
68
70
  this.compiler.ReadScript(path.resolve(__dirname, 'convos'), 'convo_step_parameter_matchmode_failed_wer.convo.txt')
69
71
  assert.equal(this.compiler.convos.length, 1)
@@ -84,36 +86,42 @@ describe('scripting.asserters.convoStepParametersForAssert', function () {
84
86
 
85
87
  await this.compiler.convos[0].Run(this.container)
86
88
  })
89
+
87
90
  it('should skip optional bot message', async function () {
88
91
  this.compiler.ReadScript(path.resolve(__dirname, 'convos'), 'convo_step_parameter_optional_with_timeout.convo.txt')
89
92
  assert.equal(this.compiler.convos.length, 1)
90
93
 
91
94
  await this.compiler.convos[0].Run(this.container)
92
95
  })
96
+
93
97
  it('should retry until succesful asserters', async function () {
94
98
  this.compiler.ReadScript(path.resolve(__dirname, 'convos'), 'convo_step_parameter_retry_asserters_good.convo.txt')
95
99
  assert.equal(this.compiler.convos.length, 1)
96
100
 
97
101
  await this.compiler.convos[0].Run(this.container)
98
102
  })
103
+
99
104
  it('should retry until succesful asserters all', async function () {
100
105
  this.compiler.ReadScript(path.resolve(__dirname, 'convos'), 'convo_step_parameter_retry_asserters_all_good.convo.txt')
101
106
  assert.equal(this.compiler.convos.length, 1)
102
107
 
103
108
  await this.compiler.convos[0].Run(this.container)
104
109
  })
110
+
105
111
  it('should retry until succesful main, configured in begin', async function () {
106
112
  this.compiler.ReadScript(path.resolve(__dirname, 'convos'), 'convo_step_parameter_retry_main_good_begin.convo.txt')
107
113
  assert.equal(this.compiler.convos.length, 1)
108
114
 
109
115
  await this.compiler.convos[0].Run(this.container)
110
116
  })
117
+
111
118
  it('should retry until succesful asserters, configured by cap', async function () {
112
119
  this.compiler.ReadScript(path.resolve(__dirname, 'convos'), 'convo_step_parameter_retry_asserters_good_global.convo.txt')
113
120
  assert.equal(this.compiler.convos.length, 1)
114
121
 
115
122
  await this.compiler.convos[0].Run(this.container)
116
123
  })
124
+
117
125
  it('should retry until timeout main', async function () {
118
126
  this.compiler.ReadScript(path.resolve(__dirname, 'convos'), 'convo_step_parameter_retry_main_botium_timeout.convo.txt')
119
127
  assert.equal(this.compiler.convos.length, 1)
@@ -125,6 +133,7 @@ describe('scripting.asserters.convoStepParametersForAssert', function () {
125
133
  assert.isTrue(err.message.indexOf('error waiting for bot - Bot did not respond within 1s') >= 0)
126
134
  }
127
135
  })
136
+
128
137
  it('should retry until timeout asserter', async function () {
129
138
  this.compiler.ReadScript(path.resolve(__dirname, 'convos'), 'convo_step_parameter_retry_asserters_botium_timeout.convo.txt')
130
139
  assert.equal(this.compiler.convos.length, 1)
@@ -136,6 +145,7 @@ describe('scripting.asserters.convoStepParametersForAssert', function () {
136
145
  assert.isTrue(err.message.indexOf('error waiting for bot - Bot did not respond within 1s') >= 0)
137
146
  }
138
147
  })
148
+
139
149
  it('should not retry on not retriable error', async function () {
140
150
  this.compiler.ReadScript(path.resolve(__dirname, 'convos'), 'convo_step_parameter_retry_main_but_no_button.convo.txt')
141
151
  assert.equal(this.compiler.convos.length, 1)
@@ -147,6 +157,7 @@ describe('scripting.asserters.convoStepParametersForAssert', function () {
147
157
  assert.isTrue(err.message.indexOf('Expected button(s) with text "some not existing button"') >= 0)
148
158
  }
149
159
  })
160
+
150
161
  it('should retry until every retriable is succesful', async function () {
151
162
  this.compiler.ReadScript(path.resolve(__dirname, 'convos'), 'convo_step_parameter_retry_main_and_asserter.convo.txt')
152
163
  assert.equal(this.compiler.convos.length, 1)
@@ -110,6 +110,7 @@ describe('scripting.asserters.entitiesAsserter', function () {
110
110
  { product: -1 }
111
111
  )
112
112
  })
113
+
113
114
  it('expected 1... entities, found 3 other enitities, should fail', async function () {
114
115
  return _assert(
115
116
  ['product', '...'],
@@ -77,6 +77,7 @@ describe('scripting.asserters.entityValuesAsserter', function () {
77
77
  { e4: 1 }
78
78
  )
79
79
  })
80
+
80
81
  it('expected 3 entities, found 4 entities, negative case, details', async function () {
81
82
  try {
82
83
  await asserter.assertConvoStep({
@@ -111,6 +112,7 @@ describe('scripting.asserters.entityValuesAsserter', function () {
111
112
  { e1: -1 }
112
113
  )
113
114
  })
115
+
114
116
  it('expected 1... entities, found 1 entities, positive case', async function () {
115
117
  return _assert(
116
118
  ['e1', '...'],
@@ -118,6 +120,7 @@ describe('scripting.asserters.entityValuesAsserter', function () {
118
120
  { e1: -1, e2: 1 }
119
121
  )
120
122
  })
123
+
121
124
  it('Joker match multiple, positive case', async function () {
122
125
  return _assert(
123
126
  ['pre1post1', 'pre1'],
@@ -125,6 +128,7 @@ describe('scripting.asserters.entityValuesAsserter', function () {
125
128
  { pre1post2: 1 }
126
129
  )
127
130
  })
131
+
128
132
  it('Joker match multiple, reversed order, positive case', async function () {
129
133
  return _assert(
130
134
  ['pre1', 'pre1post1'],
@@ -132,6 +136,7 @@ describe('scripting.asserters.entityValuesAsserter', function () {
132
136
  { pre1post2: 1 }
133
137
  )
134
138
  })
139
+
135
140
  it('Joker match, just one match, negative case', async function () {
136
141
  return _assert(
137
142
  ['pre1'],
@@ -139,6 +144,7 @@ describe('scripting.asserters.entityValuesAsserter', function () {
139
144
  { pre1post1: 1, pre1post2: 1 }
140
145
  )
141
146
  })
147
+
142
148
  it('Joker match, just one match, reversed order, negative case', async function () {
143
149
  return _assert(
144
150
  ['pre1'],
@@ -146,6 +152,7 @@ describe('scripting.asserters.entityValuesAsserter', function () {
146
152
  { pre1post1: 1, pre1post2: 1 }
147
153
  )
148
154
  })
155
+
149
156
  it('Joker match, multiple by same expected, negative case', async function () {
150
157
  return _assert(
151
158
  ['pre1', 'pre1'],
@@ -21,6 +21,7 @@ describe('scripting.asserters.formsAsserter', function () {
21
21
  }
22
22
  })
23
23
  })
24
+
24
25
  it('should succeed on existing card form', async function () {
25
26
  await this.formsAsserter.assertConvoStep({
26
27
  convoStep: { stepTag: 'test' },
@@ -38,6 +39,7 @@ describe('scripting.asserters.formsAsserter', function () {
38
39
  }
39
40
  })
40
41
  })
42
+
41
43
  it('should succeed on existing card forms', async function () {
42
44
  await this.formsAsserter.assertConvoStep({
43
45
  convoStep: { stepTag: 'test' },
@@ -60,6 +62,7 @@ describe('scripting.asserters.formsAsserter', function () {
60
62
  }
61
63
  })
62
64
  })
65
+
63
66
  it('should succeed on existing card form (by label)', async function () {
64
67
  await this.formsAsserter.assertConvoStep({
65
68
  convoStep: { stepTag: 'test' },
@@ -77,6 +80,7 @@ describe('scripting.asserters.formsAsserter', function () {
77
80
  }
78
81
  })
79
82
  })
83
+
80
84
  it('should fail on missing form', async function () {
81
85
  try {
82
86
  await this.formsAsserter.assertConvoStep({
@@ -102,6 +106,7 @@ describe('scripting.asserters.formsAsserter', function () {
102
106
  assert.deepEqual(err.context.cause.diff, ['test2'])
103
107
  }
104
108
  })
109
+
105
110
  it('should succeed on not existing form', async function () {
106
111
  await this.formsAsserter.assertNotConvoStep({
107
112
  convoStep: { stepTag: 'test' },
@@ -115,6 +120,7 @@ describe('scripting.asserters.formsAsserter', function () {
115
120
  }
116
121
  })
117
122
  })
123
+
118
124
  it('should fail on unexpected form', async function () {
119
125
  try {
120
126
  await this.formsAsserter.assertNotConvoStep({
@@ -140,6 +146,7 @@ describe('scripting.asserters.formsAsserter', function () {
140
146
  assert.deepEqual(err.context.cause.diff, ['test1'])
141
147
  }
142
148
  })
149
+
143
150
  it('should succeed on existing form if has no arg', async function () {
144
151
  await this.formsAsserter.assertConvoStep({
145
152
  convoStep: { stepTag: 'test' },
@@ -153,6 +160,7 @@ describe('scripting.asserters.formsAsserter', function () {
153
160
  }
154
161
  })
155
162
  })
163
+
156
164
  it('should fail on no form if has no arg', async function () {
157
165
  try {
158
166
  await this.formsAsserter.assertConvoStep({ convoStep: { stepTag: 'test' } })
@@ -167,9 +175,11 @@ describe('scripting.asserters.formsAsserter', function () {
167
175
  assert.deepEqual(err.context.cause.actual, [])
168
176
  }
169
177
  })
178
+
170
179
  it('should succeed on not existing form if has no arg and negated', async function () {
171
180
  await this.formsAsserter.assertNotConvoStep({ convoStep: { stepTag: 'test' } })
172
181
  })
182
+
173
183
  it('should fail on form if has no arg and negated', async function () {
174
184
  try {
175
185
  await this.formsAsserter.assertNotConvoStep({
@@ -13,24 +13,28 @@ describe('scripting.asserters.intentAsserter', function () {
13
13
  'greetings'
14
14
  )
15
15
  })
16
+
16
17
  it('negative case for intent asserter, missing arg', async function () {
17
18
  return _assert(
18
19
  null,
19
20
  'greetings'
20
21
  )
21
22
  })
23
+
22
24
  it('negative case for intent asserter, missing intent from response', async function () {
23
25
  return _assert(
24
26
  'greetings',
25
27
  null
26
28
  )
27
29
  })
30
+
28
31
  it('negative case for intent asserter, wrong intent', async function () {
29
32
  return _assert(
30
33
  'greetings',
31
34
  'order'
32
35
  )
33
36
  })
37
+
34
38
  it('negative case for intent asserter, wrong intent, details', async function () {
35
39
  try {
36
40
  await asserter.assertConvoStep({
@@ -20,6 +20,7 @@ describe('scripting.asserters.intentUniqueAsserter', function () {
20
20
  }
21
21
  })
22
22
  })
23
+
23
24
  it('positive case for intent unique asserter, with alternate', async function () {
24
25
  await asserter.assertConvoStep({
25
26
  convoStep: { stepTag: 'test' },
@@ -44,6 +45,7 @@ describe('scripting.asserters.intentUniqueAsserter', function () {
44
45
  }
45
46
  })
46
47
  })
48
+
47
49
  it('negative case for intent unique asserter, details', async function () {
48
50
  try {
49
51
  await asserter.assertConvoStep({
@@ -34,6 +34,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
34
34
  }
35
35
  })
36
36
  })
37
+
37
38
  it('should succeed if null', async function () {
38
39
  await this.jsonPathAsserterEquals.assertConvoStep({
39
40
  convoStep: { stepTag: 'test' },
@@ -45,6 +46,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
45
46
  }
46
47
  })
47
48
  })
49
+
48
50
  it('should succeed if expected is empty, and asserter is negated', async function () {
49
51
  await this.jsonPathAsserterEquals.assertNotConvoStep({
50
52
  convoStep: { stepTag: 'test' },
@@ -56,6 +58,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
56
58
  }
57
59
  })
58
60
  })
61
+
59
62
  it('should fail if expected is not empty', async function () {
60
63
  try {
61
64
  await this.jsonPathAsserterWildcard.assertConvoStep({
@@ -72,6 +75,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
72
75
  assert.isTrue(err.message.includes('Expected: "something but not empty string" in jsonPath $.test, actual: <empty>'))
73
76
  }
74
77
  })
78
+
75
79
  it('should fail if real is not empty', async function () {
76
80
  try {
77
81
  await this.jsonPathAsserterEquals.assertConvoStep({
@@ -93,6 +97,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
93
97
  it('should do nothing on no arg', async function () {
94
98
  await this.jsonPathAsserter.assertConvoStep({})
95
99
  })
100
+
96
101
  it('should succeed on existing jsonpath', async function () {
97
102
  await this.jsonPathAsserter.assertConvoStep({
98
103
  convoStep: { stepTag: 'test' },
@@ -104,6 +109,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
104
109
  }
105
110
  })
106
111
  })
112
+
107
113
  it('should succeed on any existing jsonpath', async function () {
108
114
  await this.jsonPathAsserter.assertConvoStep({
109
115
  convoStep: { stepTag: 'test' },
@@ -119,6 +125,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
119
125
  }
120
126
  })
121
127
  })
128
+
122
129
  it('should fail on not any existing jsonpath', async function () {
123
130
  try {
124
131
  await this.jsonPathAsserter.assertConvoStep({
@@ -138,6 +145,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
138
145
  assert.isTrue(err.message.includes('Expected: "message4" in jsonPath $.messages[*].label, actual: message1,message2,message3'))
139
146
  }
140
147
  })
148
+
141
149
  it('should fail on not existing jsonpath', async function () {
142
150
  try {
143
151
  await this.jsonPathAsserter.assertConvoStep({
@@ -152,6 +160,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
152
160
  assert.isTrue(err.message.includes('Could not find any element in jsonPath $.test'))
153
161
  }
154
162
  })
163
+
155
164
  it('should succeed on matching jsonpath', async function () {
156
165
  await this.jsonPathAsserter.assertConvoStep({
157
166
  convoStep: { stepTag: 'test' },
@@ -163,6 +172,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
163
172
  }
164
173
  })
165
174
  })
175
+
166
176
  it('should succeed on matching jsonpath array', async function () {
167
177
  await this.jsonPathAsserter.assertConvoStep({
168
178
  convoStep: { stepTag: 'test' },
@@ -174,6 +184,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
174
184
  }
175
185
  })
176
186
  })
187
+
177
188
  it('should succeed on jsonpath object', async function () {
178
189
  await this.jsonPathAsserterWildcard.assertConvoStep({
179
190
  convoStep: { stepTag: 'test' },
@@ -189,6 +200,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
189
200
  }
190
201
  })
191
202
  })
203
+
192
204
  it('should fail on invalid jsonpath object', async function () {
193
205
  try {
194
206
  await this.jsonPathAsserterWildcard.assertConvoStep({
@@ -235,6 +247,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
235
247
  assert.equal(err.context.cause.actual, 'test1')
236
248
  }
237
249
  })
250
+
238
251
  it('should succeed on non existing jsonpath', async function () {
239
252
  await this.jsonPathAsserter.assertNotConvoStep({
240
253
  convoStep: { stepTag: 'test' },
@@ -244,6 +257,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
244
257
  }
245
258
  })
246
259
  })
260
+
247
261
  it('should succeed on non matching jsonpath', async function () {
248
262
  await this.jsonPathAsserter.assertNotConvoStep({
249
263
  convoStep: { stepTag: 'test' },
@@ -255,6 +269,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
255
269
  }
256
270
  })
257
271
  })
272
+
258
273
  it('should fail on matching jsonpath', async function () {
259
274
  try {
260
275
  await this.jsonPathAsserter.assertNotConvoStep({
@@ -287,6 +302,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
287
302
  }
288
303
  })
289
304
  })
305
+
290
306
  it('should succeed on matching jsonpath from globalArgs', async function () {
291
307
  await this.jsonPathAsserterGlobalArgs.assertConvoStep({
292
308
  convoStep: { stepTag: 'test' },
@@ -298,6 +314,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
298
314
  }
299
315
  })
300
316
  })
317
+
301
318
  it('should fail on not existing jsonpath from globalArgs', async function () {
302
319
  try {
303
320
  await this.jsonPathAsserterGlobalArgs.assertConvoStep({
@@ -311,6 +328,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
311
328
  assert.isTrue(err.message.includes('Could not find any element in jsonPath $.test'))
312
329
  }
313
330
  })
331
+
314
332
  it('should fail on not matching jsonpath from globalArgs', async function () {
315
333
  try {
316
334
  await this.jsonPathAsserterGlobalArgs.assertConvoStep({
@@ -353,6 +371,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
353
371
  assert.isTrue(err.message.indexOf('0 arguments expected') > 0)
354
372
  }
355
373
  })
374
+
356
375
  it('should succeed on existing jsonpath from pathPattern', async function () {
357
376
  this.jsonPathAsserter.globalArgs = {
358
377
  argCount: 1,
@@ -369,6 +388,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
369
388
  }
370
389
  })
371
390
  })
391
+
372
392
  it('should succeed on existing jsonpath from pathPattern and assertPattern', async function () {
373
393
  this.jsonPathAsserter.globalArgs = {
374
394
  argCount: 2,
@@ -386,6 +406,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
386
406
  }
387
407
  })
388
408
  })
409
+
389
410
  it('should fail on not matching jsonpath from pathPattern and assertPattern', async function () {
390
411
  this.jsonPathAsserter.globalArgs = {
391
412
  argCount: 2,
@@ -407,6 +428,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
407
428
  assert.isTrue(err.message.indexOf('Expected: "value" in jsonPath $.test') > 0)
408
429
  }
409
430
  })
431
+
410
432
  it('should succeed on setting matching mode in global args', async function () {
411
433
  this.jsonPathAsserter.globalArgs = {
412
434
  argCount: 2,
@@ -425,6 +447,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
425
447
  }
426
448
  })
427
449
  })
450
+
428
451
  it('should fail on setting matching mode in global args', async function () {
429
452
  this.jsonPathAsserter.globalArgs = {
430
453
  argCount: 2,
@@ -481,6 +504,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
481
504
  }
482
505
  })
483
506
  })
507
+
484
508
  it('should succeed on <=2 with two jsonpath', async function () {
485
509
  await this.jsonPathCountAsserter.assertConvoStep({
486
510
  convoStep: { stepTag: 'test' },
@@ -492,6 +516,7 @@ describe('scripting.asserters.jsonPathAsserter', function () {
492
516
  }
493
517
  })
494
518
  })
519
+
495
520
  it('should fail on >2 with two jsonpath', async function () {
496
521
  try {
497
522
  await this.jsonPathCountAsserter.assertConvoStep({