@@ -182,7 +182,12 @@ describe('Amazon Q Doc Generation', async function () {
182182 } ,
183183
184184 async executeDocumentationFlow ( operation : 'create' | 'update' | 'edit' , msg ?: string ) {
185- const mode = operation === 'create' ? Mode . CREATE : operation === 'update' ? Mode . SYNC : Mode . EDIT
185+ const mode = {
186+ create : Mode . CREATE ,
187+ update : Mode . SYNC ,
188+ edit : Mode . EDIT ,
189+ } [ operation ]
190+
186191 console . log ( `Executing documentation ${ operation } flow` )
187192
188193 await tab . waitForButtons ( [ FollowUpTypes . ProceedFolderSelection ] )
@@ -320,7 +325,7 @@ describe('Amazon Q Doc Generation', async function () {
320325 } )
321326
322327 describe ( 'Quick action availability' , ( ) => {
323- it ( 'Should show /doc command when doc generation is enabled' , async ( ) => {
328+ it ( 'Shows /doc command when doc generation is enabled' , async ( ) => {
324329 const command = tab . findCommand ( '/doc' )
325330 if ( ! command . length ) {
326331 assert . fail ( 'Could not find command' )
@@ -331,7 +336,7 @@ describe('Amazon Q Doc Generation', async function () {
331336 }
332337 } )
333338
334- it ( 'Should hide /doc command when doc generation is NOT enabled' , ( ) => {
339+ it ( 'Hide /doc command when doc generation is NOT enabled' , ( ) => {
335340 // The beforeEach registers a framework which accepts requests. If we don't dispose before building a new one we have duplicate messages
336341 framework . dispose ( )
337342 framework = new qTestingFramework ( 'doc' , false , [ ] )
@@ -348,10 +353,10 @@ describe('Amazon Q Doc Generation', async function () {
348353 await docUtils . setupTest ( )
349354 } )
350355
351- it ( 'Should display create and update options on initial load' , async ( ) => {
356+ it ( 'Display create and update options on initial load' , async ( ) => {
352357 await tab . waitForButtons ( [ FollowUpTypes . CreateDocumentation , FollowUpTypes . UpdateDocumentation ] )
353358 } )
354- it ( 'Should return to the select create or update documentation state when cancel button clicked' , async ( ) => {
359+ it ( 'Return to the select create or update documentation state when cancel button clicked' , async ( ) => {
355360 await tab . waitForButtons ( [ FollowUpTypes . CreateDocumentation , FollowUpTypes . UpdateDocumentation ] )
356361 tab . clickButton ( FollowUpTypes . UpdateDocumentation )
357362 await tab . waitForButtons ( [ FollowUpTypes . SynchronizeDocumentation , FollowUpTypes . EditDocumentation ] )
@@ -377,14 +382,14 @@ describe('Amazon Q Doc Generation', async function () {
377382 testProject = docUtils . getRandomTestProject ( )
378383 } )
379384
380- it ( 'Should create and save README in root folder when accepted' , async ( ) => {
385+ it ( 'Create and save README in root folder when accepted' , async ( ) => {
381386 await retryIfRequired ( async ( ) => {
382387 await docUtils . initializeDocOperation ( 'create' )
383388 await docUtils . executeDocumentationFlow ( 'create' )
384389 await docUtils . verifyResult ( FollowUpTypes . AcceptChanges , rootReadmeFileUri , true )
385390 } )
386391 } )
387- it ( 'Should create and save README in subfolder when accepted' , async ( ) => {
392+ it ( 'Create and save README in subfolder when accepted' , async ( ) => {
388393 await retryIfRequired ( async ( ) => {
389394 await docUtils . initializeDocOperation ( 'create' )
390395 const readmeFileUri = await docUtils . handleFolderSelection ( testProject )
@@ -393,7 +398,7 @@ describe('Amazon Q Doc Generation', async function () {
393398 } )
394399 } )
395400
396- it ( 'Should discard README in subfolder when rejected' , async ( ) => {
401+ it ( 'Discard README in subfolder when rejected' , async ( ) => {
397402 await retryIfRequired ( async ( ) => {
398403 await docUtils . initializeDocOperation ( 'create' )
399404 const readmeFileUri = await docUtils . handleFolderSelection ( testProject )
@@ -408,15 +413,15 @@ describe('Amazon Q Doc Generation', async function () {
408413 await docUtils . setupTest ( )
409414 } )
410415
411- it ( 'Should apply specific content changes when requested' , async ( ) => {
416+ it ( 'Apply specific content changes when requested' , async ( ) => {
412417 await retryIfRequired ( async ( ) => {
413418 await docUtils . initializeDocOperation ( 'edit' )
414419 await docUtils . executeDocumentationFlow ( 'edit' , 'remove the repository structure section' )
415420 await docUtils . verifyResult ( FollowUpTypes . AcceptChanges , rootReadmeFileUri , true )
416421 } )
417422 } )
418423
419- it ( 'Should handle unrelated prompts with appropriate error message' , async ( ) => {
424+ it ( 'Handle unrelated prompts with appropriate error message' , async ( ) => {
420425 await retryIfRequired ( async ( ) => {
421426 await docUtils . initializeDocOperation ( 'edit' )
422427 await tab . waitForButtons ( [ FollowUpTypes . ProceedFolderSelection ] )
@@ -452,7 +457,7 @@ describe('Amazon Q Doc Generation', async function () {
452457 }
453458 } )
454459
455- it ( 'Should update README with code change in subfolder' , async ( ) => {
460+ it ( 'Update README with code change in subfolder' , async ( ) => {
456461 mockFileUri = await docUtils . prepareMockFile ( testProject )
457462 await retryIfRequired ( async ( ) => {
458463 await docUtils . initializeDocOperation ( 'update' )
@@ -461,7 +466,7 @@ describe('Amazon Q Doc Generation', async function () {
461466 await docUtils . verifyResult ( FollowUpTypes . AcceptChanges , readmeFileUri , true )
462467 } )
463468 } )
464- it ( 'Should update root README and incorporate additional changes' , async ( ) => {
469+ it ( 'Update root README and incorporate additional changes' , async ( ) => {
465470 // Cleanup any existing README
466471 await fs . delete ( rootReadmeFileUri , { force : true } )
467472 mockFileUri = await docUtils . prepareMockFile ( testProject )
0 commit comments