|
|
@ -1,9 +1,16 @@ |
|
|
import { ABP, LocalizationPipe, RouterOutletComponent, RoutesService } from '@abp/ng.core'; |
|
|
import { |
|
|
|
|
|
ABP, |
|
|
|
|
|
CORE_OPTIONS, |
|
|
|
|
|
LocalizationPipe, |
|
|
|
|
|
RouterOutletComponent, |
|
|
|
|
|
RoutesService, |
|
|
|
|
|
} from '@abp/ng.core'; |
|
|
|
|
|
import { HttpClient } from '@angular/common/http'; |
|
|
import { RouterModule } from '@angular/router'; |
|
|
import { RouterModule } from '@angular/router'; |
|
|
import { createRoutingFactory, SpectatorRouting, SpyObject } from '@ngneat/spectator/jest'; |
|
|
import { createRoutingFactory, SpectatorRouting, SpyObject } from '@ngneat/spectator/jest'; |
|
|
import { Store } from '@ngxs/store'; |
|
|
import { Store } from '@ngxs/store'; |
|
|
|
|
|
import { mockRoutesService } from '../../../../core/src/lib/tests/routes.service.spec'; |
|
|
import { BreadcrumbComponent } from '../components/breadcrumb/breadcrumb.component'; |
|
|
import { BreadcrumbComponent } from '../components/breadcrumb/breadcrumb.component'; |
|
|
import { mockRoutesService } from '../../../../core/src/lib/tests/utils'; |
|
|
|
|
|
|
|
|
|
|
|
const mockRoutes: ABP.Route[] = [ |
|
|
const mockRoutes: ABP.Route[] = [ |
|
|
{ name: 'Identity', path: '/identity' }, |
|
|
{ name: 'Identity', path: '/identity' }, |
|
|
@ -19,8 +26,9 @@ describe('BreadcrumbComponent', () => { |
|
|
component: RouterOutletComponent, |
|
|
component: RouterOutletComponent, |
|
|
stubsEnabled: false, |
|
|
stubsEnabled: false, |
|
|
detectChanges: false, |
|
|
detectChanges: false, |
|
|
mocks: [Store], |
|
|
mocks: [Store, HttpClient], |
|
|
providers: [ |
|
|
providers: [ |
|
|
|
|
|
{ provide: CORE_OPTIONS, useValue: {} }, |
|
|
{ |
|
|
{ |
|
|
provide: RoutesService, |
|
|
provide: RoutesService, |
|
|
useFactory: () => mockRoutesService(), |
|
|
useFactory: () => mockRoutesService(), |
|
|
|