[CST-6685] removed -a option

This commit is contained in:
Nikunj Sharma
2022-09-29 19:13:39 +05:30
parent aa53e2fff6
commit fadcd2e0c6
2 changed files with 3 additions and 7 deletions

View File

@@ -150,11 +150,10 @@ describe('ExportBatchSelectorComponent', () => {
done();
});
});
it('should invoke the batch-export script with option --id uuid and -a option', () => {
it('should invoke the batch-export script with option --id uuid option', () => {
const parameterValues: ProcessParameter[] = [
Object.assign(new ProcessParameter(), { name: '--id', value: mockCollection.uuid }),
Object.assign(new ProcessParameter(), { name: '--type', value: 'COLLECTION' }),
Object.assign(new ProcessParameter(), { name: '-a' }),
];
expect(scriptService.invoke).toHaveBeenCalledWith(BATCH_EXPORT_SCRIPT_NAME, parameterValues, []);
});
@@ -176,7 +175,7 @@ describe('ExportBatchSelectorComponent', () => {
done();
});
});
it('should invoke the Batch-export script with option --id uuid without the -a option', () => {
it('should invoke the Batch-export script with option --id uuid without option', () => {
const parameterValues: ProcessParameter[] = [
Object.assign(new ProcessParameter(), { name: '--id', value: mockCollection.uuid }),
Object.assign(new ProcessParameter(), { name: '--type', value: 'COLLECTION' })

View File

@@ -86,10 +86,7 @@ export class ExportBatchSelectorComponent extends DSOSelectorModalWrapperCompone
Object.assign(new ProcessParameter(), { name: '--type', value: 'COLLECTION' })
];
return this.authorizationDataService.isAuthorized(FeatureID.AdministratorOf).pipe(
switchMap((isAdmin) => {
if (isAdmin) {
parameterValues.push(Object.assign(new ProcessParameter(), {name: '-a'}));
}
switchMap(() => {
return this.scriptDataService.invoke(BATCH_EXPORT_SCRIPT_NAME, parameterValues, []);
}),
getFirstCompletedRemoteData(),