File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
extensions/vscode-api-tests/src/singlefolder-tests Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -357,13 +357,27 @@ import { assertNoRpc, poll } from '../utils';
357
357
test ( 'should be defined after selecting all content' , async ( ) => {
358
358
const terminal = window . createTerminal ( { name : 'selection test' } ) ;
359
359
terminal . show ( ) ;
360
+ // Wait for some terminal data
361
+ await new Promise < void > ( r => {
362
+ const disposable = window . onDidWriteTerminalData ( ( ) => {
363
+ disposable . dispose ( ) ;
364
+ r ( ) ;
365
+ } ) ;
366
+ } ) ;
360
367
await commands . executeCommand ( 'workbench.action.terminal.selectAll' ) ;
361
368
await poll < void > ( ( ) => Promise . resolve ( ) , ( ) => terminal . selection !== undefined , 'selection should be defined' ) ;
362
369
terminal . dispose ( ) ;
363
370
} ) ;
364
371
test ( 'should be undefined after clearing a selection' , async ( ) => {
365
372
const terminal = window . createTerminal ( { name : 'selection test' } ) ;
366
373
terminal . show ( ) ;
374
+ // Wait for some terminal data
375
+ await new Promise < void > ( r => {
376
+ const disposable = window . onDidWriteTerminalData ( ( ) => {
377
+ disposable . dispose ( ) ;
378
+ r ( ) ;
379
+ } ) ;
380
+ } ) ;
367
381
await commands . executeCommand ( 'workbench.action.terminal.selectAll' ) ;
368
382
await poll < void > ( ( ) => Promise . resolve ( ) , ( ) => terminal . selection !== undefined , 'selection should be defined' ) ;
369
383
await commands . executeCommand ( 'workbench.action.terminal.clearSelection' ) ;
You can’t perform that action at this time.
0 commit comments