@@ -9,20 +9,15 @@ import sinon from 'sinon'
99import { AutoDebugFeature } from '../../../amazonq/autoDebug/index'
1010import { AutoDebugController , AutoDebugConfig } from '../../../amazonq/autoDebug/autoDebugController'
1111import { Commands } from '../../../shared/vscode/commands2'
12- import { focusAmazonQPanel } from '../../../codewhispererChat/commands/registerCommands'
1312describe ( 'AutoDebugFeature' , function ( ) {
1413 let autoDebugFeature : AutoDebugFeature
1514 let mockContext : vscode . ExtensionContext
1615 let commandsRegisterStub : sinon . SinonStub
17- let focusAmazonQPanelStub : sinon . SinonStub
1816
1917 beforeEach ( function ( ) {
2018 // Mock Commands
2119 commandsRegisterStub = sinon . stub ( Commands , 'register' )
2220
23- // Mock focusAmazonQPanel
24- focusAmazonQPanelStub = sinon . stub ( focusAmazonQPanel , 'execute' )
25-
2621 // Mock VSCode APIs
2722 mockContext = {
2823 subscriptions : [ ] ,
@@ -209,41 +204,6 @@ describe('AutoDebugFeature', function () {
209204 } )
210205 } )
211206 } )
212-
213- describe ( 'triggerFixWithAmazonQ' , function ( ) {
214- it ( 'triggers fix successfully' , async function ( ) {
215- const fixAllProblemsStub = sinon . stub ( AutoDebugController . prototype , 'fixAllProblemsInFile' ) . resolves ( )
216- focusAmazonQPanelStub . resolves ( )
217- await autoDebugFeature . activate ( mockContext )
218-
219- // Access private method through any cast for testing
220- await ( autoDebugFeature as any ) . triggerFixWithAmazonQ ( )
221-
222- assert . ok ( focusAmazonQPanelStub . calledOnce )
223- assert . ok ( fixAllProblemsStub . calledOnceWith ( 10 ) )
224- } )
225-
226- it ( 'handles controller not initialized' , async function ( ) {
227- // Access private method through any cast for testing
228- await ( autoDebugFeature as any ) . triggerFixWithAmazonQ ( )
229-
230- // Should not throw, should handle gracefully
231- assert . ok ( focusAmazonQPanelStub . notCalled )
232- } )
233-
234- it ( 'handles fix errors' , async function ( ) {
235- sinon . stub ( AutoDebugController . prototype , 'fixAllProblemsInFile' ) . rejects ( new Error ( 'Fix failed' ) )
236- focusAmazonQPanelStub . resolves ( )
237- await autoDebugFeature . activate ( mockContext )
238-
239- // Access private method through any cast for testing
240- // Should not throw, should handle gracefully
241- assert . doesNotThrow ( async ( ) => {
242- await ( autoDebugFeature as any ) . triggerFixWithAmazonQ ( )
243- } )
244- } )
245- } )
246-
247207 describe ( 'setLanguageClient' , function ( ) {
248208 it ( 'sets language client on controller' , async function ( ) {
249209 const setLanguageClientStub = sinon . stub ( AutoDebugController . prototype , 'setLanguageClient' )
0 commit comments