1
0

added tests for breadcrumbs service and component

This commit is contained in:
lotte
2020-02-26 14:44:34 +01:00
parent b4a63fccf4
commit 4ae8997ada
17 changed files with 280 additions and 29 deletions

View File

@@ -12,7 +12,7 @@ import { filter, map, startWith, tap } from 'rxjs/operators';
import { getCollectionPageRoute } from '../../+collection-page/collection-page-routing.module';
import { getCommunityPageRoute } from '../../+community-page/community-page-routing.module';
import { GLOBAL_CONFIG, GlobalConfig } from '../../../config';
import { Router, ActivatedRoute, RouterModule, UrlSegment } from '@angular/router';
import { Router, ActivatedRoute, RouterModule, UrlSegment, Params } from '@angular/router';
import { BrowseByTypeConfig } from '../../../config/browse-by-type-config.interface';
import { hasValue } from '../empty.util';
@@ -76,9 +76,8 @@ export class ComcolPageBrowseByComponent implements OnInit {
}, ...this.allOptions ];
}
this.currentOptionId$ = this.route.url.pipe(
filter((urlSegments: UrlSegment[]) => hasValue(urlSegments)),
map((urlSegments: UrlSegment[]) => urlSegments[urlSegments.length - 1].path)
this.currentOptionId$ = this.route.params.pipe(
map((params: Params) => params.id)
);
}