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:
@@ -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,
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user