@@ -14,6 +14,8 @@ const customFieldContent = `
1414 <trackFeedHistory>false</trackFeedHistory>
1515 <type>Url</type>
1616 <description>A Photo URL field</description>
17+ <securityClassification>Internal</securityClassification>
18+ <complianceCategory>PII</complianceCategory>
1719</CustomField>` ;
1820
1921describe ( 'when parsing custom field metadata' , ( ) => {
@@ -107,6 +109,34 @@ describe('when parsing custom field metadata', () => {
107109 assertEither ( result , ( data ) => expect ( data [ 0 ] . type . description ) . toBe ( 'A Photo URL field' ) ) ;
108110 } ) ;
109111
112+ test ( 'the resulting type contains the correct security classification' , async ( ) => {
113+ const unparsed : UnparsedCustomFieldBundle = {
114+ type : 'customfield' ,
115+ name : 'PhotoUrl__c' ,
116+ parentName : 'MyFirstObject__c' ,
117+ filePath : 'src/field/PhotoUrl__c.field-meta.xml' ,
118+ content : customFieldContent ,
119+ } ;
120+
121+ const result = await reflectCustomFieldSources ( [ unparsed ] ) ( ) ;
122+
123+ assertEither ( result , ( data ) => expect ( data [ 0 ] . type . securityClassification ) . toBe ( 'Internal' ) ) ;
124+ } ) ;
125+
126+ test ( 'the resulting type contains the correct compliance category' , async ( ) => {
127+ const unparsed : UnparsedCustomFieldBundle = {
128+ type : 'customfield' ,
129+ name : 'PhotoUrl__c' ,
130+ parentName : 'MyFirstObject__c' ,
131+ filePath : 'src/field/PhotoUrl__c.field-meta.xml' ,
132+ content : customFieldContent ,
133+ } ;
134+
135+ const result = await reflectCustomFieldSources ( [ unparsed ] ) ( ) ;
136+
137+ assertEither ( result , ( data ) => expect ( data [ 0 ] . type . complianceCategory ) . toBe ( 'PII' ) ) ;
138+ } ) ;
139+
110140 test ( 'can parse picklist values when there are multiple picklist values available' , async ( ) => {
111141 const unparsed : UnparsedCustomFieldBundle = {
112142 type : 'customfield' ,
0 commit comments