mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-16 06:23:03 +00:00
fix issue where iiif tests would fail
This commit is contained in:
@@ -47,7 +47,7 @@ let bundle;
|
||||
let comp: EditBitstreamPageComponent;
|
||||
let fixture: ComponentFixture<EditBitstreamPageComponent>;
|
||||
|
||||
fdescribe('EditBitstreamPageComponent', () => {
|
||||
describe('EditBitstreamPageComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
bitstreamID = 'current-bitstream-id';
|
||||
@@ -223,7 +223,7 @@ fdescribe('EditBitstreamPageComponent', () => {
|
||||
spyOn(router, 'navigate');
|
||||
});
|
||||
|
||||
fdescribe('on startup', () => {
|
||||
describe('on startup', () => {
|
||||
let rawForm;
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -454,13 +454,18 @@ fdescribe('EditBitstreamPageComponent', () => {
|
||||
self: 'bitstream-selflink'
|
||||
},
|
||||
bundle: createSuccessfulRemoteDataObject$({
|
||||
_links: {
|
||||
primaryBitstream: {
|
||||
href: 'bundle-selflink'
|
||||
}
|
||||
},
|
||||
item: createSuccessfulRemoteDataObject$(Object.assign(new Item(), {
|
||||
uuid: 'some-uuid',
|
||||
firstMetadataValue(keyOrKeys: string | string[], valueFilter?: MetadataValueFilter): string {
|
||||
return 'True';
|
||||
}
|
||||
}))
|
||||
})
|
||||
}),
|
||||
});
|
||||
bitstreamService = jasmine.createSpyObj('bitstreamService', {
|
||||
findById: createSuccessfulRemoteDataObject$(bitstream),
|
||||
@@ -574,16 +579,22 @@ fdescribe('EditBitstreamPageComponent', () => {
|
||||
self: 'bitstream-selflink'
|
||||
},
|
||||
bundle: createSuccessfulRemoteDataObject$({
|
||||
_links: {
|
||||
primaryBitstream: {
|
||||
href: 'bundle-selflink'
|
||||
}
|
||||
},
|
||||
item: createSuccessfulRemoteDataObject$(Object.assign(new Item(), {
|
||||
uuid: 'some-uuid',
|
||||
firstMetadataValue(keyOrKeys: string | string[], valueFilter?: MetadataValueFilter): string {
|
||||
return 'True';
|
||||
}
|
||||
}))
|
||||
})
|
||||
}),
|
||||
});
|
||||
bitstreamService = jasmine.createSpyObj('bitstreamService', {
|
||||
findById: createSuccessfulRemoteDataObject$(bitstream),
|
||||
findByHref: createSuccessfulRemoteDataObject$(bitstream),
|
||||
update: createSuccessfulRemoteDataObject$(bitstream),
|
||||
updateFormat: createSuccessfulRemoteDataObject$(bitstream),
|
||||
commitUpdates: {},
|
||||
|
@@ -401,33 +401,27 @@ export class EditBitstreamPageComponent implements OnInit, OnDestroy {
|
||||
const bitstream$ = this.bitstreamRD$.pipe(
|
||||
getFirstSucceededRemoteData(),
|
||||
getRemoteDataPayload(),
|
||||
tap(t => console.log(t)),
|
||||
);
|
||||
|
||||
const allFormats$ = this.bitstreamFormatsRD$.pipe(
|
||||
getFirstSucceededRemoteData(),
|
||||
getRemoteDataPayload(),
|
||||
tap(t => console.log(t)),
|
||||
);
|
||||
|
||||
const bundle$ = bitstream$.pipe(
|
||||
switchMap((bitstream: Bitstream) => bitstream.bundle),
|
||||
getFirstSucceededRemoteDataPayload(),
|
||||
tap(t => console.log(t)),
|
||||
);
|
||||
|
||||
const primaryBitstream$ = bundle$.pipe(
|
||||
hasValueOperator(),
|
||||
tap(t => console.log(t._links.primaryBitstream.href)),
|
||||
switchMap((bundle: Bundle) => this.bitstreamService.findByHref(bundle._links.primaryBitstream.href)),
|
||||
getFirstSucceededRemoteDataPayload(),
|
||||
tap(t => console.log(t)),
|
||||
);
|
||||
|
||||
const item$ = bundle$.pipe(
|
||||
switchMap((bundle: Bundle) => bundle.item),
|
||||
getFirstSucceededRemoteDataPayload(),
|
||||
tap(t => console.log(t)),
|
||||
);
|
||||
this.subs.push(
|
||||
observableCombineLatest(
|
||||
|
Reference in New Issue
Block a user