@@ -141,27 +141,39 @@ suite('InteractiveChatController', function () {
141
141
} ) ;
142
142
143
143
test ( 'creation, not showing anything' , function ( ) {
144
+ console . log ( '*** at the begining of creation' ) ;
144
145
ctrl = instaService . createInstance ( TestController , editor ) ;
145
146
assert . ok ( ctrl ) ;
146
147
assert . strictEqual ( ctrl . getWidgetPosition ( ) , undefined ) ;
148
+ console . log ( '*** at the end of creation' ) ;
147
149
} ) ;
148
150
149
151
test ( 'run (show/hide)' , async function ( ) {
152
+ console . log ( '*** at the beginning of run (show/hide)' ) ;
153
+
150
154
ctrl = instaService . createInstance ( TestController , editor ) ;
155
+ console . log ( 'right before run' ) ;
151
156
const run = ctrl . run ( { message : 'Hello' , autoSend : true } ) ;
152
157
158
+ console . log ( 'right before waitFor INIT_SEQUENCE_AUTO_SEND' ) ;
153
159
await ctrl . waitFor ( TestController . INIT_SEQUENCE_AUTO_SEND ) ;
154
160
assert . ok ( ctrl . getWidgetPosition ( ) !== undefined ) ;
161
+
162
+ console . log ( 'right before cancel session' ) ;
155
163
ctrl . cancelSession ( ) ;
156
164
165
+ console . log ( 'right before run' ) ;
157
166
await run ;
158
167
159
168
console . log ( 'ctrl.getWidgetPosition() : ' , ctrl . getWidgetPosition ( ) ) ;
160
169
assert . ok ( ctrl . getWidgetPosition ( ) === undefined ) ;
170
+ console . log ( '*** at the end of run (show/hide)' ) ;
161
171
} ) ;
162
172
163
173
test ( 'wholeRange expands to whole lines, editor selection default' , async function ( ) {
164
174
175
+ console . log ( '*** at the beginning of wholeRange, editor selection default' ) ;
176
+
165
177
editor . setSelection ( new Range ( 1 , 1 , 1 , 3 ) ) ;
166
178
ctrl = instaService . createInstance ( TestController , editor ) ;
167
179
@@ -186,10 +198,14 @@ suite('InteractiveChatController', function () {
186
198
187
199
ctrl . cancelSession ( ) ;
188
200
d . dispose ( ) ;
201
+
202
+ console . log ( '*** at the end of wholeRange, editor selection default' ) ;
189
203
} ) ;
190
204
191
205
test ( 'wholeRange expands to whole lines, session provided' , async function ( ) {
192
206
207
+ console . log ( '*** at the beginning of wholeRange, editor selection provided' ) ;
208
+
193
209
editor . setSelection ( new Range ( 1 , 1 , 1 , 1 ) ) ;
194
210
ctrl = instaService . createInstance ( TestController , editor ) ;
195
211
@@ -215,9 +231,14 @@ suite('InteractiveChatController', function () {
215
231
216
232
ctrl . cancelSession ( ) ;
217
233
d . dispose ( ) ;
234
+
235
+ console . log ( '*** at the end of wholeRange, editor selection provided' ) ;
218
236
} ) ;
219
237
220
238
test ( 'typing outside of wholeRange finishes session' , async function ( ) {
239
+
240
+ console . log ( '*** at the beginning of typing outside' ) ;
241
+
221
242
ctrl = instaService . createInstance ( TestController , editor ) ;
222
243
ctrl . run ( { message : 'Hello' , autoSend : true } ) ;
223
244
@@ -231,10 +252,14 @@ suite('InteractiveChatController', function () {
231
252
editor . trigger ( 'test' , 'type' , { text : 'a' } ) ;
232
253
233
254
await ctrl . waitFor ( [ State . ACCEPT ] ) ;
255
+
256
+ console . log ( '*** at the end of typing outside' ) ;
234
257
} ) ;
235
258
236
259
test ( '\'whole range\' isn\'t updated for edits outside whole range #4346' , async function ( ) {
237
260
261
+ console . log ( '*** at the beginning of whole range isnt updated' ) ;
262
+
238
263
editor . setSelection ( new Range ( 3 , 1 , 3 , 1 ) ) ;
239
264
240
265
const d = inlineChatService . addProvider ( {
@@ -271,9 +296,14 @@ suite('InteractiveChatController', function () {
271
296
await ctrl . waitFor ( [ State . MAKE_REQUEST , State . APPLY_RESPONSE , State . SHOW_RESPONSE , State . WAIT_FOR_INPUT ] ) ;
272
297
273
298
assert . deepStrictEqual ( session . wholeRange . value , new Range ( 1 , 1 , 4 , 12 ) ) ;
299
+
300
+ console . log ( '*** at the end of whole range isnt updated' ) ;
274
301
} ) ;
275
302
276
303
test ( 'Stuck inline chat widget #211' , async function ( ) {
304
+
305
+ console . log ( '*** at the beginning of stuck inline chat' ) ;
306
+
277
307
const d = inlineChatService . addProvider ( {
278
308
debugName : 'Unit Test' ,
279
309
prepareInlineChatSession ( ) {
@@ -306,5 +336,7 @@ suite('InteractiveChatController', function () {
306
336
307
337
await p ;
308
338
assert . strictEqual ( ctrl . getWidgetPosition ( ) , undefined ) ;
339
+
340
+ console . log ( '*** at the end of stuck inline chat' ) ;
309
341
} ) ;
310
342
} ) ;
0 commit comments