Skip to content

Commit fddf514

Browse files
Merge master into feature/sdkv3
2 parents 0b2ea09 + 6ce9dca commit fddf514

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

packages/amazonq/test/e2e/amazonq/framework/framework.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ export class qTestingFramework {
7979
await ui.messageReceiver(event)
8080
})
8181
)
82+
83+
/**
84+
* We need to manually indicate that the UI is ready since we are using a custom mynah UI event routing
85+
* implementation instead of routing events through the real webview
86+
**/
87+
DefaultAmazonQAppInitContext.instance.getAppsToWebViewMessagePublisher().setUiReady()
8288
}
8389

8490
/**

packages/amazonq/test/e2e/amazonq/framework/messenger.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ export class Messenger {
190190
* Wait until the chat has finished loading. This happens when a backend request
191191
* has finished and responded in the chat
192192
*/
193-
await waitUntil(
194-
() => {
195-
return Promise.resolve(event())
193+
const ok = await waitUntil(
194+
async () => {
195+
return event()
196196
},
197197
{
198198
interval: waitOverrides ? waitOverrides.waitIntervalInMs : this.waitIntervalInMs,
@@ -202,7 +202,7 @@ export class Messenger {
202202
)
203203

204204
// Do another check just in case the waitUntil time'd out
205-
if (!event()) {
205+
if (!ok) {
206206
assert.fail(
207207
`Event has not finished loading in: ${waitOverrides ? waitOverrides.waitTimeoutInMs : this.waitTimeoutInMs} ms`
208208
)

0 commit comments

Comments
 (0)