Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
quexten committed Jan 9, 2025
1 parent d10baf8 commit 2439e23
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ import {
import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vault-timeout/vault-timeout-settings.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { UserId } from "@bitwarden/common/types/guid";
import { KeyService, BiometricsService, BiometricsStatus } from "@bitwarden/key-management";
import {
KeyService,
BiometricsService,
BiometricsStatus,
BiometricStateService,
} from "@bitwarden/key-management";
import { UnlockOptions } from "@bitwarden/key-management/angular";

import { BrowserRouterService } from "../../../platform/popup/services/browser-router.service";
Expand All @@ -26,6 +31,7 @@ describe("ExtensionLockComponentService", () => {
let vaultTimeoutSettingsService: MockProxy<VaultTimeoutSettingsService>;
let keyService: MockProxy<KeyService>;
let routerService: MockProxy<BrowserRouterService>;
let biometricStateService: MockProxy<BiometricStateService>;

beforeEach(() => {
userDecryptionOptionsService = mock<UserDecryptionOptionsServiceAbstraction>();
Expand All @@ -35,6 +41,7 @@ describe("ExtensionLockComponentService", () => {
vaultTimeoutSettingsService = mock<VaultTimeoutSettingsService>();
keyService = mock<KeyService>();
routerService = mock<BrowserRouterService>();
biometricStateService = mock<BiometricStateService>();

TestBed.configureTestingModule({
providers: [
Expand Down Expand Up @@ -67,6 +74,10 @@ describe("ExtensionLockComponentService", () => {
provide: BrowserRouterService,
useValue: routerService,
},
{
provide: BiometricStateService,
useValue: biometricStateService,
},
],
});

Expand Down Expand Up @@ -306,6 +317,7 @@ describe("ExtensionLockComponentService", () => {
platformUtilsService.supportsSecureStorage.mockReturnValue(
mockInputs.platformSupportsSecureStorage,
);
biometricStateService.biometricUnlockEnabled$ = of(true);

// PIN
pinService.isPinDecryptionAvailable.mockResolvedValue(mockInputs.pinDecryptionAvailable);
Expand Down

0 comments on commit 2439e23

Please sign in to comment.