@@ -193,14 +193,15 @@ User Can Select Lowercase After Starting Uppercase
193
193
Mid Token Completions Do Not Overwrite
194
194
# `disp<tab>data` → `display_table<cursor>data`
195
195
Place Cursor In Cell Editor At 9 line=1 character=4
196
- Capture Page Screenshot 01-cursor-placed.png
196
+ Wait For Our Completer To Replace Native In Cell 9
197
197
Trigger Completer
198
198
Completer Should Suggest display_table
199
199
Select Completer Suggestion display_table
200
200
Capture Page Screenshot 02-completed.png
201
201
Wait Until Keyword Succeeds 40x 0.5s Cell Editor Should Equal 9 display_tabledata
202
202
# `disp<tab>lay` → `display_table<cursor>`
203
203
Place Cursor In Cell Editor At 11 line=1 character=4
204
+ Wait For Our Completer To Replace Native In Cell 11
204
205
Trigger Completer
205
206
Wait For Ready State
206
207
Completer Should Suggest display_table
@@ -295,11 +296,7 @@ Completes Correctly With R Double And Triple Colon
295
296
[Setup] Prepare File for Editing R completion completion.R
296
297
Place Cursor In File Editor At 2 7
297
298
Wait Until Fully Initialized
298
- # normally the completion adapter taking time to initialise is not a problem
299
- # but because the token-based completion fallback would break our test example
300
- # if it kicked off we try to avoid it by adding some delay
301
- # TODO remove sleep after migrating to JupyterLab 4.0 native adapters.
302
- Sleep 2s Workaround completion adapter taking some time to initialize
299
+ Wait For Our Completer To Replace Native In File Editor
303
300
Trigger Completer
304
301
Completer Should Suggest .print.via.format
305
302
Select Completer Suggestion .print.via.format
@@ -324,8 +321,7 @@ Shows Documentation With CompletionItem Resolve
324
321
[Setup] Prepare File for Editing R completion completion.R
325
322
Place Cursor In File Editor At 8 7
326
323
Wait Until Fully Initialized
327
- # TODO remove sleep after migrating to JupyterLab 4.0 native adapters.
328
- Sleep 2s Workaround completion adapter taking some time to initialize
324
+ Wait For Our Completer To Replace Native In File Editor
329
325
Trigger Completer
330
326
Completer Should Suggest print.data.frame
331
327
# if data.frame is not active, activate it (it should be in top 10 on any platform)
@@ -352,6 +348,7 @@ Completes In R Magics
352
348
# - R lanugage server is very sensitive to off-by-one errors (see https://github.com/REditorSupport/languageserver/issues/395)
353
349
# '%%R\n librar<tab>'
354
350
Enter Cell Editor 22 line=2
351
+ Wait For Our Completer To Replace Native In Cell 22
355
352
Trigger Completer
356
353
Completer Should Suggest library
357
354
# '%R lib<tab>'
@@ -361,6 +358,7 @@ Completes In R Magics
361
358
362
359
Completes Paths In Strings
363
360
Enter Cell Editor 26
361
+ Wait For Our Completer To Replace Native In Cell 26
364
362
Press Keys None LEFT
365
363
Trigger Completer
366
364
Press Keys None ENTER
@@ -467,3 +465,15 @@ Should Complete While Kernel Is Busy
467
465
Completer Should Suggest test
468
466
# Confirm that the kernel indicator was busy all along
469
467
Page Should Contain Element ${KERNEL_BUSY_INDICATOR }
468
+
469
+ Wait For Our Completer To Replace Native In File Editor
470
+ # Normally the completion adapter taking time to initialise is not a problem
471
+ # but because the token-based completion fallback would break some test example
472
+ # if it kicked in (by instant-completing some token) so we try to avoid it
473
+ # TODO remove after migrating to JupyterLab 4.0 native adapters.
474
+ Wait Until Page Contains Element css:.jp-FileEditor .lsp-completer-enabled
475
+
476
+ Wait For Our Completer To Replace Native In Cell
477
+ [Arguments] ${cell_nr }
478
+ # TODO remove after migrating to JupyterLab 4.0 native adapters.
479
+ Wait Until Page Contains Element css:.jp-Cell:nth-child(${cell_nr } ) .lsp-completer-enabled
0 commit comments