File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
packages/amazonq/test/e2e/amazonq/framework Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff 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 /**
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments