55import '../utils/setup'
66import { WebviewView , By } from 'vscode-extension-tester'
77import { testContext } from '../utils/testContext'
8- import { waitForChatResponse , writeToChat , clearChatInput } from '../utils/generalUtils'
8+ import { waitForChatResponse , writeToChat , waitForElement } from '../utils/generalUtils'
99import { closeAllTabs } from '../utils/cleanupUtils'
1010
1111describe ( 'Amazon Q Chat Basic Functionality' , function ( ) {
@@ -18,7 +18,6 @@ describe('Amazon Q Chat Basic Functionality', function () {
1818 } )
1919
2020 afterEach ( async function ( ) {
21- await clearChatInput ( webviewView )
2221 await closeAllTabs ( webviewView )
2322 } )
2423
@@ -37,4 +36,13 @@ describe('Amazon Q Chat Basic Functionality', function () {
3736 await addChat . click ( )
3837 }
3938 } )
39+ it ( 'View History' , async ( ) => {
40+ console . log ( 'Starting View History Test' )
41+ const viewHistory = await webviewView . findWebElement ( By . css ( '.mynah-ui-icon.mynah-ui-icon-history' ) )
42+ await viewHistory . click ( )
43+ await waitForElement ( webviewView , By . css ( '.mynah-detailed-list-item-groups-wrapper' ) )
44+ console . log ( 'History wrapper found successfully' )
45+ const closeHistory = await waitForElement ( webviewView , By . css ( '.mynah-ui-icon.mynah-ui-icon-cancel' ) )
46+ await closeHistory . click ( )
47+ } )
4048} )
0 commit comments