From 72cc46bf8a09d37ec6faf18be7721bd37cc0c3b9 Mon Sep 17 00:00:00 2001 From: --global <> Date: Fri, 20 Dec 2024 14:23:16 -0500 Subject: [PATCH] Adding back useful code and trying to fix inactive-two-factor-report.component.spec.ts issue --- .../src/app/tools/reports/pages/cipher-report.component.ts | 4 ++++ .../pages/inactive-two-factor-report.component.spec.ts | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/apps/web/src/app/tools/reports/pages/cipher-report.component.ts b/apps/web/src/app/tools/reports/pages/cipher-report.component.ts index 4e400243b9..e72539de51 100644 --- a/apps/web/src/app/tools/reports/pages/cipher-report.component.ts +++ b/apps/web/src/app/tools/reports/pages/cipher-report.component.ts @@ -138,6 +138,10 @@ export class CipherReportComponent implements OnDestroy { this.hasLoaded = true; } async selectCipher(cipher: CipherView) { + if (!(await this.repromptCipher(cipher))) { + return; + } + const cipherFormConfig = await this.cipherFormConfigService.buildConfig( "edit", cipher.id as CipherId, diff --git a/apps/web/src/app/tools/reports/pages/inactive-two-factor-report.component.spec.ts b/apps/web/src/app/tools/reports/pages/inactive-two-factor-report.component.spec.ts index ba02b962d9..df2517edf6 100644 --- a/apps/web/src/app/tools/reports/pages/inactive-two-factor-report.component.spec.ts +++ b/apps/web/src/app/tools/reports/pages/inactive-two-factor-report.component.spec.ts @@ -12,6 +12,7 @@ import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.serv import { DialogService } from "@bitwarden/components"; import { DefaultCipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault"; +import { CipherReportComponent } from "./cipher-report.component"; import { InactiveTwoFactorReportComponent } from "./inactive-two-factor-report.component"; import { cipherData } from "./reports-ciphers.mock"; @@ -62,6 +63,10 @@ describe("InactiveTwoFactorReportComponent", () => { provide: DefaultCipherFormConfigService, useValue: mock(), }, + { + provide: CipherReportComponent, + useValue: mock(), + }, ], schemas: [], }).compileComponents();