Skip to content

Commit 325f1ea

Browse files
fix: repurposes 'error' column, to show the metadata type (#1217)
1 parent 7ece831 commit 325f1ea

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/formatters/deployResultFormatter.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,13 @@ export class DeployResultFormatter extends TestResultsFormatter implements Forma
310310
ux.log();
311311
ux.table({
312312
data: sortBy(failures, ['problemType', 'fullName', 'lineNumber', 'columnNumber', 'error']).map((f) => ({
313-
problemType: f.problemType,
313+
type: f.type,
314314
fullName: f.fullName,
315315
error: f.error,
316316
loc: f.lineNumber ? `${f.lineNumber}:${f.columnNumber ?? ''}` : '',
317317
})),
318318
columns: [
319-
{ key: 'problemType', name: 'Type' },
319+
{ key: 'type', name: 'Type' },
320320
{ key: 'fullName', name: 'Name' },
321321
{ key: 'error', name: 'Problem' },
322322
{ key: 'loc', name: 'Line:Column' },

test/utils/output.test.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ describe('deployResultFormatter', () => {
3838
expect(tableStub.firstCall.args[0]).to.deep.equal({
3939
data: [
4040
{
41-
problemType: 'Error',
41+
type: 'ApexClass',
4242
fullName: 'ProductController',
4343
error: 'This component has some problems',
4444
loc: '27:18',
4545
},
4646
],
4747
columns: [
48-
{ key: 'problemType', name: 'Type' },
48+
{ key: 'type', name: 'Type' },
4949
{ key: 'fullName', name: 'Name' },
5050
{ key: 'error', name: 'Problem' },
5151
{ key: 'loc', name: 'Line:Column' },
@@ -106,21 +106,21 @@ describe('deployResultFormatter', () => {
106106
expect(tableStub.firstCall.args[0]).to.deep.equal({
107107
data: [
108108
{
109-
problemType: 'Error',
109+
type: '',
110110
fullName: 'Create_property',
111111
error:
112112
"An object 'Create_property' of type Flow was named in package.xml, but was not found in zipped directory",
113113
loc: '',
114114
},
115115
{
116-
problemType: 'Error',
116+
type: 'ApexClass',
117117
fullName: 'ProductController',
118118
error: 'This component has some problems',
119119
loc: '27:18',
120120
},
121121
],
122122
columns: [
123-
{ key: 'problemType', name: 'Type' },
123+
{ key: 'type', name: 'Type' },
124124
{ key: 'fullName', name: 'Name' },
125125
{ key: 'error', name: 'Problem' },
126126
{ key: 'loc', name: 'Line:Column' },

0 commit comments

Comments
 (0)