mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
fix tests
This commit is contained in:
@@ -51,6 +51,7 @@ describe("AppearanceV2Component", () => {
|
|||||||
const enableRoutingAnimation$ = new BehaviorSubject<boolean>(true);
|
const enableRoutingAnimation$ = new BehaviorSubject<boolean>(true);
|
||||||
const enableCompactMode$ = new BehaviorSubject<boolean>(false);
|
const enableCompactMode$ = new BehaviorSubject<boolean>(false);
|
||||||
const showQuickCopyActions$ = new BehaviorSubject<boolean>(false);
|
const showQuickCopyActions$ = new BehaviorSubject<boolean>(false);
|
||||||
|
const clickItemsToAutofillVaultView$ = new BehaviorSubject<boolean>(false);
|
||||||
const setSelectedTheme = jest.fn().mockResolvedValue(undefined);
|
const setSelectedTheme = jest.fn().mockResolvedValue(undefined);
|
||||||
const setShowFavicons = jest.fn().mockResolvedValue(undefined);
|
const setShowFavicons = jest.fn().mockResolvedValue(undefined);
|
||||||
const setEnableBadgeCounter = jest.fn().mockResolvedValue(undefined);
|
const setEnableBadgeCounter = jest.fn().mockResolvedValue(undefined);
|
||||||
@@ -103,7 +104,10 @@ describe("AppearanceV2Component", () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
provide: VaultSettingsService,
|
provide: VaultSettingsService,
|
||||||
useValue: mock<VaultSettingsService>(),
|
useValue: {
|
||||||
|
clickItemsToAutofillVaultView$,
|
||||||
|
setClickItemsToAutofillVaultView: jest.fn().mockResolvedValue(undefined),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
@@ -122,7 +126,10 @@ describe("AppearanceV2Component", () => {
|
|||||||
fixture.detectChanges();
|
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({
|
expect(component.appearanceForm.value).toEqual({
|
||||||
enableAnimations: true,
|
enableAnimations: true,
|
||||||
enableFavicon: true,
|
enableFavicon: true,
|
||||||
@@ -131,6 +138,7 @@ describe("AppearanceV2Component", () => {
|
|||||||
enableCompactMode: false,
|
enableCompactMode: false,
|
||||||
showQuickCopyActions: false,
|
showQuickCopyActions: false,
|
||||||
width: "default",
|
width: "default",
|
||||||
|
clickItemsToAutofillVaultView: false,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user