File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
packages/amazonq/test/unit/codewhisperer Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -12,19 +12,18 @@ import { assertTextEditorContains } from 'aws-core-vscode/test'
1212// Note: RecommendationHandler.isSuggestionVisible seems not to work well, hence not using it
1313export async function waitUntilSuggestionSeen ( index : number = 0 ) {
1414 const session = CodeWhispererSessionState . instance . getSession ( )
15- const state = await waitUntil (
15+ const ok = await waitUntil (
1616 async ( ) => {
17- const r = session . getSuggestionState ( index )
18- if ( r ) {
19- return r
20- }
17+ console . log ( 'Suggestion state: %O' , session . getSuggestionState ( index ) )
18+ return session . getSuggestionState ( index ) === 'Showed'
2119 } ,
2220 {
2321 interval : 500 ,
22+ timeout : 5000 ,
2423 }
2524 )
2625
27- assert . deepStrictEqual ( state , 'Showed' )
26+ assert . ok ( ok === true )
2827}
2928
3029export async function acceptByTab ( ) {
You can’t perform that action at this time.
0 commit comments