mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
CST-6685 updated changes
This commit is contained in:
@@ -101,6 +101,7 @@ describe('BatchImportPageComponent', () => {
|
||||
const parameterValues: ProcessParameter[] = [
|
||||
Object.assign(new ProcessParameter(), { name: '--zip', value: 'filename.zip' }),
|
||||
];
|
||||
parameterValues.push(Object.assign(new ProcessParameter(), { name: '--add', value: 'filename.zip' }));
|
||||
expect(scriptService.invoke).toHaveBeenCalledWith(BATCH_IMPORT_SCRIPT_NAME, parameterValues, [fileMock]);
|
||||
});
|
||||
it('success notification is shown', () => {
|
||||
@@ -121,6 +122,7 @@ describe('BatchImportPageComponent', () => {
|
||||
it('metadata-import script is invoked with --zip fileName and the mockFile and -v validate-only', () => {
|
||||
const parameterValues: ProcessParameter[] = [
|
||||
Object.assign(new ProcessParameter(), { name: '--zip', value: 'filename.zip' }),
|
||||
Object.assign(new ProcessParameter(), { name: '--add', value: 'filename.zip' }),
|
||||
Object.assign(new ProcessParameter(), { name: '-v', value: true }),
|
||||
];
|
||||
expect(scriptService.invoke).toHaveBeenCalledWith(BATCH_IMPORT_SCRIPT_NAME, parameterValues, [fileMock]);
|
||||
|
@@ -78,6 +78,7 @@ export class BatchImportPageComponent {
|
||||
const parameterValues: ProcessParameter[] = [
|
||||
Object.assign(new ProcessParameter(), { name: '--zip', value: this.fileObject.name }),
|
||||
];
|
||||
parameterValues.push(Object.assign(new ProcessParameter(), { name: '--add', value: this.fileObject.name }));
|
||||
if (this.dso) {
|
||||
parameterValues.push(Object.assign(new ProcessParameter(), { name: '--collection', value: this.dso.uuid }));
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ import { dataService } from '../base/data-service.decorator';
|
||||
|
||||
export const METADATA_IMPORT_SCRIPT_NAME = 'metadata-import';
|
||||
export const METADATA_EXPORT_SCRIPT_NAME = 'metadata-export';
|
||||
export const BATCH_IMPORT_SCRIPT_NAME = 'batch-import';
|
||||
export const BATCH_IMPORT_SCRIPT_NAME = 'import';
|
||||
|
||||
@Injectable()
|
||||
@dataService(SCRIPT)
|
||||
|
@@ -18,7 +18,7 @@ import { Observable, of } from 'rxjs';
|
||||
})
|
||||
export class ImportBatchSelectorComponent extends DSOSelectorModalWrapperComponent implements OnInit {
|
||||
objectType = DSpaceObjectType.DSPACEOBJECT;
|
||||
selectorTypes = [DSpaceObjectType.COLLECTION, DSpaceObjectType.COMMUNITY];
|
||||
selectorTypes = [DSpaceObjectType.COLLECTION];
|
||||
action = SelectorActionType.IMPORT_BATCH;
|
||||
/**
|
||||
* An event fired when the modal is closed
|
||||
|
@@ -554,7 +554,7 @@
|
||||
|
||||
"admin.metadata-import.page.help": "You can drop or browse CSV files that contain batch metadata operations on files here",
|
||||
|
||||
"admin.batch-import.page.help": "You can drop or browse ZIP files that contain batch operations on files here",
|
||||
"admin.batch-import.page.help": "Select the Collection to import into. Then, drop or browse to a Simple Archive Format (SAF) zip file that includes the Items to import",
|
||||
|
||||
"admin.metadata-import.page.dropMsg": "Drop a metadata CSV to import",
|
||||
|
||||
|
Reference in New Issue
Block a user