Skip to content

Commit 5d0a29f

Browse files
committed
fix: add command schema file for sandbox refresh
1 parent 3f9d5ca commit 5d0a29f

File tree

3 files changed

+52
-3
lines changed

3 files changed

+52
-3
lines changed

schemas/org-refresh-sandbox.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$ref": "#/definitions/SandboxProcessObject",
4+
"definitions": {
5+
"SandboxProcessObject": {
6+
"type": "object",
7+
"properties": {
8+
"Id": {
9+
"type": "string"
10+
},
11+
"Status": {
12+
"type": "string"
13+
},
14+
"SandboxName": {
15+
"type": "string"
16+
},
17+
"SandboxInfoId": {
18+
"type": "string"
19+
},
20+
"LicenseType": {
21+
"type": "string"
22+
},
23+
"CreatedDate": {
24+
"type": "string"
25+
},
26+
"SandboxOrganization": {
27+
"type": "string"
28+
},
29+
"CopyProgress": {
30+
"type": "number"
31+
},
32+
"SourceId": {
33+
"type": "string"
34+
},
35+
"Description": {
36+
"type": "string"
37+
},
38+
"ApexClassId": {
39+
"type": "string"
40+
},
41+
"EndDate": {
42+
"type": "string"
43+
}
44+
},
45+
"required": ["Id", "Status", "SandboxName", "SandboxInfoId", "LicenseType", "CreatedDate"],
46+
"additionalProperties": false
47+
}
48+
}
49+
}

test/nut/sandboxRefresh.nut.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,8 @@ describe('Sandbox Refresh', () => {
327327
loginUrl: 'https://test.salesforce.com',
328328
};
329329
// This call is to auth a completed sandbox refresh
330-
// @ts-expect-error stubbing private function
331330
const sandboxSignupCompleteStub = sinonSandbox
331+
// @ts-expect-error stubbing private function
332332
.stub(Org.prototype, 'sandboxSignupComplete')
333333
.resolves(sbxAuthResponse);
334334

test/unit/org/resumeSandbox.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77

8-
98
import {
109
Lifecycle,
1110
Messages,
@@ -49,6 +48,7 @@ const sandboxProcessObj: SandboxProcessObject = {
4948

5049
const sandboxRequestData: SandboxRequestCacheEntry = {
5150
prodOrgUsername,
51+
action: 'Create',
5252
sandboxRequest: {},
5353
sandboxProcessObject: {
5454
SandboxName: sandboxName,
@@ -57,7 +57,7 @@ const sandboxRequestData: SandboxRequestCacheEntry = {
5757
};
5858

5959
describe('[org resume sandbox]', () => {
60-
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
60+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
6161
const messages = Messages.loadMessages('@salesforce/plugin-org', 'sandboxbase');
6262

6363
const sandbox = sinon.createSandbox();

0 commit comments

Comments
 (0)