Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
David Hasani committed Dec 18, 2024
1 parent ac2c038 commit 1b5944e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/amazonq/test/e2e/amazonq/transformByQ.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { GumbyController, setMaven, startTransformByQ, TabsStorage } from 'aws-c
import { using, registerAuthHook, TestFolder } from 'aws-core-vscode/test'
import { loginToIdC } from './utils/setup'
import { fs } from 'aws-core-vscode/shared'
import * as os from 'os'
import path from 'path'

describe('Amazon Q Code Transformation', function () {
Expand Down Expand Up @@ -153,6 +154,21 @@ describe('Amazon Q Code Transformation', function () {
const jdkPathResponse = tab.getChatItems().pop()
// this 'Sorry' message is OK - just making sure that the UI components are working correctly
assert.strictEqual(jdkPathResponse?.body?.includes("Sorry, I couldn't locate your Java installation"), true)

transformByQState.setSummaryFilePath(path.join(os.tmpdir(), 'summary.md'))

tab.clickCustomFormButton({
id: 'gumbyViewSummary',
text: 'View summary',
})

await tab.waitForEvent(() => tab.getChatItems().length > 14, {
waitTimeoutInMs: 5000,
waitIntervalInMs: 1000,
})

const viewSummaryChatItem = tab.getChatItems().pop()
assert.strictEqual(viewSummaryChatItem?.body?.includes('view a summary'), true)
})

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

0 comments on commit 1b5944e

Please sign in to comment.