Skip to content

Commit b31da5c

Browse files
committed
debug info
1 parent f1ef96d commit b31da5c

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

packages/amazonq/test/e2e/amazonq/chat.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ describe('Amazon Q Chat', function () {
3636
// Make sure you're logged in before every test
3737
registerAuthHook('amazonq-test-account')
3838
framework = new qTestingFramework('cwc', true, [])
39+
console.log(document.body)
3940
tab = framework.getSelectedTab()
4041

4142
/**

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export class qTestingFramework {
4343
const appMessagePublisher = DefaultAmazonQAppInitContext.instance
4444
.getWebViewToAppsMessagePublishers()
4545
.get(featureName)
46+
console.log('Sending message to app', message)
4647
if (appMessagePublisher === undefined) {
4748
return
4849
}
@@ -76,6 +77,7 @@ export class qTestingFramework {
7677
const event = {
7778
data: JSON.stringify(message),
7879
} as any
80+
console.log('Received message from app', event.data)
7981
await ui.messageReceiver(event)
8082
})
8183
)

packages/amazonq/test/e2e/inline/inline.test.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ describe('Amazon Q Inline', async function () {
5252
const events = getEvents('codewhisperer_userTriggerDecision')
5353
console.table({
5454
'telemetry events': JSON.stringify(events),
55-
'suggestions states': JSON.stringify(session.suggestionStates),
56-
'valid recommendation': RecommendationHandler.instance.isValidResponse(),
55+
// 'suggestions states': JSON.stringify(session.suggestionStates),
56+
// 'valid recommendation': RecommendationHandler.instance.isValidResponse(),
5757
'recommendation service status': RecommendationService.instance.isRunning,
58-
recommendations: session.recommendations,
58+
// recommendations: session.recommendations,
5959
})
6060
}
6161

@@ -83,8 +83,14 @@ describe('Amazon Q Inline', async function () {
8383
`Suggestions failed to become visible. Suggestion States: ${JSON.stringify(session.suggestionStates)}`
8484
)
8585
}
86-
if (session.recommendations.length === 0) {
87-
throw new Error('No recommendations were generated')
86+
console.table({
87+
'suggestions states': JSON.stringify(session.suggestionStates),
88+
'valid recommendation': RecommendationHandler.instance.isValidResponse(),
89+
'recommendation service status': RecommendationService.instance.isRunning,
90+
recommendations: session.recommendations,
91+
})
92+
if (!RecommendationHandler.instance.isValidResponse()) {
93+
throw new Error('Did not find a valid response')
8894
}
8995
}
9096

0 commit comments

Comments
 (0)