From ed88b5f047adb61dd34a26cf6bf226daeef1f039 Mon Sep 17 00:00:00 2001 From: Todd Martin Date: Wed, 10 Dec 2025 17:04:30 -0500 Subject: [PATCH] Updated stories to hard-code new field. --- .../extension-anon-layout-wrapper.stories.ts | 11 ++++++----- .../navigation-switcher.stories.ts | 12 ++++++------ .../product-switcher/product-switcher.stories.ts | 12 ++++++------ 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/apps/browser/src/popup/components/extension-anon-layout-wrapper/extension-anon-layout-wrapper.stories.ts b/apps/browser/src/popup/components/extension-anon-layout-wrapper/extension-anon-layout-wrapper.stories.ts index 506b63225bb..079dbbfa624 100644 --- a/apps/browser/src/popup/components/extension-anon-layout-wrapper/extension-anon-layout-wrapper.stories.ts +++ b/apps/browser/src/popup/components/extension-anon-layout-wrapper/extension-anon-layout-wrapper.stories.ts @@ -22,7 +22,6 @@ import { } from "@bitwarden/common/platform/abstractions/environment.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; -import { mockAccountInfoWith } from "@bitwarden/common/spec"; import { UserId } from "@bitwarden/common/types/guid"; import { AnonLayoutWrapperDataService, ButtonModule, I18nMockService } from "@bitwarden/components"; @@ -77,12 +76,14 @@ const decorators = (options: { { provide: AccountService, useValue: { + // We can't use mockAccountInfoWith() here because we can't take a dependency on @bitwarden/common/spec. + // This is because that package relies on jest dependencies that aren't available here. activeAccount$: of({ id: "test-user-id" as UserId, - ...mockAccountInfoWith({ - name: "Test User 1", - email: "test@email.com", - }), + name: "Test User 1", + email: "test@email.com", + emailVerified: true, + creationDate: "2024-01-01T00:00:00.000Z", }), }, }, diff --git a/apps/web/src/app/layouts/product-switcher/navigation-switcher/navigation-switcher.stories.ts b/apps/web/src/app/layouts/product-switcher/navigation-switcher/navigation-switcher.stories.ts index 789af39664d..ea6e972e431 100644 --- a/apps/web/src/app/layouts/product-switcher/navigation-switcher/navigation-switcher.stories.ts +++ b/apps/web/src/app/layouts/product-switcher/navigation-switcher/navigation-switcher.stories.ts @@ -15,7 +15,6 @@ import { ConfigService } from "@bitwarden/common/platform/abstractions/config/co import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SyncService } from "@bitwarden/common/platform/sync"; -import { mockAccountInfoWith } from "@bitwarden/common/spec"; import { UserId } from "@bitwarden/common/types/guid"; import { LayoutComponent, NavigationModule } from "@bitwarden/components"; // FIXME: remove `src` and fix import @@ -76,13 +75,14 @@ class MockSyncService implements Partial { } class MockAccountService implements Partial { + // We can't use mockAccountInfoWith() here because we can't take a dependency on @bitwarden/common/spec. + // This is because that package relies on jest dependencies that aren't available here. activeAccount$?: Observable = of({ id: "test-user-id" as UserId, - ...mockAccountInfoWith({ - email: "test@email.com", - name: "Test User 1", - emailVerified: true, - }), + name: "Test User 1", + email: "test@email.com", + emailVerified: true, + creationDate: "2024-01-01T00:00:00.000Z", }); } diff --git a/apps/web/src/app/layouts/product-switcher/product-switcher.stories.ts b/apps/web/src/app/layouts/product-switcher/product-switcher.stories.ts index 67ecfddd161..d412530a635 100644 --- a/apps/web/src/app/layouts/product-switcher/product-switcher.stories.ts +++ b/apps/web/src/app/layouts/product-switcher/product-switcher.stories.ts @@ -16,7 +16,6 @@ import { ConfigService } from "@bitwarden/common/platform/abstractions/config/co import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SyncService } from "@bitwarden/common/platform/sync"; -import { mockAccountInfoWith } from "@bitwarden/common/spec"; import { UserId } from "@bitwarden/common/types/guid"; import { IconButtonModule, LinkModule, MenuModule } from "@bitwarden/components"; // FIXME: remove `src` and fix import @@ -76,13 +75,14 @@ class MockSyncService implements Partial { } class MockAccountService implements Partial { + // We can't use mockAccountInfoWith() here because we can't take a dependency on @bitwarden/common/spec. + // This is because that package relies on jest dependencies that aren't available here. activeAccount$?: Observable = of({ id: "test-user-id" as UserId, - ...mockAccountInfoWith({ - email: "test@email.com", - name: "Test User 1", - emailVerified: true, - }), + name: "Test User 1", + email: "test@email.com", + emailVerified: true, + creationDate: "2024-01-01T00:00:00.000Z", }); }