mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-08-07 17:48:54 +00:00
improved uploading of files (#1730)
* improved uploading of files - new core/UploadDirective to allow dropping files to any html element - enhanced file dropping for DataTable rows (disabled by default) - enhanced file dropping for DocumentList rows (disabled by default) - upload drop area now handles file uploads for child elements (i.e. rows in the document list) * fix unit tests * unit tests and code cleanup * #1732, fix upload of folders
This commit is contained in:
committed by
Mario Romano
parent
f8427e61e1
commit
21bfd5eef9
@@ -19,7 +19,7 @@ import { FileDraggableDirective } from '../directives/file-draggable.directive';
|
||||
|
||||
describe('FileDraggableDirective', () => {
|
||||
|
||||
let component;
|
||||
let component: FileDraggableDirective;
|
||||
|
||||
beforeEach( () => {
|
||||
component = new FileDraggableDirective();
|
||||
@@ -51,7 +51,7 @@ describe('FileDraggableDirective', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
component._onDropFiles(fakeEvent);
|
||||
component.onDropFiles(fakeEvent);
|
||||
});
|
||||
|
||||
it('should emit onFilesDropped event when a file is dragged not with Chrome' , (done) => {
|
||||
@@ -70,7 +70,7 @@ describe('FileDraggableDirective', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
component._onDropFiles(fakeEvent);
|
||||
component.onDropFiles(fakeEvent);
|
||||
});
|
||||
|
||||
it('should emit onFilesDropped event when a file is dragged with Chrome', (done) => {
|
||||
@@ -90,7 +90,7 @@ describe('FileDraggableDirective', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
component._onDropFiles(fakeEvent);
|
||||
component.onDropFiles(fakeEvent);
|
||||
});
|
||||
|
||||
it('should take the focus when the drag enter is called', () => {
|
||||
@@ -98,7 +98,7 @@ describe('FileDraggableDirective', () => {
|
||||
spyOn(mockEvent, 'preventDefault');
|
||||
|
||||
expect(component.getInputFocus()).toBe(false);
|
||||
component._onDragEnter(mockEvent);
|
||||
component.onDragEnter(mockEvent);
|
||||
expect(component.getInputFocus()).toBe(true);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user