diff --git a/projects/aca-content/src/lib/components/search/search-results/search-results.component.spec.ts b/projects/aca-content/src/lib/components/search/search-results/search-results.component.spec.ts index f2b1c045a..df8891e7e 100644 --- a/projects/aca-content/src/lib/components/search/search-results/search-results.component.spec.ts +++ b/projects/aca-content/src/lib/components/search/search-results/search-results.component.spec.ts @@ -24,7 +24,6 @@ import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing'; import { SearchResultsComponent } from './search-results.component'; -import { Pipe, PipeTransform } from '@angular/core'; import { AppConfigService, NotificationService, TranslationService } from '@alfresco/adf-core'; import { Store } from '@ngrx/store'; import { NavigateToFolder } from '@alfresco/aca-shared/store'; @@ -43,13 +42,7 @@ import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { MatMenuModule } from '@angular/material/menu'; import { MatMenuHarness } from '@angular/material/menu/testing'; import { SavedSearchesContextService } from '../../../services/saved-searches-context.service'; - -@Pipe({ name: 'isFeatureSupportedInCurrentAcs' }) -class MockIsFeatureSupportedInCurrentAcsPipe implements PipeTransform { - transform(): Observable { - return of(true); - } -} +import { IsFeatureSupportedInCurrentAcsPipe } from '../../../pipes/is-feature-supported.pipe'; describe('SearchComponent', () => { let component: SearchResultsComponent; @@ -117,16 +110,14 @@ describe('SearchComponent', () => { queryParams: queryParams.asObservable() } }, - { provide: Router, useValue: routerMock } + { provide: Router, useValue: routerMock }, + { + provide: IsFeatureSupportedInCurrentAcsPipe, + useValue: { transform: (): Observable => of(true) } + } ] }); - TestBed.overrideComponent(SearchResultsComponent, { - add: { - imports: [MockIsFeatureSupportedInCurrentAcsPipe] - } - }); - config = TestBed.inject(AppConfigService); store = TestBed.inject(Store); queryBuilder = TestBed.inject(SearchQueryBuilderService);