Skip to content

Commit 565cf5f

Browse files
committed
test
1 parent 0db682f commit 565cf5f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { assertContextCommands, assertQuickActions } from './assert'
1212
import { registerAuthHook, using } from 'aws-core-vscode/test'
1313
import { loginToIdC } from './utils/setup'
1414
import { webviewConstants } from 'aws-core-vscode/amazonq'
15-
import { sleep } from 'aws-core-vscode/shared'
1615

1716
describe('Amazon Q Chat', function () {
1817
let framework: qTestingFramework
@@ -35,9 +34,10 @@ describe('Amazon Q Chat', function () {
3534
beforeEach(async () => {
3635
// Make sure you're logged in before every test
3736
registerAuthHook('amazonq-test-account')
38-
await sleep(5000)
37+
// await sleep(5000)
3938
framework = new qTestingFramework('cwc', true, [])
40-
tab = framework.getTabs()[0] // use the default tab that gets created
39+
tab = framework.createTab()
40+
console.log('number of tabs: ' + framework.getTabs().length)
4141
store = tab.getStore()
4242
})
4343

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ describe('Amazon Q Inline', async function () {
7373
}
7474

7575
async function waitForRecommendations() {
76-
const ok = await waitUntil(
77-
async () =>
78-
RecommendationHandler.instance.isSuggestionVisible() || session.getSuggestionState(0) === 'Showed',
79-
waitOptions
80-
)
76+
const ok1 = await waitUntil(async () => session.getSuggestionState(0) === 'Showed', waitOptions)
77+
if (!ok1) {
78+
throw new Error(`Suggestion did not show: ${JSON.stringify(session.suggestionStates)}`)
79+
}
80+
const ok = await waitUntil(async () => RecommendationHandler.instance.isSuggestionVisible(), waitOptions)
8181
if (!ok) {
8282
throw new Error(
8383
`Suggestions failed to become visible. Suggestion States: ${JSON.stringify(session.suggestionStates)}`

0 commit comments

Comments
 (0)