Commit 04d4021 1 parent d2fdb72 commit 04d4021 Copy full SHA for 04d4021
File tree 1 file changed +3
-12
lines changed
1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -85,22 +85,13 @@ export async function getCodeLens(
85
85
editor : TextEditor ,
86
86
indexOrTitle : number | string
87
87
) : Promise < CodeLens | undefined > {
88
- const ariaLabel = await editor . getAttribute ( 'aria-label' ) ;
89
-
90
88
// The `TextEditor.getCodeLens` method provided by `vscode-extension-tester`
91
89
// does not seem to explicitly wait for the anchor element to be available,
92
90
// which sometimes works, and sometimes does not. To be safe, we need wait for
93
- // it ourselves. Including the `aria-label` to narrow down which editor we are
94
- // looking at.
95
- await VSBrowser . instance . driver . wait (
96
- until . elementLocated (
97
- By . css (
98
- `[aria-label="${ ariaLabel } "] .contentWidgets span.codelens-decoration a`
99
- )
100
- )
91
+ // it ourselves.
92
+ return VSBrowser . instance . driver . wait ( async ( ) =>
93
+ editor . getCodeLens ( indexOrTitle )
101
94
) ;
102
-
103
- return editor . getCodeLens ( indexOrTitle ) ;
104
95
}
105
96
106
97
/**
You can’t perform that action at this time.
0 commit comments