@@ -3,7 +3,7 @@ import { EntityDropdownComponent } from './entity-dropdown.component';
33import { getTestScheduler } from 'jasmine-marbles' ;
44import { createSuccessfulRemoteDataObject$ } from '../remote-data.utils' ;
55import { ItemType } from '../../core/shared/item-relationships/item-type.model' ;
6- import { ChangeDetectorRef , NO_ERRORS_SCHEMA , Pipe , PipeTransform } from '@angular/core' ;
6+ import { ChangeDetectorRef , NO_ERRORS_SCHEMA } from '@angular/core' ;
77import { EntityTypeDataService } from '../../core/data/entity-type-data.service' ;
88import { TestScheduler } from 'rxjs/testing' ;
99import { By } from '@angular/platform-browser' ;
@@ -12,21 +12,7 @@ import { ItemExportFormatService } from '../../core/itemexportformat/item-export
1212import { of } from 'rxjs/internal/observable/of' ;
1313import { ItemExportFormat , ItemExportFormatMap } from '../../core/itemexportformat/model/item-export-format.model' ;
1414import { TranslateService } from '@ngx-translate/core' ;
15-
16- // eslint-disable-next-line @angular-eslint/pipe-prefix
17- @Pipe ( { name : 'translate' } )
18- class MockTranslatePipe implements PipeTransform {
19- transform ( value : string ) : string {
20- return value ;
21- }
22- }
23-
24- @Pipe ( { name : 'dsSort' } )
25- class MockDsSortPipe implements PipeTransform {
26- transform ( value : any [ ] , column : string = '' , order : 'asc' | 'desc' = 'asc' ) : any [ ] {
27- return value ;
28- }
29- }
15+ import { SortPipe } from '../utils/sort.pipe' ;
3016
3117const entities : ItemType [ ] = [
3218 Object . assign ( new ItemType ( ) , {
@@ -105,15 +91,13 @@ describe('EntityDropdownComponent', () => {
10591 }
10692 } ;
10793
108- let translatePipeSpy : jasmine . Spy ;
109-
11094 const paginatedEntities = createPaginatedList ( entities ) ;
11195 const paginatedEntitiesRD$ = createSuccessfulRemoteDataObject$ ( paginatedEntities ) ;
11296
11397 beforeEach ( waitForAsync ( ( ) => {
11498 TestBed . configureTestingModule ( {
11599 imports : [ ] ,
116- declarations : [ EntityDropdownComponent , MockTranslatePipe , MockDsSortPipe ] ,
100+ declarations : [ EntityDropdownComponent , SortPipe ] ,
117101 providers : [
118102 { provide : EntityTypeDataService , useValue : entityTypeServiceMock } ,
119103 { provide : ItemExportFormatService , useValue : itemExportFormatServiceMock } ,
@@ -134,8 +118,6 @@ describe('EntityDropdownComponent', () => {
134118 componentAsAny . entityTypeService . getAllAuthorizedRelationshipTypeImport . and . returnValue ( paginatedEntitiesRD$ ) ;
135119 componentAsAny . itemExportFormatService . byEntityTypeAndMolteplicity . and . returnValue ( of ( entityFormatList ) ) ;
136120 component . isSubmission = true ;
137-
138- translatePipeSpy = spyOn ( MockTranslatePipe . prototype , 'transform' ) ;
139121 } ) ;
140122
141123 it ( 'should init component with entities list' , ( ) => {
0 commit comments