@@ -14,7 +14,7 @@ import {
1414 toTextEditor ,
1515 using ,
1616} from 'aws-core-vscode/test'
17- import { RecommendationHandler , RecommendationService , session } from 'aws-core-vscode/codewhisperer'
17+ import { RecommendationService } from 'aws-core-vscode/codewhisperer'
1818import { Commands , globals , sleep , waitUntil , collectionUtil } from 'aws-core-vscode/shared'
1919import { loginToIdC } from '../amazonq/utils/setup'
2020
@@ -71,31 +71,6 @@ describe('Amazon Q Inline', async function () {
7171 } )
7272 }
7373
74- async function waitForRecommendations ( ) {
75- const suggestionShown = await waitUntil ( async ( ) => session . getSuggestionState ( 0 ) === 'Showed' , waitOptions )
76- if ( ! suggestionShown ) {
77- throw new Error ( `Suggestion did not show. Suggestion States: ${ JSON . stringify ( session . suggestionStates ) } ` )
78- }
79- const suggestionVisible = await waitUntil (
80- async ( ) => RecommendationHandler . instance . isSuggestionVisible ( ) ,
81- waitOptions
82- )
83- if ( ! suggestionVisible ) {
84- throw new Error (
85- `Suggestions failed to become visible. Suggestion States: ${ JSON . stringify ( session . suggestionStates ) } `
86- )
87- }
88- console . table ( {
89- 'suggestions states' : JSON . stringify ( session . suggestionStates ) ,
90- 'valid recommendation' : RecommendationHandler . instance . isValidResponse ( ) ,
91- 'recommendation service status' : RecommendationService . instance . isRunning ,
92- recommendations : session . recommendations ,
93- } )
94- if ( ! RecommendationHandler . instance . isValidResponse ( ) ) {
95- throw new Error ( 'Did not find a valid response' )
96- }
97- }
98-
9974 /**
10075 * Waits for a specific telemetry event to be emitted with the expected suggestion state.
10176 * It looks like there might be a potential race condition in codewhisperer causing telemetry
0 commit comments