@@ -321,6 +321,8 @@ test('testMetadataTaxonomiesNodes', async function testMetadataTaxonomiesNodes()
321321 'templateKey' ,
322322 getUuid ( )
323323 ) as string ;
324+ const fieldDisplayName : string = 'testTaxonomy123' ;
325+ const fieldKey : string = 'testTaxonomy321' ;
324326 const metadataTemplate : MetadataTemplate =
325327 await client . metadataTemplates . createMetadataTemplate ( {
326328 scope : 'enterprise' ,
@@ -329,8 +331,8 @@ test('testMetadataTaxonomiesNodes', async function testMetadataTaxonomiesNodes()
329331 fields : [
330332 {
331333 type : 'taxonomy' as CreateMetadataTemplateRequestBodyFieldsTypeField ,
332- key : 'taxonomy' ,
333- displayName : 'taxonomy' ,
334+ key : fieldKey ,
335+ displayName : fieldDisplayName ,
334336 taxonomyKey : taxonomyKey ,
335337 namespace : namespace ,
336338 optionsRules : {
@@ -349,14 +351,41 @@ test('testMetadataTaxonomiesNodes', async function testMetadataTaxonomiesNodes()
349351 if ( ! ( metadataTemplate . fields ! . length == 1 ) ) {
350352 throw new Error ( 'Assertion failed' ) ;
351353 }
354+ if ( ! ( metadataTemplate . fields ! [ 0 ] . displayName == fieldDisplayName ) ) {
355+ throw new Error ( 'Assertion failed' ) ;
356+ }
357+ if ( ! ( metadataTemplate . fields ! [ 0 ] . hidden == false ) ) {
358+ throw new Error ( 'Assertion failed' ) ;
359+ }
360+ if ( ! ! ( metadataTemplate . fields ! [ 0 ] . id == '' ) ) {
361+ throw new Error ( 'Assertion failed' ) ;
362+ }
363+ if ( ! ( metadataTemplate . fields ! [ 0 ] . key == fieldKey ) ) {
364+ throw new Error ( 'Assertion failed' ) ;
365+ }
366+ if ( ! ( metadataTemplate . fields ! [ 0 ] . namespace == namespace ) ) {
367+ throw new Error ( 'Assertion failed' ) ;
368+ }
369+ if ( ! ( metadataTemplate . fields ! [ 0 ] . optionsRules ! . multiSelect == true ) ) {
370+ throw new Error ( 'Assertion failed' ) ;
371+ }
372+ if ( ! ( metadataTemplate . fields ! [ 0 ] . optionsRules ! . selectableLevels ! [ 0 ] == 1 ) ) {
373+ throw new Error ( 'Assertion failed' ) ;
374+ }
375+ if ( ! ! ( metadataTemplate . fields ! [ 0 ] . taxonomyId == '' ) ) {
376+ throw new Error ( 'Assertion failed' ) ;
377+ }
378+ if ( ! ( metadataTemplate . fields ! [ 0 ] . taxonomyKey == taxonomyKey ) ) {
379+ throw new Error ( 'Assertion failed' ) ;
380+ }
352381 if ( ! ( ( toString ( metadataTemplate . fields ! [ 0 ] . type ) as string ) == 'taxonomy' ) ) {
353382 throw new Error ( 'Assertion failed' ) ;
354383 }
355384 const options : MetadataTaxonomyNodes =
356385 await client . metadataTaxonomies . getMetadataTemplateFieldOptions (
357386 namespace ,
358387 metadataTemplateKey ,
359- 'taxonomy'
388+ fieldKey
360389 ) ;
361390 if ( ! ( options . entries ! . length == 1 ) ) {
362391 throw new Error ( 'Assertion failed' ) ;
0 commit comments