Skip to content

Commit c0a9f99

Browse files
committed
DefaultAmazonQAppInitContext with sleep
1 parent 1d399d5 commit c0a9f99

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

packages/amazonq/test/e2e/amazonq/testGen.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { Messenger } from './framework/messenger'
1111
import { DefaultAmazonQAppInitContext, FollowUpTypes } from 'aws-core-vscode/amazonq'
1212
import { registerAuthHook, using, TestFolder, closeAllEditors } from 'aws-core-vscode/test'
1313
import { loginToIdC } from './utils/setup'
14-
import { waitUntil, workspaceUtils } from 'aws-core-vscode/shared'
14+
import { sleep, waitUntil, workspaceUtils } from 'aws-core-vscode/shared'
1515

1616
describe('Amazon Q Test Generation', function () {
1717
let framework: qTestingFramework
@@ -75,10 +75,8 @@ describe('Amazon Q Test Generation', function () {
7575
})
7676

7777
beforeEach(async () => {
78-
await waitUntil(
79-
async () => DefaultAmazonQAppInitContext.instance.getAppsToWebViewMessagePublisher().setUiReady(),
80-
{}
81-
)
78+
DefaultAmazonQAppInitContext.instance.getAppsToWebViewMessagePublisher().setUiReady()
79+
await sleep(1000)
8280
registerAuthHook('amazonq-test-account')
8381
framework = new qTestingFramework('testgen', true, [])
8482
tab = framework.createTab()

0 commit comments

Comments
 (0)