@@ -12,6 +12,7 @@ Test Tags feature:completion
1212${COMPLETER_BOX } css:.jp-Completer.jp-HoverBox
1313${DOCUMENTATION_PANEL } css:.jp-Completer-docpanel
1414${KERNEL_BUSY_INDICATOR } css:.jp-Notebook-ExecutionIndicator[data-status="busy"]
15+ ${MANAGER PLUGIN ID } @jupyterlab/completer-extension:manager
1516
1617
1718*** Test Cases ***
@@ -148,6 +149,8 @@ Completes In Strings Or Python Dictionaries
148149Continuous Hinting Works
149150 [Setup] Prepare File for Editing Python completion completion.py
150151 Configure JupyterLab Plugin {"continuousHinting": true} plugin id=${COMPLETION PLUGIN ID }
152+ # TODO: remove once we resolve https://github.com/jupyterlab/jupyterlab/issues/15022
153+ Configure JupyterLab Plugin {"autoCompletion": true} plugin id=${MANAGER PLUGIN ID }
151154 Place Cursor In File Editor At 9 2
152155 Wait For Ready State
153156 Press Keys None d
@@ -193,15 +196,15 @@ User Can Select Lowercase After Starting Uppercase
193196Mid Token Completions Do Not Overwrite
194197 # `disp<tab>data` → `display_table<cursor>data`
195198 Place Cursor In Cell Editor At 9 line=1 character=4
196- Wait For Our Completer To Replace Native In Cell 9
199+ Wait For Our Completer To Initialize
197200 Trigger Completer
198201 Completer Should Suggest display_table
199202 Select Completer Suggestion display_table
200203 Capture Page Screenshot 02-completed.png
201204 Wait Until Keyword Succeeds 40x 0.5s Cell Editor Should Equal 9 display_tabledata
202205 # `disp<tab>lay` → `display_table<cursor>`
203206 Place Cursor In Cell Editor At 11 line=1 character=4
204- Wait For Our Completer To Replace Native In Cell 11
207+ Wait For Our Completer To Initialize
205208 Trigger Completer
206209 Wait For Ready State
207210 Completer Should Suggest display_table
@@ -230,6 +233,7 @@ Kernel And LSP Completions Merge Prefix Conflicts Are Resolved
230233 Wait Until Keyword Succeeds 40x 0.5s Cell Editor Should Equal 15 import os.path
231234
232235Triggers Completer On Dot
236+ Configure JupyterLab Plugin {"autoCompletion": true} plugin id=${MANAGER PLUGIN ID }
233237 Enter Cell Editor 2 line=1
234238 Press Keys None .
235239 Wait Until Keyword Succeeds 10x 0.5s Cell Editor Should Equal 2 list.
@@ -296,7 +300,7 @@ Completes Correctly With R Double And Triple Colon
296300 [Setup] Prepare File for Editing R completion completion.R
297301 Place Cursor In File Editor At 2 7
298302 Wait Until Fully Initialized
299- Wait For Our Completer To Replace Native In File Editor
303+ Wait For Our Completer To Initialize
300304 Trigger Completer
301305 Completer Should Suggest .print.via.format
302306 Select Completer Suggestion .print.via.format
@@ -319,9 +323,10 @@ Completes Large Namespaces
319323
320324Shows Documentation With CompletionItem Resolve
321325 [Setup] Prepare File for Editing R completion completion.R
326+ Configure JupyterLab Plugin {"showDocumentationPanel": true} plugin id=${MANAGER PLUGIN ID }
322327 Place Cursor In File Editor At 8 7
323328 Wait Until Fully Initialized
324- Wait For Our Completer To Replace Native In File Editor
329+ Wait For Our Completer To Initialize
325330 Trigger Completer
326331 Completer Should Suggest print.data.frame
327332 # if data.frame is not active, activate it (it should be in top 10 on any platform)
@@ -348,7 +353,7 @@ Completes In R Magics
348353 # - R lanugage server is very sensitive to off-by-one errors (see https://github.com/REditorSupport/languageserver/issues/395)
349354 # '%%R\n librar<tab>'
350355 Enter Cell Editor 22 line=2
351- Wait For Our Completer To Replace Native In Cell 22
356+ Wait For Our Completer To Initialize
352357 Trigger Completer
353358 Completer Should Suggest library
354359 # '%R lib<tab>'
@@ -358,7 +363,7 @@ Completes In R Magics
358363
359364Completes Paths In Strings
360365 Enter Cell Editor 26
361- Wait For Our Completer To Replace Native In Cell 26
366+ Wait For Our Completer To Initialize
362367 Press Keys None LEFT
363368 Trigger Completer
364369 Press Keys None ENTER
@@ -371,13 +376,11 @@ Setup Completion Test
371376
372377Get Cell Editor Content
373378 [Arguments] ${cell_nr }
374- ${content } = Execute JavaScript
375- ... return document.querySelector('.jp-Cell:nth-child(${cell_nr } ) .CodeMirror').CodeMirror.getValue()
379+ ${content } = Get Editor Content .jp-Cell:nth-child(${cell_nr } )
376380 RETURN ${content }
377381
378382Get File Editor Content
379- ${content } = Execute JavaScript
380- ... return document.querySelector('.jp-FileEditorCodeWrapper .CodeMirror').CodeMirror.getValue()
383+ ${content } = Get Editor Content .jp-FileEditorCodeWrapper
381384 RETURN ${content }
382385
383386Cell Editor Should Equal
@@ -466,14 +469,5 @@ Should Complete While Kernel Is Busy
466469 # Confirm that the kernel indicator was busy all along
467470 Page Should Contain Element ${KERNEL_BUSY_INDICATOR }
468471
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
472+ Wait For Our Completer To Initialize
473+ Wait Until Page Contains Element css:.body[data-lsp-completer-layout]
0 commit comments