@@ -18,20 +18,22 @@ import { Community } from '../../core/shared/community.model';
1818import { DSpaceObject } from '../../core/shared/dspace-object.model' ;
1919import { SearchService } from '../../core/shared/search/search.service' ;
2020import { SearchConfigurationService } from '../../core/shared/search/search-configuration.service' ;
21+ import { SearchFilterService } from '../../core/shared/search/search-filter.service' ;
2122import { createSuccessfulRemoteDataObject$ } from '../remote-data.utils' ;
2223import { PaginationServiceStub } from '../testing/pagination-service.stub' ;
2324import { RouterStub } from '../testing/router.stub' ;
25+ import { SearchFilterServiceStub } from '../testing/search-filter-service.stub' ;
2426import { SearchServiceStub } from '../testing/search-service.stub' ;
2527import { SearchFormComponent } from './search-form.component' ;
2628
2729describe ( 'SearchFormComponent' , ( ) => {
2830 let comp : SearchFormComponent ;
2931 let fixture : ComponentFixture < SearchFormComponent > ;
3032 let de : DebugElement ;
31- let el : HTMLElement ;
3233
3334 const router = new RouterStub ( ) ;
3435 const searchService = new SearchServiceStub ( ) ;
36+ let searchFilterService : SearchFilterServiceStub ;
3537 const paginationService = new PaginationServiceStub ( ) ;
3638 const searchConfigService = { paginationID : 'test-id' } ;
3739 const firstPage = { 'spc.page' : 1 } ;
@@ -40,11 +42,14 @@ describe('SearchFormComponent', () => {
4042 } ;
4143
4244 beforeEach ( waitForAsync ( ( ) => {
45+ searchFilterService = new SearchFilterServiceStub ( ) ;
46+
4347 return TestBed . configureTestingModule ( {
4448 imports : [ FormsModule , RouterTestingModule , TranslateModule . forRoot ( ) , SearchFormComponent ] ,
4549 providers : [
4650 { provide : Router , useValue : router } ,
4751 { provide : SearchService , useValue : searchService } ,
52+ { provide : SearchFilterService , useValue : searchFilterService } ,
4853 { provide : PaginationService , useValue : paginationService } ,
4954 { provide : SearchConfigurationService , useValue : searchConfigService } ,
5055 { provide : DSpaceObjectDataService , useValue : dspaceObjectService } ,
@@ -56,7 +61,6 @@ describe('SearchFormComponent', () => {
5661 fixture = TestBed . createComponent ( SearchFormComponent ) ;
5762 comp = fixture . componentInstance ; // SearchFormComponent test instance
5863 de = fixture . debugElement . query ( By . css ( 'form' ) ) ;
59- el = de . nativeElement ;
6064 } ) ;
6165
6266 it ( 'should not display scopes when showScopeSelector is false' , fakeAsync ( ( ) => {
0 commit comments