diff --git a/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.spec.ts b/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.spec.ts index b19250edae8..7e9be616ee2 100644 --- a/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.spec.ts +++ b/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.spec.ts @@ -65,7 +65,8 @@ describe('BrowseByDatePageComponent', () => { const mockBrowseService = { getBrowseEntriesFor: (options: BrowseEntrySearchOptions) => toRemoteData([]), getBrowseItemsFor: (value: string, options: BrowseEntrySearchOptions) => toRemoteData([firstItem]), - getFirstItemFor: (definition: string, scope?: string, sortDirection?: SortDirection) => null + getFirstItemFor: (definition: string, scope?: string, sortDirection?: SortDirection) => null, + getConfiguredSortDirection: () => observableOf(SortDirection.DESC), }; const mockDsoService = { diff --git a/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.ts b/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.ts index dc0a50675d1..8dd289ec33d 100644 --- a/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.ts +++ b/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.ts @@ -64,6 +64,7 @@ export class BrowseByDatePageComponent extends BrowseByMetadataPageComponent { })).subscribe(({ params, currentPage, currentSort }) => { const metadataKeys = params.browseDefinition ? params.browseDefinition.metadataKeys : this.defaultMetadataKeys; this.startsWith = +params.startsWith || params.startsWith; + this.browseId = params.id || this.defaultBrowseId; const searchOptions = browseParamsToOptions(params, currentPage, currentSort, this.browseId, this.fetchThumbnails); this.updatePageWithItems(searchOptions, this.value, undefined); this.updateParent(params.scope); diff --git a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.spec.ts b/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.spec.ts index 2bdecc26704..bce4825fcf6 100644 --- a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.spec.ts +++ b/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.spec.ts @@ -88,7 +88,8 @@ describe('BrowseByMetadataPageComponent', () => { const mockBrowseService = { getBrowseEntriesFor: (options: BrowseEntrySearchOptions) => toRemoteData(mockEntries), - getBrowseItemsFor: (value: string, options: BrowseEntrySearchOptions) => toRemoteData(mockItems) + getBrowseItemsFor: (value: string, options: BrowseEntrySearchOptions) => toRemoteData(mockItems), + getConfiguredSortDirection: () => observableOf(SortDirection.ASC), }; const mockDsoService = { diff --git a/src/app/browse-by/browse-by-title-page/browse-by-title-page.component.spec.ts b/src/app/browse-by/browse-by-title-page/browse-by-title-page.component.spec.ts index e32c0ac430d..8cc21668903 100644 --- a/src/app/browse-by/browse-by-title-page/browse-by-title-page.component.spec.ts +++ b/src/app/browse-by/browse-by-title-page/browse-by-title-page.component.spec.ts @@ -22,6 +22,7 @@ import { PaginationService } from '../../core/pagination/pagination.service'; import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub'; import { APP_CONFIG } from '../../../config/app-config.interface'; import { environment } from '../../../environments/environment'; +import { SortDirection } from '../../core/cache/models/sort-options.model'; describe('BrowseByTitlePageComponent', () => { @@ -54,7 +55,8 @@ describe('BrowseByTitlePageComponent', () => { const mockBrowseService = { getBrowseItemsFor: () => toRemoteData(mockItems), - getBrowseEntriesFor: () => toRemoteData([]) + getBrowseEntriesFor: () => toRemoteData([]), + getConfiguredSortDirection: () => observableOf(SortDirection.ASC), }; const mockDsoService = {