@@ -22,6 +22,7 @@ import {
2222describe ( 'Amazon Q Doc Generation' , async function ( ) {
2323 let framework : qTestingFramework
2424 let tab : Messenger
25+ let initialTab : Messenger
2526 let workspaceUri : vscode . Uri
2627 let rootReadmeFileUri : vscode . Uri
2728
@@ -242,8 +243,7 @@ describe('Amazon Q Doc Generation', async function () {
242243 return testProjects [ randomIndex ]
243244 } ,
244245 async setupTest ( ) {
245- tab = framework . createTab ( )
246- tab . addChatMessage ( { command : '/doc' } )
246+ initialTab . addChatMessage ( { command : '/doc' } )
247247 tab = framework . getSelectedTab ( )
248248 await tab . waitForChatFinishesLoading ( )
249249 } ,
@@ -309,7 +309,7 @@ describe('Amazon Q Doc Generation', async function () {
309309 beforeEach ( ( ) => {
310310 registerAuthHook ( 'amazonq-test-account' )
311311 framework = new qTestingFramework ( 'doc' , true , [ ] )
312- tab = framework . createTab ( )
312+ initialTab = framework . createTab ( )
313313 const wsFolders = vscode . workspace . workspaceFolders
314314 if ( ! wsFolders ?. length ) {
315315 assert . fail ( 'Workspace folder not found' )
@@ -319,6 +319,7 @@ describe('Amazon Q Doc Generation', async function () {
319319 } )
320320
321321 afterEach ( ( ) => {
322+ framework . removeTab ( initialTab . tabID )
322323 framework . removeTab ( tab . tabID )
323324 framework . dispose ( )
324325 } )
0 commit comments