Cache redesign part 1, and add support for alternative links

This commit is contained in:
Art Lowel
2020-12-11 14:18:44 +01:00
parent f4853972cc
commit 4e18fa35ca
522 changed files with 7537 additions and 6933 deletions

View File

@@ -17,9 +17,9 @@ import { FormControl, FormGroup } from '@angular/forms';
import { RouterStub } from '../../../shared/testing/router.stub';
import { By } from '@angular/platform-browser';
import { Collection } from '../../../core/shared/collection.model';
import { RemoteData } from '../../../core/data/remote-data';
import { CollectionDataService } from '../../../core/data/collection-data.service';
import { RequestService } from '../../../core/data/request.service';
import { createSuccessfulRemoteDataObject, createSuccessfulRemoteDataObject$ } from '../../../shared/remote-data.utils';
const infoNotification: INotification = new Notification('id', NotificationType.Info, 'info');
const warningNotification: INotification = new Notification('id', NotificationType.Warning, 'warning');
@@ -111,7 +111,7 @@ describe('CollectionSourceComponent', () => {
uuid: 'fake-collection-id'
});
collectionService = jasmine.createSpyObj('collectionService', {
getContentSource: observableOf(contentSource),
getContentSource: createSuccessfulRemoteDataObject$(contentSource),
updateContentSource: observableOf(contentSource),
getHarvesterEndpoint: observableOf('harvester-endpoint')
});
@@ -125,7 +125,7 @@ describe('CollectionSourceComponent', () => {
{ provide: NotificationsService, useValue: notificationsService },
{ provide: Location, useValue: location },
{ provide: DynamicFormService, useValue: formService },
{ provide: ActivatedRoute, useValue: { parent: { data: observableOf({ dso: new RemoteData(false, false, true, null, collection) }) } } },
{ provide: ActivatedRoute, useValue: { parent: { data: observableOf({ dso: createSuccessfulRemoteDataObject(collection) }) } } },
{ provide: Router, useValue: router },
{ provide: CollectionDataService, useValue: collectionService },
{ provide: RequestService, useValue: requestService }