@@ -8,15 +8,10 @@ import { FilterListItemComponent } from '../filter-list-item/filter-list-item.co
88import { selectFilterGroupsWithLayers } from '../../../state/filter-state/filter.selectors' ;
99import { MatIconTestingModule } from '@angular/material/icon/testing' ;
1010import { FilterDescriptionComponent } from '../../../filter/filter-description/filter-description.component' ;
11- import { AttributeFilterHelper } from '../../../filter/helpers/attribute-filter.helper' ;
12- import { of } from 'rxjs' ;
1311
1412describe ( 'FilterListComponent' , ( ) => {
1513
1614 test ( 'should render empty list' , async ( ) => {
17- const mockAttributeFilterService = {
18- addAttributeAliasesToFilters$ : jest . fn ( ) . mockImplementation ( ( filterGroups ) => of ( filterGroups ) ) ,
19- } ;
2015 await render ( FilterListComponent , {
2116 imports : [ SharedImportsModule , MatIconTestingModule ] ,
2217 declarations : [ FilterListItemComponent , FilterDescriptionComponent ] ,
@@ -34,17 +29,13 @@ describe('FilterListComponent', () => {
3429 } ,
3530 ] ,
3631 } ) ,
37- { provide : AttributeFilterHelper , useValue : mockAttributeFilterService } ,
3832 ] ,
3933 } ) ;
4034 expect ( screen . queryByText ( 'Attribute filter' ) ) . not . toBeInTheDocument ( ) ;
4135 expect ( screen . queryByTestId ( 'filter-list-item' ) ) . toBeNull ( ) ;
4236 } ) ;
4337
4438 test ( 'should render list with filters' , async ( ) => {
45- const mockAttributeFilterService = {
46- addAttributeAliasesToFilters$ : jest . fn ( ) . mockImplementation ( ( filterGroups ) => of ( filterGroups ) ) ,
47- } ;
4839 const store = provideMockStore ( {
4940 initialState : { } ,
5041 selectors : [
@@ -57,10 +48,7 @@ describe('FilterListComponent', () => {
5748 ] ,
5849 } ) ;
5950 await render ( FilterListComponent , {
60- providers : [
61- store ,
62- { provide : AttributeFilterHelper , useValue : mockAttributeFilterService } ,
63- ] ,
51+ providers : [ store ] ,
6452 declarations : [ FilterListItemComponent , FilterDescriptionComponent ] ,
6553 imports : [ SharedImportsModule , MatIconTestingModule ] ,
6654 } ) ;
0 commit comments