[ACS-8823] Viewer - do not show non responsive dialog if blobFile was provided (#10247)

This commit is contained in:
Mykyta Maliarchuk 2024-09-27 10:28:46 +02:00 committed by GitHub
parent e9bfcbd3fb
commit 602460c574
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View File

@ -611,6 +611,14 @@ describe('ViewerComponent', () => {
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(() => {
dialogOpenSpy.and.returnValue({ afterClosed: () => of(DownloadPromptActions.WAIT) } as any);
fixture.detectChanges();

View File

@ -456,7 +456,7 @@ export class ViewerComponent<T> implements OnDestroy, OnInit, OnChanges {
}
private showOrClearDownloadPrompt() {
if (!this.urlFile) {
if (!this.urlFile && !this.blobFile) {
this.showDownloadPrompt();
} else {
this.clearDownloadPromptTimeouts();