File tree Expand file tree Collapse file tree
test/smoke/src/areas/quickopen Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,8 +13,7 @@ export class QuickOpen {
1313 static QUICK_OPEN_FOCUSED_ELEMENT = `${ QuickOpen . QUICK_OPEN } .quick-open-tree .monaco-tree-row.focused .monaco-highlighted-label` ;
1414 static QUICK_OPEN_ENTRY_SELECTOR = 'div[aria-label="Quick Picker"] .monaco-tree-rows.show-twisties .monaco-tree-row .quick-open-entry' ;
1515
16- constructor ( readonly spectron : SpectronApplication ) {
17- }
16+ constructor ( readonly spectron : SpectronApplication ) { }
1817
1918 async openQuickOpen ( ) : Promise < void > {
2019 await this . spectron . command ( 'workbench.action.quickOpen' ) ;
@@ -89,12 +88,13 @@ export class QuickOpen {
8988 }
9089
9190 private async getQuickOpenElements ( ) : Promise < string [ ] > {
92- return await this . spectron . webclient . selectorExecute ( QuickOpen . QUICK_OPEN_ENTRY_SELECTOR ,
91+ const result = await this . spectron . webclient . selectorExecute ( QuickOpen . QUICK_OPEN_ENTRY_SELECTOR ,
9392 div => ( Array . isArray ( div ) ? div : [ div ] ) . map ( element => {
9493 const name = element . querySelector ( '.label-name' ) as HTMLElement ;
95-
9694 return name . textContent ;
9795 } )
9896 ) ;
97+
98+ return Array . isArray ( result ) ? result : [ ] ;
9999 }
100100}
You can’t perform that action at this time.
0 commit comments