Skip to content

Commit 8bb5cf9

Browse files
committed
test
1 parent db5628c commit 8bb5cf9

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

packages/amazonq/test/unit/codewhisperer/testUtil.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff 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
1313
export 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

3029
export async function acceptByTab() {

0 commit comments

Comments
 (0)