@@ -29,21 +29,24 @@ import { AddFieldDropdownComponent } from './add-field-dropdown.component';
2929import { Ng2BootstrapModule } from 'ng2-bootstrap' ;
3030
3131import { DifferentKeysPipe , FilterByExpressionPipe } from '../shared/pipes' ;
32-
3332import { DomUtilService , EmptyValueService , PathUtilService , TabsUtilService } from '../shared/services' ;
33+ import { JSONSchema } from '../shared/interfaces' ;
3434
35- const schemaProperties = {
36- propA : { } ,
37- propB : { } ,
38- propNotInValueA : { } ,
39- propNotInValueB : { }
35+ const testSchema : JSONSchema = {
36+ type : 'object' ,
37+ properties : {
38+ propA : { type : 'string' } ,
39+ propB : { type : 'string' } ,
40+ propNotInValueA : { type : 'string' } ,
41+ propNotInValueB : { type : 'string' }
42+ }
4043} ;
4144const fields = Set ( [ 'propA' , 'propB' ] ) ;
4245const mockDifferentKeys = Set ( [ 'propNotInValueB' , 'propNotInValueA' ] ) ;
4346const emptyValue = 'empty-value' ;
4447
4548class MockEmptyValueService extends EmptyValueService {
46- generateEmptyValue ( schema : Object ) : any {
49+ generateEmptyValue ( schema : JSONSchema ) : any {
4750 return emptyValue ;
4851 }
4952}
@@ -78,7 +81,7 @@ describe('AddFieldToObjectDropdownComponent', () => {
7881 fixture = TestBed . createComponent ( AddFieldDropdownComponent ) ;
7982 component = fixture . componentInstance ;
8083 component . fields = fields ;
81- component . schema = schemaProperties ;
84+ component . schema = testSchema ;
8285 fixture . detectChanges ( ) ;
8386
8487 nativeEl = fixture . nativeElement ;
0 commit comments