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 { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
|
||||||
import { SearchResultsComponent } from './search-results.component';
|
import { SearchResultsComponent } from './search-results.component';
|
||||||
import { Pipe, PipeTransform } from '@angular/core';
|
|
||||||
import { AppConfigService, NotificationService, TranslationService } from '@alfresco/adf-core';
|
import { AppConfigService, NotificationService, TranslationService } from '@alfresco/adf-core';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { NavigateToFolder } from '@alfresco/aca-shared/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 { MatMenuModule } from '@angular/material/menu';
|
||||||
import { MatMenuHarness } from '@angular/material/menu/testing';
|
import { MatMenuHarness } from '@angular/material/menu/testing';
|
||||||
import { SavedSearchesContextService } from '../../../services/saved-searches-context.service';
|
import { SavedSearchesContextService } from '../../../services/saved-searches-context.service';
|
||||||
|
import { IsFeatureSupportedInCurrentAcsPipe } from '../../../pipes/is-feature-supported.pipe';
|
||||||
@Pipe({ name: 'isFeatureSupportedInCurrentAcs' })
|
|
||||||
class MockIsFeatureSupportedInCurrentAcsPipe implements PipeTransform {
|
|
||||||
transform(): Observable<boolean> {
|
|
||||||
return of(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
describe('SearchComponent', () => {
|
describe('SearchComponent', () => {
|
||||||
let component: SearchResultsComponent;
|
let component: SearchResultsComponent;
|
||||||
@@ -117,16 +110,14 @@ describe('SearchComponent', () => {
|
|||||||
queryParams: queryParams.asObservable()
|
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);
|
config = TestBed.inject(AppConfigService);
|
||||||
store = TestBed.inject(Store);
|
store = TestBed.inject(Store);
|
||||||
queryBuilder = TestBed.inject(SearchQueryBuilderService);
|
queryBuilder = TestBed.inject(SearchQueryBuilderService);
|
||||||
|
|||||||
Reference in New Issue
Block a user