Skip to content

Commit bd569cf

Browse files
authored
Fix codelens command and naming (#171)
1 parent d18ce36 commit bd569cf

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/codeLens/StackActionsCodeLens.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { CodeLens, Position, Range } from 'vscode-languageserver';
22

33
const STACK_ACTION_TITLES = {
4-
DRY_RUN: 'Dry Run Deployment',
5-
DEPLOY: 'Deploy',
4+
VALIDATE_DEPLOYMENT: 'Validate Deployment',
5+
DEPLOY: 'Deploy Template',
66
} as const;
77

88
const STACK_ACTION_COMMANDS = {
9-
VALIDATE: 'aws.cloudformation.api.validateTemplate',
9+
VALIDATE_DEPLOYMENT: 'aws.cloudformation.api.validateDeployment',
1010
DEPLOY: 'aws.cloudformation.api.deployTemplate',
1111
} as const;
1212

@@ -17,8 +17,8 @@ export function getStackActionsCodeLenses(uri: string): CodeLens[] {
1717
{
1818
range,
1919
command: {
20-
title: STACK_ACTION_TITLES.DRY_RUN,
21-
command: STACK_ACTION_COMMANDS.VALIDATE,
20+
title: STACK_ACTION_TITLES.VALIDATE_DEPLOYMENT,
21+
command: STACK_ACTION_COMMANDS.VALIDATE_DEPLOYMENT,
2222
arguments: [uri],
2323
},
2424
},

tst/unit/handlers/CodeLensHandler.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ describe('CodeLensHandler', () => {
6565
const result = await handler(params, CancellationToken.None);
6666

6767
expect(result).toHaveLength(3); // 2 stack actions + 1 managed resource
68-
expect(result[0].command?.title).toBe('Dry Run Deployment');
69-
expect(result[1].command?.title).toBe('Deploy');
68+
expect(result[0].command?.title).toBe('Validate Deployment');
69+
expect(result[1].command?.title).toBe('Deploy Template');
7070
expect(result[2].command?.title).toBe('Open Stack Template');
7171
});
7272

0 commit comments

Comments
 (0)