@@ -9,9 +9,9 @@ import { By } from '@angular/platform-browser';
99import { BrowserAnimationsModule } from '@angular/platform-browser/animations' ;
1010import {
1111 ActivatedRoute ,
12+ provideRouter ,
1213 Router ,
1314} from '@angular/router' ;
14- import { RouterTestingModule } from '@angular/router/testing' ;
1515import { TranslateModule } from '@ngx-translate/core' ;
1616import { cold } from 'jasmine-marbles' ;
1717import { of } from 'rxjs' ;
@@ -38,7 +38,6 @@ import {
3838import { ActivatedRouteStub } from '../shared/testing/active-router.stub' ;
3939import { RouterStub } from '../shared/testing/router.stub' ;
4040import { VarDirective } from '../shared/utils/var.directive' ;
41- import { ViewTrackerComponent } from '../statistics/angulartics/dspace/view-tracker.component' ;
4241import { CommunityPageComponent } from './community-page.component' ;
4342import { ThemedCollectionPageSubCollectionListComponent } from './sections/sub-com-col-section/sub-collection-list/themed-community-page-sub-collection-list.component' ;
4443import { ThemedCommunityPageSubCommunityListComponent } from './sections/sub-com-col-section/sub-community-list/themed-community-page-sub-community-list.component' ;
@@ -90,16 +89,17 @@ describe('CommunityPageComponent', () => {
9089 authorizationDataServiceSpy = jasmine . createSpyObj ( 'AuthorizationDataService' , [ 'isAuthorized' ] ) ;
9190 dsoNameServiceSpy = jasmine . createSpyObj ( 'DSONameService' , [ 'getName' ] ) ;
9291 await TestBed . configureTestingModule ( {
93- imports : [ RouterTestingModule , FormsModule , TranslateModule . forRoot ( ) , BrowserAnimationsModule , CommunityPageComponent , VarDirective ] ,
92+ imports : [ FormsModule , TranslateModule . forRoot ( ) , BrowserAnimationsModule , CommunityPageComponent , VarDirective ] ,
9493 providers : [
94+ provideRouter ( [ ] ) ,
9595 { provide : ActivatedRoute , useValue : aroute } ,
9696 { provide : Router , useValue : router } ,
9797 { provide : AuthService , useValue : authServiceSpy } ,
9898 { provide : AuthorizationDataService , useValue : authorizationDataServiceSpy } ,
9999 { provide : DSONameService , useValue : dsoNameServiceSpy } ,
100100 ] ,
101101 schemas : [ NO_ERRORS_SCHEMA ] ,
102- } ) . overrideComponent ( CommunityPageComponent , { remove : { imports : [ ThemedComcolPageContentComponent , ErrorComponent , ThemedLoadingComponent , ThemedCommunityPageSubCommunityListComponent , ThemedCollectionPageSubCollectionListComponent , ThemedComcolPageBrowseByComponent , DsoEditMenuComponent , ThemedComcolPageHandleComponent , ComcolPageLogoComponent , ComcolPageHeaderComponent , ViewTrackerComponent , ContextMenuComponent ] } } ) . compileComponents ( ) ;
102+ } ) . overrideComponent ( CommunityPageComponent , { remove : { imports : [ ThemedComcolPageContentComponent , ErrorComponent , ThemedLoadingComponent , ThemedCommunityPageSubCommunityListComponent , ThemedCollectionPageSubCollectionListComponent , ThemedComcolPageBrowseByComponent , DsoEditMenuComponent , ThemedComcolPageHandleComponent , ComcolPageLogoComponent , ComcolPageHeaderComponent , ContextMenuComponent ] } } ) . compileComponents ( ) ;
103103 } ) ;
104104
105105 beforeEach ( ( ) => {
0 commit comments