mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4481] Fix Viewer peview for unsupported new versions (#6101)
* [ADF-4481] Fix Viewer peview for unsupported new versions * Update img-viewer.component.ts
This commit is contained in:
@@ -878,6 +878,21 @@ describe('ViewerComponent', () => {
|
||||
component.ngOnChanges();
|
||||
});
|
||||
|
||||
it('should swicth to the unkwown template if the type specific viewers throw an error', (done) => {
|
||||
component.urlFile = 'fake-url-file.icns';
|
||||
component.mimeType = 'image/png';
|
||||
component.ngOnChanges();
|
||||
fixture.detectChanges();
|
||||
|
||||
component.onUnsupportedFile();
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
expect(element.querySelector('adf-viewer-unknown-format')).toBeDefined();
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('Events', () => {
|
||||
|
Reference in New Issue
Block a user