@@ -68,7 +68,7 @@ describe('StackActionsCodeLens', () => {
6868 expect ( result ) . toEqual ( [ ] ) ;
6969 } ) ;
7070
71- it ( 'should return two code lenses for valid CFN template with Resources' , ( ) => {
71+ it ( 'should return one code lens for valid CFN template with Resources' , ( ) => {
7272 mockSyntaxTreeManager . getSyntaxTree . returns ( { rootNode : { } } as any ) ;
7373 mockGetEntityMap . mockReturnValue ( new Map ( [ [ 'Bucket' , { } ] ] ) ) ;
7474
@@ -78,13 +78,10 @@ describe('StackActionsCodeLens', () => {
7878
7979 const result = getStackActionsCodeLenses ( 'file:///test.yaml' , document , mockSyntaxTreeManager ) ;
8080
81- expect ( result ) . toHaveLength ( 2 ) ;
82- expect ( result [ 0 ] . command ?. title ) . toBe ( 'Validate Deployment ' ) ;
83- expect ( result [ 0 ] . command ?. command ) . toBe ( 'aws.cloudformation.api.validateDeployment ' ) ;
81+ expect ( result ) . toHaveLength ( 1 ) ;
82+ expect ( result [ 0 ] . command ?. title ) . toBe ( 'Validate and Deploy ' ) ;
83+ expect ( result [ 0 ] . command ?. command ) . toBe ( 'aws.cloudformation.api.deployTemplate ' ) ;
8484 expect ( result [ 0 ] . command ?. arguments ) . toEqual ( [ 'file:///test.yaml' ] ) ;
85- expect ( result [ 1 ] . command ?. title ) . toBe ( 'Deploy Template' ) ;
86- expect ( result [ 1 ] . command ?. command ) . toBe ( 'aws.cloudformation.api.deployTemplate' ) ;
87- expect ( result [ 1 ] . command ?. arguments ) . toEqual ( [ 'file:///test.yaml' ] ) ;
8885 } ) ;
8986
9087 it ( 'should place code lens on line 0 for simple template' , ( ) => {
@@ -165,7 +162,7 @@ describe('StackActionsCodeLens', () => {
165162
166163 const result = getStackActionsCodeLenses ( 'file:///test.yaml' , document , mockSyntaxTreeManager ) ;
167164
168- expect ( result ) . toHaveLength ( 2 ) ;
165+ expect ( result ) . toHaveLength ( 1 ) ;
169166 expect ( result [ 0 ] . range . start . line ) . toBe ( 0 ) ;
170167 } ) ;
171168
@@ -184,7 +181,7 @@ describe('StackActionsCodeLens', () => {
184181
185182 const result = getStackActionsCodeLenses ( 'file:///test.yaml' , document , mockSyntaxTreeManager ) ;
186183
187- expect ( result ) . toHaveLength ( 2 ) ;
184+ expect ( result ) . toHaveLength ( 1 ) ;
188185 } ) ;
189186
190187 it ( 'should handle JSON template' , ( ) => {
@@ -197,7 +194,7 @@ describe('StackActionsCodeLens', () => {
197194
198195 const result = getStackActionsCodeLenses ( 'file:///test.json' , document , mockSyntaxTreeManager ) ;
199196
200- expect ( result ) . toHaveLength ( 2 ) ;
197+ expect ( result ) . toHaveLength ( 1 ) ;
201198 } ) ;
202199
203200 it ( 'should handle template with multiple resources' , ( ) => {
@@ -221,7 +218,7 @@ describe('StackActionsCodeLens', () => {
221218
222219 const result = getStackActionsCodeLenses ( 'file:///test.yaml' , document , mockSyntaxTreeManager ) ;
223220
224- expect ( result ) . toHaveLength ( 2 ) ;
221+ expect ( result ) . toHaveLength ( 1 ) ;
225222 } ) ;
226223
227224 it ( 'should handle whitespace-only lines correctly' , ( ) => {
0 commit comments