65272: Revert testing changes

This commit is contained in:
Kristof De Langhe
2019-10-04 12:38:47 +02:00
parent ba436a6467
commit cf8bba7112

View File

@@ -21,6 +21,7 @@ import { switchMap } from 'rxjs/operators';
/* tslint:disable:max-classes-per-file */
class DataServiceImpl extends ItemDataService {
protected linkPath = 'itemtemplate';
private collectionID: string;
@@ -39,9 +40,19 @@ class DataServiceImpl extends ItemDataService {
super(requestService, rdbService, dataBuildService, store, bs, objectCache, halService, notificationsService, http, comparator);
}
protected getEndpoint(): Observable<string> {
return this.collectionService.getIDHrefObs(this.collectionID).pipe(
switchMap((href: string) => this.halService.getEndpoint(this.linkPath, href))
);
}
getIDHrefObs(resourceID: string): Observable<string> {
return this.getEndpoint();
}
findByCollectionID(collectionID: string): Observable<RemoteData<Item>> {
this.collectionID = collectionID;
return super.findById('961e137c-d815-4ade-aff1-0bb12f1fe965');
return super.findById(collectionID);
}
create(item: Item, collectionID: string): Observable<RemoteData<Item>> {