@@ -24,7 +24,7 @@ import {
2424 mockSubmissionState ,
2525 mockUploadConfigResponse ,
2626 mockUploadConfigResponseNotRequired ,
27- mockUploadFiles , mockUploadFilesData ,
27+ mockUploadFiles ,
2828} from '../../../shared/mocks/submission.mock' ;
2929import { SubmissionUploadsConfigDataService } from '../../../core/config/submission-uploads-config-data.service' ;
3030import { SectionUploadService } from './section-upload.service' ;
@@ -162,7 +162,6 @@ describe('SubmissionSectionUploadComponent test suite', () => {
162162 ) ;
163163
164164 bitstreamService . getUploadedFileList . and . returnValue ( observableOf ( [ ] ) ) ;
165- bitstreamService . getUploadedFilesData . and . returnValue ( observableOf ( { primary : null , files : [ ] } ) ) ;
166165 } ;
167166
168167 TestBed . configureTestingModule ( {
@@ -233,7 +232,7 @@ describe('SubmissionSectionUploadComponent test suite', () => {
233232 } ) ;
234233
235234 it ( 'should init component properly' , ( ) => {
236- bitstreamService . getUploadedFilesData . and . returnValue ( observableOf ( { primary : null , files : [ ] } ) ) ;
235+
237236 submissionServiceStub . getSubmissionObject . and . returnValue ( observableOf ( submissionState ) ) ;
238237
239238 collectionDataService . findById . and . returnValue ( createSuccessfulRemoteDataObject$ ( Object . assign ( new Collection ( ) , mockCollection , {
@@ -249,6 +248,8 @@ describe('SubmissionSectionUploadComponent test suite', () => {
249248 createSuccessfulRemoteDataObject$ ( Object . assign ( new Group ( ) , mockGroup ) )
250249 ) ;
251250
251+ bitstreamService . getUploadedFileList . and . returnValue ( observableOf ( [ ] ) ) ;
252+
252253 comp . onSectionInit ( ) ;
253254
254255 const expectedGroupsMap = new Map ( [
@@ -270,7 +271,6 @@ describe('SubmissionSectionUploadComponent test suite', () => {
270271 } ) ;
271272
272273 it ( 'should init file list properly' , ( ) => {
273- bitstreamService . getUploadedFilesData . and . returnValue ( observableOf ( { primary : null , files : [ ] } ) ) ;
274274
275275 submissionServiceStub . getSubmissionObject . and . returnValue ( observableOf ( submissionState ) ) ;
276276
@@ -285,7 +285,7 @@ describe('SubmissionSectionUploadComponent test suite', () => {
285285 createSuccessfulRemoteDataObject$ ( Object . assign ( new Group ( ) , mockGroup ) )
286286 ) ;
287287
288- bitstreamService . getUploadedFilesData . and . returnValue ( observableOf ( mockUploadFilesData ) ) ;
288+ bitstreamService . getUploadedFileList . and . returnValue ( observableOf ( mockUploadFiles ) ) ;
289289
290290 comp . onSectionInit ( ) ;
291291
@@ -308,8 +308,6 @@ describe('SubmissionSectionUploadComponent test suite', () => {
308308 } ) ;
309309
310310 it ( 'should properly read the section status when required is true' , ( ) => {
311- bitstreamService . getUploadedFilesData . and . returnValue ( observableOf ( { primary : null , files : [ ] } ) ) ;
312-
313311 submissionServiceStub . getSubmissionObject . and . returnValue ( observableOf ( submissionState ) ) ;
314312
315313 sectionsServiceStub . getSectionErrors . and . returnValue ( observableOf ( [ ] ) ) ;
@@ -327,7 +325,7 @@ describe('SubmissionSectionUploadComponent test suite', () => {
327325
328326 bitstreamService . getUploadedFileList . and . returnValue ( cold ( '-a-b' , {
329327 a : [ ] ,
330- b : mockUploadFiles ,
328+ b : mockUploadFiles
331329 } ) ) ;
332330
333331 comp . onSectionInit ( ) ;
@@ -343,8 +341,6 @@ describe('SubmissionSectionUploadComponent test suite', () => {
343341 it ( 'should properly read the section status when required is false' , ( ) => {
344342 submissionServiceStub . getSubmissionObject . and . returnValue ( observableOf ( submissionState ) ) ;
345343
346- bitstreamService . getUploadedFilesData . and . returnValue ( observableOf ( { primary : null , files : [ ] } ) ) ;
347-
348344 sectionsServiceStub . getSectionErrors . and . returnValue ( observableOf ( [ ] ) ) ;
349345
350346 collectionDataService . findById . and . returnValue ( createSuccessfulRemoteDataObject$ ( mockCollection ) ) ;
0 commit comments