[ACS-10801]: removes pipe mock declaration (#4936)

This commit is contained in:
Anton Ramanovich
2025-12-15 08:10:07 +01:00
committed by GitHub
parent 3b01f1a32c
commit 12a4c76c27
@@ -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);