@@ -267,7 +267,7 @@ Completes Correctly With R Double And Triple Colon
267267 Completer Should Suggest .print.via.format
268268 Select Completer Suggestion .print.via.format
269269 Wait Until Keyword Succeeds 40x 0.5s File Editor Line Should Equal 1 tools::.print.via.format
270- # tripple colon
270+ # triple colon
271271 Place Cursor In File Editor At 4 11
272272 Trigger Completer
273273 Completer Should Suggest .packageName
@@ -289,6 +289,8 @@ Shows Documentation With CompletionItem Resolve
289289 Wait Until Fully Initialized
290290 Trigger Completer
291291 Completer Should Suggest print.data.frame
292+ # if data.frame is not active, activate it (it should be in top 10 on any platform)
293+ Activate Completer Suggestion print.data.frame max_steps_down=10
292294 Completer Should Include Documentation Print a data frame.
293295 # should remain visible after typing:
294296 Press Keys None efa
@@ -342,6 +344,21 @@ File Editor Line Should Equal
342344 ${line } = Get Line ${content } ${line }
343345 Should Be Equal ${line } ${value }
344346
347+ Activate Completer Suggestion
348+ [Arguments] ${text } ${max_steps_down } =100
349+ ${suggestion } = Set Variable css:.jp-Completer-item[data-value="${text } "]
350+ Wait Until Page Contains Element ${suggestion }
351+ ${active_suggestion } = Set Variable css:.jp-mod-active.jp-Completer-item[data-value="${text } "]
352+ FOR ${i } IN RANGE ${max_steps_down }
353+ Capture Page Screenshot ${i } -completions.png
354+ ${matching_active_elements } = Get Element Count ${active_suggestion }
355+ LOG ${matching_active_elements }
356+ Exit For Loop If ${matching_active_elements } == 1
357+ Press Keys None DOWN
358+ Sleep 0.1s
359+ END
360+ Wait Until Page Contains Element ${active_suggestion }
361+
345362Select Completer Suggestion
346363 [Arguments] ${text }
347364 ${suggestion } = Set Variable css:.jp-Completer-item[data-value="${text } "]
0 commit comments