diff --git a/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.spec.ts b/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.spec.ts index ebde019ac3f..b1eb9d6276d 100644 --- a/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.spec.ts +++ b/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.spec.ts @@ -478,7 +478,7 @@ describe('AlfrescoViewerComponent', () => { }); describe('mimeType', () => { - it('should set mime type based on nodeData content', async () => { + it('should set mime type based on renditionMimeType rather then nodeData', async () => { const defaultNode: Node = { id: 'mock-id', name: 'Mock Node', @@ -496,7 +496,7 @@ describe('AlfrescoViewerComponent', () => { spyOn(renditionService, 'getNodeRendition').and.returnValue( Promise.resolve({ url: '', - mimeType: '' + mimeType: 'application/pdf' }) ); @@ -510,7 +510,7 @@ describe('AlfrescoViewerComponent', () => { } as Node); await fixture.whenStable(); - expect(component.mimeType).toEqual('application/msWord'); + expect(component.mimeType).toEqual('application/pdf'); }); }); diff --git a/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.ts b/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.ts index c9f09f22b20..4a9aa507fb2 100644 --- a/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.ts +++ b/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.ts @@ -346,7 +346,7 @@ export class AlfrescoViewerComponent implements OnChanges, OnInit, OnDestroy { const nodeMimeType = nodeData?.content?.mimeType; const renditionMimeType = nodeRendition.mimeType; - mimeType = nodeMimeType || renditionMimeType; + mimeType = renditionMimeType || nodeMimeType; } } else if (viewerType === 'media') { this.tracks = await this.renditionService.generateMediaTracksRendition(this.nodeId);