mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-07 18:25:09 +00:00
[ACS-8823] Viewer - do not show non responsive dialog if blobFile was provided (#10247)
This commit is contained in:
parent
e9bfcbd3fb
commit
602460c574
@ -611,6 +611,14 @@ describe('ViewerComponent', () => {
|
|||||||
expect(dialogOpenSpy).toHaveBeenCalled();
|
expect(dialogOpenSpy).toHaveBeenCalled();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
it('should not show non responsive dialog if blobFile was provided', fakeAsync(() => {
|
||||||
|
component.blobFile = new Blob(['mock content'], { type: 'text/plain' });
|
||||||
|
fixture.detectChanges();
|
||||||
|
tick(3000);
|
||||||
|
fixture.detectChanges();
|
||||||
|
expect(dialogOpenSpy).not.toHaveBeenCalled();
|
||||||
|
}));
|
||||||
|
|
||||||
it('should show reminder non responsive dialog after initial dialog', fakeAsync(() => {
|
it('should show reminder non responsive dialog after initial dialog', fakeAsync(() => {
|
||||||
dialogOpenSpy.and.returnValue({ afterClosed: () => of(DownloadPromptActions.WAIT) } as any);
|
dialogOpenSpy.and.returnValue({ afterClosed: () => of(DownloadPromptActions.WAIT) } as any);
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -456,7 +456,7 @@ export class ViewerComponent<T> implements OnDestroy, OnInit, OnChanges {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private showOrClearDownloadPrompt() {
|
private showOrClearDownloadPrompt() {
|
||||||
if (!this.urlFile) {
|
if (!this.urlFile && !this.blobFile) {
|
||||||
this.showDownloadPrompt();
|
this.showDownloadPrompt();
|
||||||
} else {
|
} else {
|
||||||
this.clearDownloadPromptTimeouts();
|
this.clearDownloadPromptTimeouts();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user