From daaefa40b619b0cc66ac019a6802530a22c632d7 Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Fri, 20 Dec 2024 14:34:34 -0700 Subject: [PATCH] fix: rename test-set to test-cases --- command-snapshot.json | 4 ++-- ...gent.generate.test-set.md => agent.generate.test-cases.md} | 0 src/commands/agent/generate/{test-set.ts => test-cases.ts} | 4 ++-- .../agent/generate/{test-set.test.ts => test-cases.test.ts} | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename messages/{agent.generate.test-set.md => agent.generate.test-cases.md} (100%) rename src/commands/agent/generate/{test-set.ts => test-cases.ts} (98%) rename test/commands/agent/generate/{test-set.test.ts => test-cases.test.ts} (98%) diff --git a/command-snapshot.json b/command-snapshot.json index effe5fb..382df40 100644 --- a/command-snapshot.json +++ b/command-snapshot.json @@ -29,7 +29,7 @@ }, { "alias": [], - "command": "agent:generate:test-definition", + "command": "agent:generate:test-cases", "flagAliases": [], "flagChars": [], "flags": ["flags-dir"], @@ -37,7 +37,7 @@ }, { "alias": [], - "command": "agent:generate:test-set", + "command": "agent:generate:test-definition", "flagAliases": [], "flagChars": [], "flags": ["flags-dir"], diff --git a/messages/agent.generate.test-set.md b/messages/agent.generate.test-cases.md similarity index 100% rename from messages/agent.generate.test-set.md rename to messages/agent.generate.test-cases.md diff --git a/src/commands/agent/generate/test-set.ts b/src/commands/agent/generate/test-cases.ts similarity index 98% rename from src/commands/agent/generate/test-set.ts rename to src/commands/agent/generate/test-cases.ts index aeeca15..6b1f632 100644 --- a/src/commands/agent/generate/test-set.ts +++ b/src/commands/agent/generate/test-cases.ts @@ -13,7 +13,7 @@ import { XMLParser } from 'fast-xml-parser'; import { theme } from '../../../inquirer-theme.js'; import { readDir } from '../../../read-dir.js'; Messages.importMessagesDirectoryFromMetaUrl(import.meta.url); -const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.generate.test-set'); +const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.generate.test-cases'); // TODO: add these back once we refine the regex // export const FORTY_CHAR_API_NAME_REGEX = @@ -154,7 +154,7 @@ export function constructTestSetXML(testCases: TestSetInputs[]): string { return xml; } -export default class AgentGenerateTestset extends SfCommand { +export default class AgentGenerateTestCases extends SfCommand { public static readonly summary = messages.getMessage('summary'); public static readonly description = messages.getMessage('description'); public static readonly examples = messages.getMessages('examples'); diff --git a/test/commands/agent/generate/test-set.test.ts b/test/commands/agent/generate/test-cases.test.ts similarity index 98% rename from test/commands/agent/generate/test-set.test.ts rename to test/commands/agent/generate/test-cases.test.ts index d025cbd..5301270 100644 --- a/test/commands/agent/generate/test-set.test.ts +++ b/test/commands/agent/generate/test-cases.test.ts @@ -5,7 +5,7 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ import { expect } from 'chai'; -import { type TestSetInputs, constructTestSetXML } from '../../../../src/commands/agent/generate/test-set.js'; +import { type TestSetInputs, constructTestSetXML } from '../../../../src/commands/agent/generate/test-cases.js'; describe('constructTestSetXML', () => { it('should return a valid test set XML', () => {