File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed
test/codewhisperer/commands Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ function getAmazonQCodeWhispererNodes() {
71
71
72
72
// Security scans
73
73
createSeparator ( 'Security Scans' ) ,
74
- createAutoScans ( autoScansEnabled ) ,
74
+ ... ( AuthUtil . instance . isBuilderIdInUse ( ) ? [ ] : [ createAutoScans ( autoScansEnabled ) ] ) ,
75
75
createSecurityScan ( ) ,
76
76
77
77
// Amazon Q + others
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ import {
41
41
createReconnect ,
42
42
createSecurityScan ,
43
43
createSelectCustomization ,
44
+ createSeparator ,
44
45
createSettingsNode ,
45
46
createSignIn ,
46
47
createSignout ,
@@ -389,6 +390,31 @@ describe('CodeWhisperer-basicCommands', function () {
389
390
390
391
await listCodeWhispererCommands . execute ( )
391
392
} )
393
+
394
+ it ( 'should not show auto-scans if using builder id' , async function ( ) {
395
+ sinon . stub ( AuthUtil . instance , 'isConnected' ) . returns ( true )
396
+ sinon . stub ( AuthUtil . instance , 'isBuilderIdInUse' ) . returns ( true )
397
+
398
+ getTestWindow ( ) . onDidShowQuickPick ( async e => {
399
+ e . assertItems ( [
400
+ createSeparator ( 'Inline Suggestions' ) ,
401
+ createAutoSuggestions ( false ) ,
402
+ createOpenReferenceLog ( ) ,
403
+ createGettingStarted ( ) ,
404
+ createSeparator ( 'Security Scans' ) ,
405
+ createSecurityScan ( ) ,
406
+ createSeparator ( 'Other Features' ) ,
407
+ switchToAmazonQNode ( ) ,
408
+ createSeparator ( 'Connect / Help' ) ,
409
+ ...genericItems ( ) ,
410
+ createSeparator ( ) ,
411
+ createSettingsNode ( ) ,
412
+ createSignout ( ) ,
413
+ ] )
414
+ e . dispose ( ) // skip needing to select an item to continue
415
+ } )
416
+ await listCodeWhispererCommands . execute ( )
417
+ } )
392
418
} )
393
419
394
420
describe ( 'applySecurityFix' , function ( ) {
You can’t perform that action at this time.
0 commit comments