108588: Fixed browse by issue date show loading icon indefinitely when empty

This commit is contained in:
Alexandre Vryghem
2023-12-18 00:01:59 +01:00
parent b240b2c160
commit 6f51bd866c
5 changed files with 42 additions and 16 deletions

View File

@@ -23,6 +23,7 @@ import { PaginationServiceStub } from '../../shared/testing/pagination-service.s
import { APP_CONFIG } from '../../../config/app-config.interface';
import { environment } from '../../../environments/environment';
import { SortDirection } from '../../core/cache/models/sort-options.model';
import { cold } from 'jasmine-marbles';
describe('BrowseByDateComponent', () => {
let comp: BrowseByDateComponent;
@@ -112,9 +113,13 @@ describe('BrowseByDateComponent', () => {
fixture.detectChanges();
});
it('should initialize the list of items', () => {
it('should initialize the list of items', (done: DoneFn) => {
expect(comp.loading$).toBeObservable(cold('(a|)', {
a: false,
}));
comp.items$.subscribe((result) => {
expect(result.payload.page).toEqual([firstItem]);
done();
});
});