Skip to content

Commit 6ad6649

Browse files
fix: rename className and update schema files
1 parent ad6f663 commit 6ad6649

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

schemas/apex-run-test.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@
140140
},
141141
"FullName": {
142142
"type": "string"
143+
},
144+
"Category": {
145+
"$ref": "#/definitions/TestCategory"
143146
}
144147
},
145148
"required": [
@@ -295,6 +298,10 @@
295298
"type": "string",
296299
"enum": ["Pass", "Fail", "CompileFail", "Skip"]
297300
},
301+
"TestCategory": {
302+
"type": "string",
303+
"enum": ["Apex", "Flow"]
304+
},
298305
"TestRunIdResult": {
299306
"type": "object",
300307
"properties": {

schemas/logic-get-test.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@
130130
},
131131
"FullName": {
132132
"type": "string"
133+
},
134+
"Category": {
135+
"$ref": "#/definitions/TestCategory"
133136
}
134137
},
135138
"required": [
@@ -284,6 +287,10 @@
284287
"ApexTestResultOutcome": {
285288
"type": "string",
286289
"enum": ["Pass", "Fail", "CompileFail", "Skip"]
290+
},
291+
"TestCategory": {
292+
"type": "string",
293+
"enum": ["Apex", "Flow"]
287294
}
288295
}
289296
}

src/commands/logic/get/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { TestGetBase } from '../../../shared/TestGetBase.js';
2020
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
2121
const messages = Messages.loadMessages('@salesforce/plugin-apex', 'logicgettest');
2222

23-
export default class Test extends SfCommand<RunResult> {
23+
export default class TestLogic extends SfCommand<RunResult> {
2424
public static readonly summary = messages.getMessage('summary');
2525
public static readonly description = messages.getMessage('description');
2626
public static readonly examples = messages.getMessages('examples');
@@ -56,7 +56,7 @@ export default class Test extends SfCommand<RunResult> {
5656
};
5757

5858
public async run(): Promise<RunResult> {
59-
const { flags } = await this.parse(Test);
59+
const { flags } = await this.parse(TestLogic);
6060

6161
return TestGetBase.execute({
6262
connection: flags['target-org'].getConnection(flags['api-version']),

src/reporters/jsonReporter.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77
import { ApexTestResultOutcome, TestResult } from '@salesforce/apex-node';
8-
import { ApexTestRunResultStatus } from '@salesforce/apex-node/lib/src/tests/types.js';
8+
import { ApexTestRunResultStatus, TestCategory } from '@salesforce/apex-node/lib/src/tests/types.js';
99

1010
export type RunResult = {
1111
summary: Summary;
@@ -47,6 +47,7 @@ type CliTestResult = {
4747
ApexClass: { Id: string; Name: string; NamespacePrefix: string };
4848
RunTime: number;
4949
FullName: string;
50+
Category?: TestCategory;
5051
};
5152

5253
type ClassCoverage = {

0 commit comments

Comments
 (0)