1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 09:43:23 +00:00

Adding back useful code and trying to fix inactive-two-factor-report.component.spec.ts issue

This commit is contained in:
--global
2024-12-20 14:23:16 -05:00
parent d730852c27
commit 72cc46bf8a
2 changed files with 9 additions and 0 deletions

View File

@@ -138,6 +138,10 @@ export class CipherReportComponent implements OnDestroy {
this.hasLoaded = true; this.hasLoaded = true;
} }
async selectCipher(cipher: CipherView) { async selectCipher(cipher: CipherView) {
if (!(await this.repromptCipher(cipher))) {
return;
}
const cipherFormConfig = await this.cipherFormConfigService.buildConfig( const cipherFormConfig = await this.cipherFormConfigService.buildConfig(
"edit", "edit",
cipher.id as CipherId, cipher.id as CipherId,

View File

@@ -12,6 +12,7 @@ import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.serv
import { DialogService } from "@bitwarden/components"; import { DialogService } from "@bitwarden/components";
import { DefaultCipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault"; import { DefaultCipherFormConfigService, PasswordRepromptService } from "@bitwarden/vault";
import { CipherReportComponent } from "./cipher-report.component";
import { InactiveTwoFactorReportComponent } from "./inactive-two-factor-report.component"; import { InactiveTwoFactorReportComponent } from "./inactive-two-factor-report.component";
import { cipherData } from "./reports-ciphers.mock"; import { cipherData } from "./reports-ciphers.mock";
@@ -62,6 +63,10 @@ describe("InactiveTwoFactorReportComponent", () => {
provide: DefaultCipherFormConfigService, provide: DefaultCipherFormConfigService,
useValue: mock<DefaultCipherFormConfigService>(), useValue: mock<DefaultCipherFormConfigService>(),
}, },
{
provide: CipherReportComponent,
useValue: mock<CipherReportComponent>(),
},
], ],
schemas: [], schemas: [],
}).compileComponents(); }).compileComponents();