@@ -126,6 +126,7 @@ describe('EditBitstreamPageComponent', () => {
126126
127127 bitstreamFormatService = jasmine . createSpyObj ( 'bitstreamFormatService' , {
128128 findAll : createSuccessfulRemoteDataObject$ ( createPaginatedList ( allFormats ) ) ,
129+ findByHref : createSuccessfulRemoteDataObject$ ( selectedFormat ) ,
129130 } ) ;
130131
131132 notificationsService = jasmine . createSpyObj ( 'notificationsService' ,
@@ -161,6 +162,7 @@ describe('EditBitstreamPageComponent', () => {
161162 } ) ;
162163
163164 describe ( 'EditBitstreamPageComponent no IIIF fields' , ( ) => {
165+ const dsoNameServiceReturnValue = 'ORIGINAL' ;
164166
165167 beforeEach ( waitForAsync ( ( ) => {
166168 bundle = {
@@ -176,7 +178,6 @@ describe('EditBitstreamPageComponent', () => {
176178 } ,
177179 } ) ) ,
178180 } ;
179- const bundleName = 'ORIGINAL' ;
180181
181182 bitstream = Object . assign ( new Bitstream ( ) , {
182183 uuid : bitstreamID ,
@@ -196,6 +197,7 @@ describe('EditBitstreamPageComponent', () => {
196197 format : createSuccessfulRemoteDataObject$ ( selectedFormat ) ,
197198 _links : {
198199 self : 'bitstream-selflink' ,
200+ format : 'format-link' ,
199201 } ,
200202 bundle : createSuccessfulRemoteDataObject$ ( bundle ) ,
201203 } ) ;
@@ -209,9 +211,10 @@ describe('EditBitstreamPageComponent', () => {
209211 } ) ;
210212 bitstreamFormatService = jasmine . createSpyObj ( 'bitstreamFormatService' , {
211213 findAll : createSuccessfulRemoteDataObject$ ( createPaginatedList ( allFormats ) ) ,
214+ findByHref : createSuccessfulRemoteDataObject$ ( selectedFormat ) ,
212215 } ) ;
213216 dsoNameService = jasmine . createSpyObj ( 'dsoNameService' , {
214- getName : bundleName ,
217+ getName : dsoNameServiceReturnValue ,
215218 } ) ;
216219
217220 TestBed . configureTestingModule ( {
@@ -253,7 +256,7 @@ describe('EditBitstreamPageComponent', () => {
253256 } ) ;
254257
255258 it ( 'should fill in the bitstream\'s title' , ( ) => {
256- expect ( rawForm . fileNamePrimaryContainer . fileName ) . toEqual ( bitstream . name ) ;
259+ expect ( rawForm . fileNamePrimaryContainer . fileName ) . toEqual ( dsoNameServiceReturnValue ) ;
257260 } ) ;
258261
259262 it ( 'should fill in the bitstream\'s description' , ( ) => {
@@ -432,7 +435,7 @@ describe('EditBitstreamPageComponent', () => {
432435 } ) ;
433436 describe ( 'when navigateToItemEditBitstreams is called' , ( ) => {
434437 it ( 'should redirect to the item edit page on the bitstreams tab with the itemId from the component' , ( ) => {
435- comp . itemId = 'some-uuid1' ;
438+ comp . item . uuid = 'some-uuid1' ;
436439 comp . navigateToItemEditBitstreams ( ) ;
437440 expect ( router . navigate ) . toHaveBeenCalledWith ( [ getEntityEditRoute ( null , 'some-uuid1' ) , 'bitstreams' ] ) ;
438441 } ) ;
@@ -481,6 +484,7 @@ describe('EditBitstreamPageComponent', () => {
481484 format : createSuccessfulRemoteDataObject$ ( allFormats [ 1 ] ) ,
482485 _links : {
483486 self : 'bitstream-selflink' ,
487+ format : 'format-link' ,
484488 } ,
485489 bundle : createSuccessfulRemoteDataObject$ ( {
486490 _links : {
@@ -605,7 +609,7 @@ describe('EditBitstreamPageComponent', () => {
605609 format : createSuccessfulRemoteDataObject$ ( allFormats [ 2 ] ) ,
606610 _links : {
607611 self : 'bitstream-selflink' ,
608- } ,
612+ format : 'format-link' } ,
609613 bundle : createSuccessfulRemoteDataObject$ ( {
610614 _links : {
611615 primaryBitstream : {
0 commit comments