Skip to content

Commit 8fb92d2

Browse files
committed
add multiple chat test
1 parent 5d8706e commit 8fb92d2

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

packages/amazonq/test/e2e_new/amazonq/tests/chat.test.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55
import '../utils/setup'
6-
import { WebviewView } from 'vscode-extension-tester'
6+
import { WebviewView, By } from 'vscode-extension-tester'
77
import { testContext } from '../utils/testContext'
8-
import { clearChat, waitForChatResponse, writeToChat } from '../utils/generalUtils'
8+
import { waitForChatResponse, writeToChat, clearChat } from '../utils/generalUtils'
99
import { closeAllTabs } from '../utils/cleanupUtils'
1010

1111
describe('Amazon Q Chat Basic Functionality', function () {
@@ -17,12 +17,9 @@ describe('Amazon Q Chat Basic Functionality', function () {
1717
webviewView = testContext.webviewView
1818
})
1919

20-
after(async function () {
21-
await closeAllTabs(webviewView)
22-
})
23-
24-
afterEach(async () => {
20+
afterEach(async function () {
2521
await clearChat(webviewView)
22+
await closeAllTabs(webviewView)
2623
})
2724

2825
it('Chat Prompt Test', async () => {
@@ -33,4 +30,11 @@ describe('Amazon Q Chat Basic Functionality', function () {
3330
}
3431
console.log('Chat response detected successfully')
3532
})
33+
it('Multiple Chat Test', async () => {
34+
console.log('Starting Multiple Chat Test')
35+
for (let i = 0; i < 3; i++) {
36+
const addChat = await webviewView.findWebElement(By.css('.mynah-ui-icon.mynah-ui-icon-plus'))
37+
await addChat.click()
38+
}
39+
})
3640
})

0 commit comments

Comments
 (0)