mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[CST-3091] fix close dialog and test
This commit is contained in:
@@ -156,4 +156,9 @@ describe('CollectionSelectorComponent', () => {
|
||||
expect(component.selectObject).toHaveBeenCalled();
|
||||
});
|
||||
}));
|
||||
|
||||
it('should close the dialog', () => {
|
||||
component.close();
|
||||
expect((component as any).activeModal.close).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
@@ -20,4 +20,10 @@ export class CollectionSelectorComponent {
|
||||
this.activeModal.close(dso);
|
||||
}
|
||||
|
||||
/**
|
||||
* Close the modal
|
||||
*/
|
||||
close() {
|
||||
this.activeModal.close();
|
||||
}
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ import { By } from '@angular/platform-browser';
|
||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { UploaderComponent } from 'src/app/shared/uploader/uploader.component';
|
||||
|
||||
fdescribe('MyDSpaceNewSubmissionComponent test', () => {
|
||||
describe('MyDSpaceNewSubmissionComponent test', () => {
|
||||
|
||||
const translateService: TranslateService = jasmine.createSpyObj('translateService', {
|
||||
get: (key: string): any => { observableOf(key) },
|
||||
|
Reference in New Issue
Block a user