Skip to content

Commit 99e9daa

Browse files
committed
fix: update expected result for version list command
1 parent 4824f1e commit 99e9daa

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

test/commands/package/packageVersion.nut.ts

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,27 @@ const expectedPVCRkeys = [
4545
'TotalNumberOfMetadataFiles',
4646
];
4747

48+
// Keys expected for Package version create list.
49+
//TotalNumberOfMetadataFiles is not included.
50+
const expectedPVCLkeys = [
51+
'Id',
52+
'Status',
53+
'Package2Id',
54+
'Package2Name',
55+
'Package2VersionId',
56+
'SubscriberPackageVersionId',
57+
'Tag',
58+
'Branch',
59+
'Error',
60+
'CreatedDate',
61+
'HasMetadataRemoved',
62+
'HasPassedCodeCoverageCheck',
63+
'CreatedBy',
64+
'ConvertedFromVersionId',
65+
'CodeCoverage',
66+
'VersionNumber',
67+
];
68+
4869
describe('package:version:*', () => {
4970
let session: TestSession;
5071
let packageId: string | undefined;
@@ -216,7 +237,7 @@ describe('package:version:*', () => {
216237
expect(output).to.be.ok;
217238
expect(output?.status).to.equal(0);
218239
expect(output?.result).to.have.length.greaterThan(0);
219-
expect(output?.result[0]).to.have.keys(expectedPVCRkeys);
240+
expect(output?.result[0]).to.have.keys(expectedPVCLkeys);
220241
const current = Date.now();
221242
// @ts-ignore
222243
const created = Date.parse(output?.result?.at(0).CreatedDate);
@@ -235,7 +256,7 @@ describe('package:version:*', () => {
235256
expect(output).to.be.ok;
236257
expect(output?.status).to.equal(0);
237258
expect(output?.result).to.have.length.greaterThan(0);
238-
expect(output?.result[0]).to.have.keys(expectedPVCRkeys);
259+
expect(output?.result[0]).to.have.keys(expectedPVCLkeys);
239260
});
240261

241262
it('should list the package versions created as part of package conversion from 1GP --show-conversions-only flag (human)', async () => {
@@ -249,7 +270,7 @@ describe('package:version:*', () => {
249270
it('should list the package versions created --verbose (json)', async () => {
250271
const command = `package:version:create:list --status Success --created-last-days 10 -v ${session.hubOrg.username} --json --verbose`;
251272
const output = execCmd<CreateListCommandResult>(command, { ensureExitCode: 0 }).jsonOutput;
252-
const expectedVerboseKeys = [...expectedPVCRkeys, 'VersionName'];
273+
const expectedVerboseKeys = [...expectedPVCLkeys, 'VersionName'];
253274
expect(output).to.be.ok;
254275
expect(output?.status).to.equal(0);
255276
expect(output?.result).to.have.length.greaterThan(0);

0 commit comments

Comments
 (0)