Skip to content

Commit 48627bd

Browse files
committed
feature: view history test
1 parent fcd5942 commit 48627bd

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import '../utils/setup'
66
import { WebviewView, By } from 'vscode-extension-tester'
77
import { testContext } from '../utils/testContext'
8-
import { waitForChatResponse, writeToChat, clearChatInput } from '../utils/generalUtils'
8+
import { waitForChatResponse, writeToChat, waitForElement } from '../utils/generalUtils'
99
import { closeAllTabs } from '../utils/cleanupUtils'
1010

1111
describe('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

Comments
 (0)