@@ -13,7 +13,7 @@ import {
1313 assertTelemetry ,
1414 assertTextEditorContains ,
1515 createTestWorkspaceFolder ,
16- openATextEditorWithText ,
16+ toTextEditor ,
1717} from 'aws-core-vscode/test'
1818import {
1919 DefaultCodeWhispererClient ,
@@ -156,7 +156,7 @@ describe.skip('CodeWhisperer telemetry', async function () {
156156 describe ( 'tab and esc' , function ( ) {
157157 it ( 'single accept' , async function ( ) {
158158 assertSessionClean ( )
159- const editor = await openATextEditorWithText ( '' , 'test.py' )
159+ const editor = await toTextEditor ( '' , 'test.py' )
160160
161161 await manualTrigger ( editor , client , config )
162162 await acceptByTab ( )
@@ -166,7 +166,7 @@ describe.skip('CodeWhisperer telemetry', async function () {
166166
167167 it ( 'single reject' , async function ( ) {
168168 assertSessionClean ( )
169- const editor = await openATextEditorWithText ( '' , 'test.py' )
169+ const editor = await toTextEditor ( '' , 'test.py' )
170170
171171 await manualTrigger ( editor , client , config )
172172 await rejectByEsc ( )
@@ -179,7 +179,7 @@ describe.skip('CodeWhisperer telemetry', async function () {
179179
180180 it ( 'accept - accept - accept' , async function ( ) {
181181 assertSessionClean ( )
182- const editor = await openATextEditorWithText ( '' , 'test.py' )
182+ const editor = await toTextEditor ( '' , 'test.py' )
183183
184184 await manualTrigger ( editor , client , config )
185185 await acceptByTab ( )
@@ -190,7 +190,7 @@ describe.skip('CodeWhisperer telemetry', async function () {
190190 await acceptByTab ( )
191191 await assertTextEditorContains ( `FooBaz${ os . EOL } Baz` )
192192
193- const anotherEditor = await openATextEditorWithText ( '' , 'anotherTest.py' )
193+ const anotherEditor = await toTextEditor ( '' , 'anotherTest.py' )
194194 assertSessionClean ( )
195195 await manualTrigger ( anotherEditor , client , config )
196196 await acceptByTab ( )
@@ -205,7 +205,7 @@ describe.skip('CodeWhisperer telemetry', async function () {
205205
206206 it ( 'accept - reject - accept' , async function ( ) {
207207 assertSessionClean ( )
208- const editor = await openATextEditorWithText ( '' , 'test.py' )
208+ const editor = await toTextEditor ( '' , 'test.py' )
209209
210210 await manualTrigger ( editor , client , config )
211211 await acceptByTab ( )
@@ -216,7 +216,7 @@ describe.skip('CodeWhisperer telemetry', async function () {
216216 await rejectByEsc ( )
217217 await assertTextEditorContains ( 'Foo' )
218218
219- const anotherEditor = await openATextEditorWithText ( '' , 'anotherTest.py' )
219+ const anotherEditor = await toTextEditor ( '' , 'anotherTest.py' )
220220 assertSessionClean ( )
221221 await manualTrigger ( anotherEditor , client , config )
222222 await rejectByEsc ( )
@@ -231,7 +231,7 @@ describe.skip('CodeWhisperer telemetry', async function () {
231231
232232 it ( 'reject - reject - reject' , async function ( ) {
233233 assertSessionClean ( )
234- const editor = await openATextEditorWithText ( '' , 'test.py' )
234+ const editor = await toTextEditor ( '' , 'test.py' )
235235
236236 await manualTrigger ( editor , client , config )
237237 await rejectByEsc ( )
@@ -256,7 +256,7 @@ describe.skip('CodeWhisperer telemetry', async function () {
256256
257257 it ( 'reject - accept - reject' , async function ( ) {
258258 assertSessionClean ( )
259- const editor = await openATextEditorWithText ( '' , 'test.py' )
259+ const editor = await toTextEditor ( '' , 'test.py' )
260260
261261 await manualTrigger ( editor , client , config )
262262 await rejectByEsc ( )
@@ -302,7 +302,7 @@ describe.skip('CodeWhisperer telemetry', async function () {
302302 }
303303
304304 assertSessionClean ( )
305- const editor = await openATextEditorWithText ( '' , 'test.py' )
305+ const editor = await toTextEditor ( '' , 'test.py' )
306306
307307 await manualTrigger ( editor , client , config )
308308 await navigateNext ( )
@@ -318,7 +318,7 @@ describe.skip('CodeWhisperer telemetry', async function () {
318318 }
319319
320320 assertSessionClean ( )
321- const editor = await openATextEditorWithText ( '' , 'test.py' )
321+ const editor = await toTextEditor ( '' , 'test.py' )
322322
323323 await manualTrigger ( editor , client , config )
324324 await navigateNext ( )
@@ -336,7 +336,7 @@ describe.skip('CodeWhisperer telemetry', async function () {
336336 }
337337
338338 assertSessionClean ( )
339- const editor = await openATextEditorWithText ( '' , 'test.py' )
339+ const editor = await toTextEditor ( '' , 'test.py' )
340340
341341 await manualTrigger ( editor , client , config )
342342 await navigateNext ( )
@@ -351,7 +351,7 @@ describe.skip('CodeWhisperer telemetry', async function () {
351351 describe ( 'typing' , function ( ) {
352352 it ( 'typeahead match accept' , async function ( ) {
353353 assertSessionClean ( )
354- const editor = await openATextEditorWithText ( '' , 'test.py' )
354+ const editor = await toTextEditor ( '' , 'test.py' )
355355
356356 await manualTrigger ( editor , client , config )
357357 await typing ( editor , 'F' )
@@ -365,7 +365,7 @@ describe.skip('CodeWhisperer telemetry', async function () {
365365
366366 it ( 'typeahead match, backspace and accept' , async function ( ) {
367367 assertSessionClean ( )
368- const editor = await openATextEditorWithText ( '' , 'test.py' )
368+ const editor = await toTextEditor ( '' , 'test.py' )
369369
370370 await manualTrigger ( editor , client , config )
371371 await typing ( editor , 'F' )
@@ -385,7 +385,7 @@ describe.skip('CodeWhisperer telemetry', async function () {
385385 // the solution is to waitUntil VSCode InlineSuggestion to resolve the "typeahead" but currently no easy way to know if the InlinSuggestion is shown visible again
386386 this . skip ( )
387387 assertSessionClean ( )
388- const editor = await openATextEditorWithText ( '' , 'test.py' )
388+ const editor = await toTextEditor ( '' , 'test.py' )
389389
390390 await manualTrigger ( editor , client , config )
391391 await typing ( editor , 'F' )
@@ -398,7 +398,7 @@ describe.skip('CodeWhisperer telemetry', async function () {
398398 await rejectByEsc ( )
399399 await assertTextEditorContains ( 'Foo' )
400400
401- const anotherEditor = await openATextEditorWithText ( '' , 'anotherTest.py' )
401+ const anotherEditor = await toTextEditor ( '' , 'anotherTest.py' )
402402 await manualTrigger ( anotherEditor , client , config )
403403 await typing ( anotherEditor , 'Qo' )
404404 await assertTextEditorContains ( 'Qo' )
@@ -415,7 +415,7 @@ describe.skip('CodeWhisperer telemetry', async function () {
415415
416416 it ( 'typeahead not match after suggestion is shown and reject' , async function ( ) {
417417 assertSessionClean ( )
418- const editor = await openATextEditorWithText ( '' , 'test.py' )
418+ const editor = await toTextEditor ( '' , 'test.py' )
419419
420420 await manualTrigger ( editor , client , config )
421421 await typing ( editor , 'H' )
@@ -441,13 +441,13 @@ describe.skip('CodeWhisperer telemetry', async function () {
441441
442442 it ( 'reject - typeahead not matching after suggestion is shown then invoke another round and accept' , async function ( ) {
443443 assertSessionClean ( )
444- const editor = await openATextEditorWithText ( '' , 'test.py' )
444+ const editor = await toTextEditor ( '' , 'test.py' )
445445
446446 await manualTrigger ( editor , client , config )
447447 await typing ( editor , 'H' )
448448 await assertTextEditorContains ( 'H' )
449449
450- const anotherEditor = await openATextEditorWithText ( '' , 'anotherTest.py' )
450+ const anotherEditor = await toTextEditor ( '' , 'anotherTest.py' )
451451 await manualTrigger ( anotherEditor , client , config )
452452 await acceptByTab ( )
453453 await assertTextEditorContains ( `Baz${ os . EOL } Baz` )
@@ -462,14 +462,14 @@ describe.skip('CodeWhisperer telemetry', async function () {
462462 describe ( 'on editor change, focus change' , function ( ) {
463463 it ( 'reject: trigger then open another editor' , async function ( ) {
464464 assertSessionClean ( )
465- const editor = await openATextEditorWithText ( '' , 'test.py' , tempFolder , { preview : false } )
465+ const editor = await toTextEditor ( '' , 'test.py' , tempFolder , { preview : false } )
466466
467467 await manualTrigger ( editor , client , config )
468468
469- await openATextEditorWithText ( 'text in 2nd editor' , 'another1.py' , tempFolder , {
469+ await toTextEditor ( 'text in 2nd editor' , 'another1.py' , tempFolder , {
470470 preview : false ,
471471 } )
472- const anotherEditor = await openATextEditorWithText ( 'text in 3rd editor' , 'another2.py' , tempFolder , {
472+ const anotherEditor = await toTextEditor ( 'text in 3rd editor' , 'another2.py' , tempFolder , {
473473 preview : false ,
474474 } )
475475
@@ -483,7 +483,7 @@ describe.skip('CodeWhisperer telemetry', async function () {
483483
484484 it ( 'reject: trigger then close editor' , async function ( ) {
485485 assertSessionClean ( )
486- const editor = await openATextEditorWithText ( '' , 'test.py' )
486+ const editor = await toTextEditor ( '' , 'test.py' )
487487
488488 await manualTrigger ( editor , client , config )
489489 await closeActiveEditor ( )
@@ -496,7 +496,7 @@ describe.skip('CodeWhisperer telemetry', async function () {
496496
497497 it ( 'reject: onFocusChange' , async function ( ) {
498498 assertSessionClean ( )
499- const editor = await openATextEditorWithText ( '' , 'test.py' )
499+ const editor = await toTextEditor ( '' , 'test.py' )
500500
501501 await manualTrigger ( editor , client , config )
502502 await assertTextEditorContains ( '' )
0 commit comments