Skip to content

Commit

Permalink
fix: field for endtoendbuilddurationInSeconds
Browse files Browse the repository at this point in the history
  • Loading branch information
mradulsf committed Jun 26, 2024
1 parent 8cfade8 commit c1d2d20
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions messages/package_version_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,6 @@ Created By

Language

# endToEndBuildDuration
# endToEndBuildDurationInSeconds

End To End Build Duration
End To End Build Duration In Seconds
2 changes: 1 addition & 1 deletion schemas/package-version-report.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
"AncestorId": {
"type": ["string", "null"]
},
"EndToEndBuildDuration": {
"EndToEndBuildDurationInSeconds": {
"type": "number"
}
},
Expand Down
9 changes: 5 additions & 4 deletions src/commands/package/version/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,6 @@ export class PackageVersionReportCommand extends SfCommand<PackageVersionReportR
key: plMessages.getMessage('createdBy'),
value: record.CreatedById,
},
{
key: pvlMessages.getMessage('endToEndBuildDuration'),
value: record.EndToEndBuildDuration === null ? '' : record.EndToEndBuildDuration?.toFixed(1),
},
];
const maximumNumClasses = 15; // Number of least code covered classes displayed on the cli output for better UX.
let codeCovStr = ''; // String to display when code coverage data is empty or null
Expand All @@ -189,6 +185,11 @@ export class PackageVersionReportCommand extends SfCommand<PackageVersionReportR
}));
this.haveCodeCoverageData = displayCoverageRecords.length > 0;
}

displayRecords.push({
key: pvlMessages.getMessage('endToEndBuildDurationInSeconds'),
value: record.EndToEndBuildDurationInSeconds === null ? '' : record.EndToEndBuildDurationInSeconds?.toFixed(1),
});
}

// Always append code coverage column label ar the end
Expand Down
2 changes: 2 additions & 0 deletions test/commands/package/versionReport.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const pkgVersionReportResultModified: PackageVersionReportResultModified = {
Tag: '',
ValidationSkipped: false,
Version: '0.0.0.0',
EndToEndBuildDurationInSeconds: 299.0,
};

const pkgVersionReportResult: PackageVersionReportResult = {
Expand Down Expand Up @@ -105,6 +106,7 @@ const pkgVersionReportResult: PackageVersionReportResult = {
Tag: '',
ValidationSkipped: false,
Version: '0.0.0.0',
EndToEndBuildDurationInSeconds: 299.0,
};

describe('package:version:report - tests', () => {
Expand Down

0 comments on commit c1d2d20

Please sign in to comment.