mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5027] Fix APS rendition (#5285)
* fix APS rendition * fix unit * fix unit
This commit is contained in:
@@ -194,7 +194,7 @@ export class ProcessAttachmentListComponent implements OnChanges, AfterContentIn
|
||||
}
|
||||
|
||||
emitDocumentContent(content: any) {
|
||||
this.activitiContentService.getFileRawContent(content.id).subscribe(
|
||||
this.activitiContentService.getContentPreview(content.id).subscribe(
|
||||
(blob: Blob) => {
|
||||
content.contentBlob = blob;
|
||||
this.attachmentClick.emit(content);
|
||||
|
@@ -32,6 +32,7 @@ describe('TaskAttachmentList', () => {
|
||||
let mockAttachment: any;
|
||||
let deleteContentSpy: jasmine.Spy;
|
||||
let getFileRawContentSpy: jasmine.Spy;
|
||||
let getContentPreviewSpy: jasmine.Spy;
|
||||
let disposableSuccess: any;
|
||||
|
||||
setupTestBed({
|
||||
@@ -87,6 +88,8 @@ describe('TaskAttachmentList', () => {
|
||||
deleteContentSpy = spyOn(service, 'deleteRelatedContent').and.returnValue(of({ successCode: true }));
|
||||
|
||||
const blobObj = new Blob();
|
||||
|
||||
getContentPreviewSpy = spyOn(service, 'getContentPreview').and.returnValue(of(blobObj));
|
||||
getFileRawContentSpy = spyOn(service, 'getFileRawContent').and.returnValue(of(blobObj));
|
||||
});
|
||||
|
||||
@@ -144,7 +147,7 @@ describe('TaskAttachmentList', () => {
|
||||
it('emit document when a user wants to view the document', () => {
|
||||
component.emitDocumentContent(mockAttachment.data[1]);
|
||||
fixture.detectChanges();
|
||||
expect(getFileRawContentSpy).toHaveBeenCalled();
|
||||
expect(getContentPreviewSpy).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('download document when a user wants to view the document', () => {
|
||||
|
@@ -204,7 +204,7 @@ export class TaskAttachmentListComponent implements OnChanges, AfterContentInit
|
||||
}
|
||||
|
||||
emitDocumentContent(content: any) {
|
||||
this.activitiContentService.getFileRawContent(content.id).subscribe(
|
||||
this.activitiContentService.getContentPreview(content.id).subscribe(
|
||||
(blob: Blob) => {
|
||||
content.contentBlob = blob;
|
||||
this.attachmentClick.emit(content);
|
||||
|
Reference in New Issue
Block a user