[ADF-641] fix upload issues with various file types (#1887)

* fix upload issues with various file types

- removes file type check as most browsers leave this field empty
- allows uploading all types of files

* remove obsolete tests
This commit is contained in:
Denys Vuika
2017-05-19 16:06:27 +01:00
committed by Eugenio Romano
parent e63802ef4f
commit b79ee13d11
2 changed files with 5 additions and 47 deletions

View File

@@ -65,26 +65,6 @@ describe('UploadDragAreaComponent', () => {
TestBed.resetTestingModule();
});
it('should show an folder non supported error in console when the file type is empty', () => {
component.showNotificationBar = false;
spyOn(logService, 'error');
let fileFake = new File([''], 'folder-fake', {type: ''});
component.onFilesDropped([fileFake]);
expect(logService.error).toHaveBeenCalledWith('FILE_UPLOAD.MESSAGES.FOLDER_NOT_SUPPORTED');
});
it('should show an folder non supported error in the notification bar when the file type is empty', () => {
component.showErrorNotificationBar = jasmine.createSpy('_showErrorNotificationBar');
component.showNotificationBar = true;
let fileFake = new File([''], 'folder-fake', {type: ''});
component.onFilesDropped([fileFake]);
expect(component.showErrorNotificationBar).toHaveBeenCalledWith('FILE_UPLOAD.MESSAGES.FOLDER_NOT_SUPPORTED');
});
it('should upload the list of files dropped', () => {
component.currentFolderPath = '/root-fake-/sites-fake/folder-fake';
component.onSuccess = null;