File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -98,18 +98,15 @@ async function openSampleFile(): Promise<TextEditor> {
9898 500 ,
9999 ) ;
100100
101- // If the tab still isn't open, fall back to Quick Open (Ctrl+P / Cmd+P) .
101+ // If the tab still isn't open, open the file via the Explorer sidebar .
102102 try {
103103 return ( await editorView . openEditor ( SAMPLE_FILE_BASENAME ) ) as TextEditor ;
104104 } catch {
105- const driver = VSBrowser . instance . driver ;
106- const modifier = process . platform === "darwin" ? Key . META : Key . CONTROL ;
107- await driver . actions ( { bridge : true } ) . keyDown ( modifier ) . sendKeys ( "p" ) . keyUp ( modifier ) . perform ( ) ;
108- await driver . sleep ( 2_000 ) ;
109- const input = await InputBox . create ( ) ;
110- await input . setText ( SAMPLE_FILE_BASENAME ) ;
111- await driver . sleep ( 2_000 ) ;
112- await input . confirm ( ) ;
105+ const explorerView = await new ActivityBar ( ) . getViewControl ( "Explorer" ) ;
106+ await explorerView ?. openView ( ) ;
107+ const content = new Workbench ( ) . getSideBar ( ) . getContent ( ) ;
108+ const section = await content . getSection ( "sample-workspace" ) ;
109+ await section . openItem ( "src" , SAMPLE_FILE_BASENAME ) ;
113110 await waitForCondition (
114111 async ( ) => {
115112 try {
You can’t perform that action at this time.
0 commit comments