mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-10 03:23:07 +00:00
ESLint: fix dangling commas
This commit is contained in:
@@ -30,7 +30,7 @@ import {
|
||||
SaveSubmissionSectionFormSuccessAction,
|
||||
SectionStatusChangeAction,
|
||||
SubmissionObjectAction,
|
||||
UpdateSectionDataAction
|
||||
UpdateSectionDataAction,
|
||||
} from './submission-objects.actions';
|
||||
import { SectionsType } from '../sections/sections-type';
|
||||
import {
|
||||
@@ -38,7 +38,7 @@ import {
|
||||
mockSubmissionDefinitionResponse,
|
||||
mockSubmissionId,
|
||||
mockSubmissionSelfUrl,
|
||||
mockSubmissionState
|
||||
mockSubmissionState,
|
||||
} from '../../shared/mocks/submission.mock';
|
||||
import { Item } from '../../core/shared/item.model';
|
||||
|
||||
@@ -66,7 +66,7 @@ describe('submissionReducer test suite', () => {
|
||||
isLoading: true,
|
||||
savePending: false,
|
||||
depositPending: false,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
const action = new InitSubmissionFormAction(collectionId, submissionId, selfUrl, submissionDefinition, {}, new Item(), null);
|
||||
@@ -78,8 +78,8 @@ describe('submissionReducer test suite', () => {
|
||||
it('should complete submission initialization', () => {
|
||||
const state = Object.assign({}, initState, {
|
||||
[submissionId]: Object.assign({}, initState[submissionId], {
|
||||
isLoading: true
|
||||
})
|
||||
isLoading: true,
|
||||
}),
|
||||
});
|
||||
|
||||
const action = new CompleteInitSubmissionFormAction(submissionId);
|
||||
@@ -99,7 +99,7 @@ describe('submissionReducer test suite', () => {
|
||||
isLoading: true,
|
||||
savePending: false,
|
||||
depositPending: false,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
const action = new ResetSubmissionFormAction(collectionId, submissionId, selfUrl, {}, submissionDefinition, new Item());
|
||||
@@ -143,7 +143,7 @@ describe('submissionReducer test suite', () => {
|
||||
const state = Object.assign({}, initState, {
|
||||
[submissionId]: Object.assign({}, initState[submissionId], {
|
||||
savePending: true,
|
||||
})
|
||||
}),
|
||||
});
|
||||
|
||||
let action: any = new SaveSubmissionFormSuccessAction(submissionId, []);
|
||||
@@ -191,7 +191,7 @@ describe('submissionReducer test suite', () => {
|
||||
const state = Object.assign({}, initState, {
|
||||
[submissionId]: Object.assign({}, initState[submissionId], {
|
||||
depositPending: true,
|
||||
})
|
||||
}),
|
||||
});
|
||||
|
||||
const action: any = new DepositSubmissionSuccessAction(submissionId);
|
||||
@@ -241,7 +241,7 @@ describe('submissionReducer test suite', () => {
|
||||
errorsToShow: [],
|
||||
serverValidationErrors: [],
|
||||
isLoading: false,
|
||||
isValid: true
|
||||
isValid: true,
|
||||
} as any;
|
||||
|
||||
let action: any = new InitSubmissionFormAction(collectionId, submissionId, selfUrl, submissionDefinition, {}, new Item(), null);
|
||||
@@ -306,8 +306,8 @@ describe('submissionReducer test suite', () => {
|
||||
authority: null,
|
||||
display: 'Author, Test',
|
||||
confidence: -1,
|
||||
place: 0
|
||||
}
|
||||
place: 0,
|
||||
},
|
||||
],
|
||||
'dc.title': [
|
||||
{
|
||||
@@ -316,8 +316,8 @@ describe('submissionReducer test suite', () => {
|
||||
authority: null,
|
||||
display: 'Title Test',
|
||||
confidence: -1,
|
||||
place: 0
|
||||
}
|
||||
place: 0,
|
||||
},
|
||||
],
|
||||
'dc.date.issued': [
|
||||
{
|
||||
@@ -326,9 +326,9 @@ describe('submissionReducer test suite', () => {
|
||||
authority: null,
|
||||
display: '2015',
|
||||
confidence: -1,
|
||||
place: 0
|
||||
}
|
||||
]
|
||||
place: 0,
|
||||
},
|
||||
],
|
||||
} as any;
|
||||
|
||||
const action = new UpdateSectionDataAction(submissionId, 'traditionalpageone', data, [], []);
|
||||
@@ -352,8 +352,8 @@ describe('submissionReducer test suite', () => {
|
||||
const errors = [
|
||||
{
|
||||
path: '/sections/license',
|
||||
message: 'error.validation.license.notgranted'
|
||||
}
|
||||
message: 'error.validation.license.notgranted',
|
||||
},
|
||||
];
|
||||
|
||||
const action = new UpdateSectionDataAction(submissionId, 'traditionalpageone', {}, errors, errors);
|
||||
@@ -374,7 +374,7 @@ describe('submissionReducer test suite', () => {
|
||||
it('should add submission section error properly', () => {
|
||||
const error = {
|
||||
path: '/sections/traditionalpageone/dc.title/0',
|
||||
message: 'error.validation.traditionalpageone.required'
|
||||
message: 'error.validation.traditionalpageone.required',
|
||||
};
|
||||
|
||||
const action = new InertSectionErrorsAction(submissionId, 'traditionalpageone', error);
|
||||
@@ -387,21 +387,21 @@ describe('submissionReducer test suite', () => {
|
||||
const errors = [
|
||||
{
|
||||
path: '/sections/traditionalpageone/dc.contributor.author',
|
||||
message: 'error.validation.required'
|
||||
message: 'error.validation.required',
|
||||
},
|
||||
{
|
||||
path: '/sections/traditionalpageone/dc.date.issued',
|
||||
message: 'error.validation.required'
|
||||
}
|
||||
message: 'error.validation.required',
|
||||
},
|
||||
];
|
||||
const error = {
|
||||
path: '/sections/traditionalpageone/dc.contributor.author',
|
||||
message: 'error.validation.required'
|
||||
message: 'error.validation.required',
|
||||
};
|
||||
|
||||
const expectedErrors = [{
|
||||
path: '/sections/traditionalpageone/dc.date.issued',
|
||||
message: 'error.validation.required'
|
||||
message: 'error.validation.required',
|
||||
}];
|
||||
|
||||
let action: any = new UpdateSectionDataAction(submissionId, 'traditionalpageone', {}, errors, errors);
|
||||
@@ -433,9 +433,9 @@ describe('submissionReducer test suite', () => {
|
||||
authority: null,
|
||||
display: '28297_389341539060_6452876_n.jpg',
|
||||
confidence: -1,
|
||||
place: 0
|
||||
}
|
||||
]
|
||||
place: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
accessConditions: [],
|
||||
format: {
|
||||
@@ -446,17 +446,17 @@ describe('submissionReducer test suite', () => {
|
||||
supportLevel: 0,
|
||||
internal: false,
|
||||
extensions: null,
|
||||
type: 'bitstreamformat'
|
||||
type: 'bitstreamformat',
|
||||
},
|
||||
sizeBytes: 22737,
|
||||
checkSum: {
|
||||
checkSumAlgorithm: 'MD5',
|
||||
value: '8722864dd671912f94a999ac7c4949d2'
|
||||
value: '8722864dd671912f94a999ac7c4949d2',
|
||||
},
|
||||
url: 'https://rest.api/dspace-spring-rest/api/core/bitstreams/8cd86fba-70c8-483d-838a-70d28e7ed570/content'
|
||||
url: 'https://rest.api/dspace-spring-rest/api/core/bitstreams/8cd86fba-70c8-483d-838a-70d28e7ed570/content',
|
||||
};
|
||||
const expectedState = {
|
||||
files: [fileData]
|
||||
files: [fileData],
|
||||
};
|
||||
|
||||
const action = new NewUploadedFileAction(submissionId, 'upload', uuid, fileData);
|
||||
@@ -478,9 +478,9 @@ describe('submissionReducer test suite', () => {
|
||||
authority: null,
|
||||
display: 'image_test.jpg',
|
||||
confidence: -1,
|
||||
place: 0
|
||||
}
|
||||
]
|
||||
place: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
accessConditions: [],
|
||||
format: {
|
||||
@@ -491,14 +491,14 @@ describe('submissionReducer test suite', () => {
|
||||
supportLevel: 0,
|
||||
internal: false,
|
||||
extensions: null,
|
||||
type: 'bitstreamformat'
|
||||
type: 'bitstreamformat',
|
||||
},
|
||||
sizeBytes: 22737,
|
||||
checkSum: {
|
||||
checkSumAlgorithm: 'MD5',
|
||||
value: '8722864dd671912f94a999ac7c4949d2'
|
||||
value: '8722864dd671912f94a999ac7c4949d2',
|
||||
},
|
||||
url: 'https://rest.api/dspace-spring-rest/api/core/bitstreams/8cd86fba-70c8-483d-838a-70d28e7ed570/content'
|
||||
url: 'https://rest.api/dspace-spring-rest/api/core/bitstreams/8cd86fba-70c8-483d-838a-70d28e7ed570/content',
|
||||
};
|
||||
const fileData2: any = {
|
||||
uuid: uuid2,
|
||||
@@ -510,9 +510,9 @@ describe('submissionReducer test suite', () => {
|
||||
authority: null,
|
||||
display: 'image_test.jpg',
|
||||
confidence: -1,
|
||||
place: 0
|
||||
}
|
||||
]
|
||||
place: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
accessConditions: [],
|
||||
format: {
|
||||
@@ -523,14 +523,14 @@ describe('submissionReducer test suite', () => {
|
||||
supportLevel: 0,
|
||||
internal: false,
|
||||
extensions: null,
|
||||
type: 'bitstreamformat'
|
||||
type: 'bitstreamformat',
|
||||
},
|
||||
sizeBytes: 22737,
|
||||
checkSum: {
|
||||
checkSumAlgorithm: 'MD5',
|
||||
value: '8722864dd671912f94a999ac7c4949d2'
|
||||
value: '8722864dd671912f94a999ac7c4949d2',
|
||||
},
|
||||
url: 'https://rest.api/dspace-spring-rest/api/core/bitstreams/7e2f4ba9-9316-41fd-844a-1ef435f41a42/content'
|
||||
url: 'https://rest.api/dspace-spring-rest/api/core/bitstreams/7e2f4ba9-9316-41fd-844a-1ef435f41a42/content',
|
||||
};
|
||||
|
||||
const state: SubmissionObjectState = Object.assign({}, initState, {
|
||||
@@ -538,15 +538,15 @@ describe('submissionReducer test suite', () => {
|
||||
sections: Object.assign({}, initState[submissionId].sections, {
|
||||
upload: Object.assign({}, initState[submissionId].sections.upload, {
|
||||
data: {
|
||||
files: [fileData, fileData2]
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
files: [fileData, fileData2],
|
||||
},
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
const expectedState = {
|
||||
files: [fileData]
|
||||
files: [fileData],
|
||||
};
|
||||
|
||||
const action = new DeleteUploadedFileAction(submissionId, 'upload', uuid2);
|
||||
@@ -567,9 +567,9 @@ describe('submissionReducer test suite', () => {
|
||||
authority: null,
|
||||
display: 'image_test.jpg',
|
||||
confidence: -1,
|
||||
place: 0
|
||||
}
|
||||
]
|
||||
place: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
accessConditions: [],
|
||||
format: {
|
||||
@@ -580,14 +580,14 @@ describe('submissionReducer test suite', () => {
|
||||
supportLevel: 0,
|
||||
internal: false,
|
||||
extensions: null,
|
||||
type: 'bitstreamformat'
|
||||
type: 'bitstreamformat',
|
||||
},
|
||||
sizeBytes: 22737,
|
||||
checkSum: {
|
||||
checkSumAlgorithm: 'MD5',
|
||||
value: '8722864dd671912f94a999ac7c4949d2'
|
||||
value: '8722864dd671912f94a999ac7c4949d2',
|
||||
},
|
||||
url: 'https://rest.api/dspace-spring-rest/api/core/bitstreams/8cd86fba-70c8-483d-838a-70d28e7ed570/content'
|
||||
url: 'https://rest.api/dspace-spring-rest/api/core/bitstreams/8cd86fba-70c8-483d-838a-70d28e7ed570/content',
|
||||
};
|
||||
const fileData2: any = {
|
||||
uuid: uuid,
|
||||
@@ -599,9 +599,9 @@ describe('submissionReducer test suite', () => {
|
||||
authority: null,
|
||||
display: 'New title',
|
||||
confidence: -1,
|
||||
place: 0
|
||||
}
|
||||
]
|
||||
place: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
accessConditions: [],
|
||||
format: {
|
||||
@@ -612,14 +612,14 @@ describe('submissionReducer test suite', () => {
|
||||
supportLevel: 0,
|
||||
internal: false,
|
||||
extensions: null,
|
||||
type: 'bitstreamformat'
|
||||
type: 'bitstreamformat',
|
||||
},
|
||||
sizeBytes: 22737,
|
||||
checkSum: {
|
||||
checkSumAlgorithm: 'MD5',
|
||||
value: '8722864dd671912f94a999ac7c4949d2'
|
||||
value: '8722864dd671912f94a999ac7c4949d2',
|
||||
},
|
||||
url: 'https://rest.api/dspace-spring-rest/api/core/bitstreams/7e2f4ba9-9316-41fd-844a-1ef435f41a42/content'
|
||||
url: 'https://rest.api/dspace-spring-rest/api/core/bitstreams/7e2f4ba9-9316-41fd-844a-1ef435f41a42/content',
|
||||
};
|
||||
|
||||
const state: SubmissionObjectState = Object.assign({}, initState, {
|
||||
@@ -627,15 +627,15 @@ describe('submissionReducer test suite', () => {
|
||||
sections: Object.assign({}, initState[submissionId].sections, {
|
||||
upload: Object.assign({}, initState[submissionId].sections.upload, {
|
||||
data: {
|
||||
files: [fileData]
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
files: [fileData],
|
||||
},
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
const expectedState = {
|
||||
files: [fileData2]
|
||||
files: [fileData2],
|
||||
};
|
||||
|
||||
const action = new EditFileDataAction(submissionId, 'upload', uuid, fileData2);
|
||||
|
Reference in New Issue
Block a user