mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2455] Fallback thumbnail fix (#3164)
* Show default icon when thumbnail image is broken * Remove thumbnails prop from demo-shell * Unit test added
This commit is contained in:
committed by
Denys Vuika
parent
c214054767
commit
12df7500da
@@ -739,6 +739,17 @@ describe('DataTable', () => {
|
||||
expect(event.target.src).toBe(originalSrc);
|
||||
});
|
||||
|
||||
it('should replace image source with icon if fallback is not available and mimeType is provided', () => {
|
||||
let event = <any> {
|
||||
target: {
|
||||
src: 'missing-image'
|
||||
}
|
||||
};
|
||||
|
||||
dataTable.onImageLoadingError(event, 'image/png');
|
||||
expect(event.target.src).toBe('./assets/images/ft_ic_raster_image.svg');
|
||||
});
|
||||
|
||||
it('should not get cell tooltip when row is not provided', () => {
|
||||
const col = <DataColumn> { key: 'name', type: 'text' };
|
||||
expect(dataTable.getCellTooltip(null, col)).toBeNull();
|
||||
|
Reference in New Issue
Block a user