1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

lock component unit test coverage (#15801)

This commit is contained in:
Maciej Zieniuk
2025-08-02 14:55:14 +02:00
committed by GitHub
parent 2dd6164fce
commit 8a22dca877
2 changed files with 681 additions and 6 deletions

View File

@@ -74,6 +74,7 @@ const clientTypeToSuccessRouteRecord: Partial<Record<ClientType, string>> = {
/// The minimum amount of time to wait after a process reload for a biometrics auto prompt to be possible
/// Fixes safari autoprompt behavior
const AUTOPROMPT_BIOMETRICS_PROCESS_RELOAD_DELAY = 5000;
@Component({
selector: "bit-lock",
templateUrl: "lock.component.html",
@@ -123,7 +124,7 @@ export class LockComponent implements OnInit, OnDestroy {
formGroup: FormGroup | null = null;
// Browser extension properties:
private shouldClosePopout = false;
shouldClosePopout = false;
// Desktop properties:
private deferFocus: boolean | null = null;
@@ -154,13 +155,10 @@ export class LockComponent implements OnInit, OnDestroy {
private formBuilder: FormBuilder,
private toastService: ToastService,
private userAsymmetricKeysRegenerationService: UserAsymmetricKeysRegenerationService,
private biometricService: BiometricsService,
private logoutService: LogoutService,
private lockComponentService: LockComponentService,
private anonLayoutWrapperDataService: AnonLayoutWrapperDataService,
// desktop deps
private broadcasterService: BroadcasterService,
) {}
@@ -211,7 +209,7 @@ export class LockComponent implements OnInit, OnDestroy {
});
}
private buildMasterPasswordForm() {
buildMasterPasswordForm() {
this.formGroup = this.formBuilder.group(
{
masterPassword: ["", [Validators.required]],
@@ -512,7 +510,7 @@ export class LockComponent implements OnInit, OnDestroy {
return true;
}
private async unlockViaMasterPassword() {
async unlockViaMasterPassword() {
if (!this.validateMasterPassword() || this.formGroup == null || this.activeAccount == null) {
return;
}