mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-506] Unify thumbnail service (#2014)
* move thumbnail service in core * fix folder
This commit is contained in:
@@ -22,7 +22,6 @@ import {
|
||||
LogService,
|
||||
LogServiceMock
|
||||
} from 'ng2-alfresco-core';
|
||||
import { FileNode } from '../assets/document-library.model.mock';
|
||||
import { CookieServiceMock } from '../../../ng2-alfresco-core/src/assets/cookie.service.mock';
|
||||
import { DocumentListService } from './document-list.service';
|
||||
|
||||
@@ -115,26 +114,6 @@ describe('DocumentListService', () => {
|
||||
jasmine.Ajax.uninstall();
|
||||
});
|
||||
|
||||
it('should require node to get thumbnail url', () => {
|
||||
expect(service.getDocumentThumbnailUrl(null)).toBeNull();
|
||||
});
|
||||
|
||||
it('should require content service to get thumbnail url', () => {
|
||||
let file = new FileNode();
|
||||
expect(service.getDocumentThumbnailUrl(file)).not.toBeNull();
|
||||
});
|
||||
|
||||
it('should resolve fallback icon for mime type', () => {
|
||||
let icon = service.getMimeTypeIcon('image/png');
|
||||
expect(icon).toBe(service.mimeTypeIcons['image/png']);
|
||||
});
|
||||
|
||||
it('should resolve default icon for mime type', () => {
|
||||
expect(service.getMimeTypeIcon(null)).toBe(DocumentListService.DEFAULT_MIME_TYPE_ICON);
|
||||
expect(service.getMimeTypeIcon('')).toBe(DocumentListService.DEFAULT_MIME_TYPE_ICON);
|
||||
expect(service.getMimeTypeIcon('missing/type')).toBe(DocumentListService.DEFAULT_MIME_TYPE_ICON);
|
||||
});
|
||||
|
||||
it('should create a folder in the path', () => {
|
||||
service.createFolder('fake-name', 'fake-path').subscribe(
|
||||
res => {
|
||||
|
Reference in New Issue
Block a user