33 * SPDX-License-Identifier: Apache-2.0
44 */
55import '../utils/setup'
6- import { WebviewView } from 'vscode-extension-tester'
6+ import { WebviewView , By } from 'vscode-extension-tester'
77import { testContext } from '../utils/testContext'
8- import { clearChat , waitForChatResponse , writeToChat } from '../utils/generalUtils'
8+ import { waitForChatResponse , writeToChat , clearChat } from '../utils/generalUtils'
99import { closeAllTabs } from '../utils/cleanupUtils'
1010
1111describe ( '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