mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACS-10801]: removes pipe mock declaration (#4936)
This commit is contained in:
+6
-15
@@ -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<boolean> {
|
||||
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<boolean> => of(true) }
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
TestBed.overrideComponent(SearchResultsComponent, {
|
||||
add: {
|
||||
imports: [MockIsFeatureSupportedInCurrentAcsPipe]
|
||||
}
|
||||
});
|
||||
|
||||
config = TestBed.inject(AppConfigService);
|
||||
store = TestBed.inject(Store);
|
||||
queryBuilder = TestBed.inject(SearchQueryBuilderService);
|
||||
|
||||
Reference in New Issue
Block a user