Skip to content

Commit 59e607b

Browse files
fix: remove Agent as a valid test-category value
1 parent d0aafed commit 59e607b

File tree

2 files changed

+4
-21
lines changed

2 files changed

+4
-21
lines changed

src/commands/logic/run/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export default class RunTestLogic extends SfCommand<RunCommandResult> {
9494
}),
9595
'test-category': arrayWithDeprecation({
9696
summary: messages.getMessage('flags.test-category.summary'),
97-
options: ['Agent', 'Apex', 'Flow'],
97+
options: ['Apex', 'Flow'],
9898
}),
9999
};
100100

test/commands/logic/run/test.test.ts

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,6 @@ describe('logic:test:run', () => {
4343
});
4444

4545
describe('--test-category flag', () => {
46-
it('should accept Agent as test category', async () => {
47-
const testServiceStub = sandbox.stub(TestService.prototype, 'runTestAsynchronous').resolves(logicTestRunSimple);
48-
await RunLogicTest.run([
49-
'--test-category',
50-
'Agent',
51-
'--test-level',
52-
'RunLocalTests',
53-
'--target-org',
54-
'test@user.com',
55-
]);
56-
57-
expect(testServiceStub.calledOnce).to.be.true;
58-
const testServiceCall = testServiceStub.getCall(0);
59-
const testRunOptions = testServiceCall.args[0];
60-
expect(testRunOptions.category).to.deep.equal(['Agent']);
61-
});
62-
6346
it('should accept Apex as test category', async () => {
6447
const testServiceStub = sandbox.stub(TestService.prototype, 'runTestAsynchronous').resolves(logicTestRunSimple);
6548
await RunLogicTest.run([
@@ -108,7 +91,7 @@ describe('logic:test:run', () => {
10891
]);
10992
assert.fail('Expected command to throw an error for invalid test category');
11093
} catch (error) {
111-
expect((error as Error).message).to.include('Expected --test-category=Invalid to be one of: Agent, Apex');
94+
expect((error as Error).message).to.include('Expected --test-category=Invalid to be one of: Apex, Flow');
11295
}
11396
});
11497

@@ -129,7 +112,7 @@ describe('logic:test:run', () => {
129112
try {
130113
await RunLogicTest.run([
131114
'--test-category',
132-
'Agent',
115+
'Flow',
133116
'--class-names',
134117
'TestClass',
135118
'--target-org',
@@ -161,7 +144,7 @@ describe('logic:test:run', () => {
161144
try {
162145
await RunLogicTest.run([
163146
'--test-category',
164-
'Agent',
147+
'Flow',
165148
'--tests',
166149
'TestClass.testMethod',
167150
'--target-org',

0 commit comments

Comments
 (0)