From 09d3e0b9feffa548db0c844ce17fcbc31b1ec13c Mon Sep 17 00:00:00 2001 From: jaasen-livefront Date: Tue, 18 Feb 2025 10:56:53 -0800 Subject: [PATCH] fix tests --- .../popup/settings/appearance-v2.component.spec.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/browser/src/vault/popup/settings/appearance-v2.component.spec.ts b/apps/browser/src/vault/popup/settings/appearance-v2.component.spec.ts index 3426b0aff18..eed5e8df2a8 100644 --- a/apps/browser/src/vault/popup/settings/appearance-v2.component.spec.ts +++ b/apps/browser/src/vault/popup/settings/appearance-v2.component.spec.ts @@ -51,6 +51,7 @@ describe("AppearanceV2Component", () => { const enableRoutingAnimation$ = new BehaviorSubject(true); const enableCompactMode$ = new BehaviorSubject(false); const showQuickCopyActions$ = new BehaviorSubject(false); + const clickItemsToAutofillVaultView$ = new BehaviorSubject(false); const setSelectedTheme = jest.fn().mockResolvedValue(undefined); const setShowFavicons = jest.fn().mockResolvedValue(undefined); const setEnableBadgeCounter = jest.fn().mockResolvedValue(undefined); @@ -103,7 +104,10 @@ describe("AppearanceV2Component", () => { }, { provide: VaultSettingsService, - useValue: mock(), + useValue: { + clickItemsToAutofillVaultView$, + setClickItemsToAutofillVaultView: jest.fn().mockResolvedValue(undefined), + }, }, ], }) @@ -122,7 +126,10 @@ describe("AppearanceV2Component", () => { fixture.detectChanges(); }); - it("populates the form with the user's current settings", () => { + it("populates the form with the user's current settings", async () => { + fixture.detectChanges(); + await fixture.whenStable(); + fixture.detectChanges(); expect(component.appearanceForm.value).toEqual({ enableAnimations: true, enableFavicon: true, @@ -131,6 +138,7 @@ describe("AppearanceV2Component", () => { enableCompactMode: false, showQuickCopyActions: false, width: "default", + clickItemsToAutofillVaultView: false, }); });