From a12a7806b31dcb15bd06d7747a15247e427ff512 Mon Sep 17 00:00:00 2001 From: Volha Mardvilka Date: Mon, 7 Oct 2024 10:16:50 +0000 Subject: [PATCH] 370941517: (fix) return focus to initial btn after cancel download zip --- .../download-report-zip.component.spec.ts | 5 +---- .../download-report-zip/download-report-zip.component.ts | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/ui/src/app/components/download-report-zip/download-report-zip.component.spec.ts b/modules/ui/src/app/components/download-report-zip/download-report-zip.component.spec.ts index 0636f8af3..1f0919286 100644 --- a/modules/ui/src/app/components/download-report-zip/download-report-zip.component.spec.ts +++ b/modules/ui/src/app/components/download-report-zip/download-report-zip.component.spec.ts @@ -131,7 +131,7 @@ describe('DownloadReportZipComponent', () => { }); })); - it('should focus first element on page if profile is undefined', fakeAsync(() => { + it('should not call service to download zip if profile is undefined', fakeAsync(() => { const openSpy = spyOn(component.dialog, 'open').and.returnValue({ afterClosed: () => of(undefined), } as MatDialogRef); @@ -151,9 +151,6 @@ describe('DownloadReportZipComponent', () => { tick(); - expect( - focusServiceMock.focusFirstElementInContainer - ).toHaveBeenCalled(); expect(testrunServiceMock.downloadZip).not.toHaveBeenCalled(); openSpy.calls.reset(); })); diff --git a/modules/ui/src/app/components/download-report-zip/download-report-zip.component.ts b/modules/ui/src/app/components/download-report-zip/download-report-zip.component.ts index fe6a468e8..c643cc687 100644 --- a/modules/ui/src/app/components/download-report-zip/download-report-zip.component.ts +++ b/modules/ui/src/app/components/download-report-zip/download-report-zip.component.ts @@ -74,7 +74,6 @@ export class DownloadReportZipComponent .pipe(takeUntil(this.destroy$)) .subscribe(profile => { if (profile === undefined) { - this.focusManagerService.focusFirstElementInContainer(); return; } if (profile === null) {