Skip to content

Commit 1b5944e

Browse files
author
David Hasani
committed
add test
1 parent ac2c038 commit 1b5944e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/amazonq/test/e2e/amazonq/transformByQ.test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { GumbyController, setMaven, startTransformByQ, TabsStorage } from 'aws-c
1212
import { using, registerAuthHook, TestFolder } from 'aws-core-vscode/test'
1313
import { loginToIdC } from './utils/setup'
1414
import { fs } from 'aws-core-vscode/shared'
15+
import * as os from 'os'
1516
import path from 'path'
1617

1718
describe('Amazon Q Code Transformation', function () {
@@ -153,6 +154,21 @@ describe('Amazon Q Code Transformation', function () {
153154
const jdkPathResponse = tab.getChatItems().pop()
154155
// this 'Sorry' message is OK - just making sure that the UI components are working correctly
155156
assert.strictEqual(jdkPathResponse?.body?.includes("Sorry, I couldn't locate your Java installation"), true)
157+
158+
transformByQState.setSummaryFilePath(path.join(os.tmpdir(), 'summary.md'))
159+
160+
tab.clickCustomFormButton({
161+
id: 'gumbyViewSummary',
162+
text: 'View summary',
163+
})
164+
165+
await tab.waitForEvent(() => tab.getChatItems().length > 14, {
166+
waitTimeoutInMs: 5000,
167+
waitIntervalInMs: 1000,
168+
})
169+
170+
const viewSummaryChatItem = tab.getChatItems().pop()
171+
assert.strictEqual(viewSummaryChatItem?.body?.includes('view a summary'), true)
156172
})
157173

158174
it('Can provide metadata file for a SQL conversion', async () => {

0 commit comments

Comments
 (0)