diff --git a/docs/adr/AUTH-IDENTITY-0033-account-package-owns-identity-taken-at-construction.md b/docs/adr/AUTH-IDENTITY-0033-account-package-owns-identity-taken-at-construction.md index a6f68636be3..ff515248e68 100644 --- a/docs/adr/AUTH-IDENTITY-0033-account-package-owns-identity-taken-at-construction.md +++ b/docs/adr/AUTH-IDENTITY-0033-account-package-owns-identity-taken-at-construction.md @@ -15,7 +15,7 @@ Supersedes the original transitional text of ADR-AUTH-IDENTITY-0028 first shipped a transitional shape: the cloud app owned identity (vuefire plus the Pinia `authStore`) and pushed it into the -`@comfyorg/account` session client through `attachIdentity`, a +`@comfyorg/account-core` session client through `attachIdentity`, a post-construction seam guarded at runtime by `isAccountIdentity`. The Workshop site attached the same way. The account TDD needs the package to own Firebase initialization and sign-in state so one account layer serves the cloud app, diff --git a/package.json b/package.json index c0297b0d51f..df9f343ece4 100644 --- a/package.json +++ b/package.json @@ -160,7 +160,6 @@ "vue": "catalog:", "vue-i18n": "catalog:", "vue-router": "catalog:", - "vuefire": "catalog:", "wwobjloader2": "catalog:", "yjs": "catalog:", "zod": "catalog:", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 88375501605..4458a99d878 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -447,9 +447,6 @@ catalogs: vue-tsc: specifier: ^3.3.11 version: 3.3.11 - vuefire: - specifier: ^3.2.1 - version: 3.2.3 wwobjloader2: specifier: ^6.2.1 version: 6.2.1 @@ -695,9 +692,6 @@ importers: vue-router: specifier: 'catalog:' version: 5.2.0(@vue/compiler-sfc@3.5.42)(esbuild@0.28.1)(pinia@4.0.2(@vue/devtools-api@8.1.5)(typescript@6.0.3)(vue@3.5.42(typescript@6.0.3)))(rolldown@1.2.6)(vite@8.2.2(@types/node@25.9.5)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))(vue@3.5.42(typescript@6.0.3)) - vuefire: - specifier: 'catalog:' - version: 3.2.3(consola@3.4.2)(firebase@11.10.0)(vue@3.5.42(typescript@6.0.3)) wwobjloader2: specifier: 'catalog:' version: 6.2.1(three@0.184.0) @@ -5807,10 +5801,6 @@ packages: consola@2.15.3: resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==} - consola@3.4.2: - resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==} - engines: {node: ^14.18.0 || >=16.10.0} - console-grid@2.2.4: resolution: {integrity: sha512-OLjCRTiHhOpTRo9lQp/2FgJDyq5uQHwkEmVJulEnQ6JVf27oKKzXHZnNOv/e72V4++UdMZCrDWtvXW5sx4lyQg==} @@ -9710,22 +9700,6 @@ packages: typescript: optional: true - vuefire@3.2.3: - resolution: {integrity: sha512-3gPPGqIXHlgDS1z7lmFIQbHuVDAuRgTtLEI4ISi6G8nUmH/nbAGX9z8OQxLRZ4tFClnOAU9OBW/mqk4aJivl5g==} - engines: {node: '>=20'} - peerDependencies: - '@vue/composition-api': '*' - consola: ^3.2.3 - firebase: ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 - vue: ^2.7.0 || ^3.2.0 - peerDependenciesMeta: - '@vue/composition-api': - optional: true - consola: - optional: true - firebase: - optional: true - w3c-keyname@2.2.8: resolution: {integrity: sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==} @@ -14359,9 +14333,6 @@ snapshots: consola@2.15.3: {} - consola@3.4.2: - optional: true - console-grid@2.2.4: {} constantinople@4.0.1: @@ -19053,14 +19024,6 @@ snapshots: optionalDependencies: typescript: 6.0.3 - vuefire@3.2.3(consola@3.4.2)(firebase@11.10.0)(vue@3.5.42(typescript@6.0.3)): - dependencies: - vue: 3.5.42(typescript@6.0.3) - vue-demi: 0.14.10(vue@3.5.42(typescript@6.0.3)) - optionalDependencies: - consola: 3.4.2 - firebase: 11.10.0 - w3c-keyname@2.2.8: {} w3c-xmlserializer@5.0.0: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 5c79f87cfc6..4b8ad16f74e 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -161,7 +161,6 @@ catalog: vue-i18n: ^11.4.8 vue-router: ^5.2.0 vue-tsc: ^3.3.11 - vuefire: ^3.2.1 wwobjloader2: ^6.2.1 yaml: ^2.8.3 yjs: ^13.6.27 diff --git a/src/App.test.ts b/src/App.test.ts index e3d407f385b..f662801d784 100644 --- a/src/App.test.ts +++ b/src/App.test.ts @@ -9,7 +9,6 @@ import { useWorkspaceStore } from '@/stores/workspaceStore' import App from './App.vue' vi.mock(import('firebase/auth')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) vi.mock(import('@/components/dialog/GlobalDialog.vue'), () => ({ default: { template: '
' } diff --git a/src/components/LiteGraphCanvasSplitterOverlay.test.ts b/src/components/LiteGraphCanvasSplitterOverlay.test.ts index abce28b6091..6d57fd4f9ec 100644 --- a/src/components/LiteGraphCanvasSplitterOverlay.test.ts +++ b/src/components/LiteGraphCanvasSplitterOverlay.test.ts @@ -12,7 +12,6 @@ import { useAgentNodeSelectionStore } from '@/stores/agentNodeSelectionStore' import { useAgentPanelStore } from '@/workbench/extensions/agent/stores/agent/agentPanelStore' import { useBottomPanelStore } from '@/stores/workspace/bottomPanelStore' vi.mock(import('firebase/auth')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) /** * Regression test: the graph-canvas-panel SplitterPanel must not clip diff --git a/src/components/TopMenuSection.test.ts b/src/components/TopMenuSection.test.ts index fe5767a7738..fb9e3941a8e 100644 --- a/src/components/TopMenuSection.test.ts +++ b/src/components/TopMenuSection.test.ts @@ -27,7 +27,6 @@ import { useExecutionStore } from '@/stores/executionStore' import { TaskItemImpl, useQueueStore } from '@/stores/queueStore' import { useSidebarTabStore } from '@/stores/workspace/sidebarTabStore' vi.mock(import('firebase/auth')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) const mockData = vi.hoisted(() => ({ setShowConflictRedDot: (_value: boolean) => {} diff --git a/src/components/actionbar/ComfyRunButton/ComfyQueueButton.test.ts b/src/components/actionbar/ComfyRunButton/ComfyQueueButton.test.ts index b2f52388959..892935c2d35 100644 --- a/src/components/actionbar/ComfyRunButton/ComfyQueueButton.test.ts +++ b/src/components/actionbar/ComfyRunButton/ComfyQueueButton.test.ts @@ -23,7 +23,6 @@ import { TaskItemImpl, useQueueStore } from '@/stores/queueStore' import ComfyQueueButton from './ComfyQueueButton.vue' vi.mock(import('firebase/auth')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) vi.mock(import('@/platform/distribution/types'), () => ({ isCloud: false diff --git a/src/components/common/UserCredit.test.ts b/src/components/common/UserCredit.test.ts index 5add1b0d824..cdef14bdd55 100644 --- a/src/components/common/UserCredit.test.ts +++ b/src/components/common/UserCredit.test.ts @@ -7,7 +7,6 @@ import { useAuthStore } from '@/stores/authStore' import UserCredit from './UserCredit.vue' vi.mock(import('firebase/auth')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) describe('UserCredit', () => { beforeEach(() => { diff --git a/src/components/dialog/content/signin/ApiKeyForm.test.ts b/src/components/dialog/content/signin/ApiKeyForm.test.ts index 7ef93af194c..536b8fc4056 100644 --- a/src/components/dialog/content/signin/ApiKeyForm.test.ts +++ b/src/components/dialog/content/signin/ApiKeyForm.test.ts @@ -13,7 +13,6 @@ import { useAuthStore } from '@/stores/authStore' import ApiKeyForm from './ApiKeyForm.vue' vi.mock(import('firebase/auth')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) const i18n = createI18n({ legacy: false, diff --git a/src/components/dialog/content/signin/SignInForm.test.ts b/src/components/dialog/content/signin/SignInForm.test.ts index a34b16a4f99..23de96ac3df 100644 --- a/src/components/dialog/content/signin/SignInForm.test.ts +++ b/src/components/dialog/content/signin/SignInForm.test.ts @@ -16,7 +16,6 @@ import { useAuthStore } from '@/stores/authStore' import SignInForm from './SignInForm.vue' vi.mock(import('firebase/auth')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) // Mock the auth composables and stores vi.mock(import('@/composables/auth/useAuthActions')) diff --git a/src/components/dialog/content/signin/SignUpForm.test.ts b/src/components/dialog/content/signin/SignUpForm.test.ts index cec44299142..04dcf5e63bf 100644 --- a/src/components/dialog/content/signin/SignUpForm.test.ts +++ b/src/components/dialog/content/signin/SignUpForm.test.ts @@ -14,7 +14,6 @@ import { useAuthStore } from '@/stores/authStore' import SignUpForm from './SignUpForm.vue' vi.mock(import('firebase/auth')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) const mockTurnstileEnabled = ref(false) const mockTurnstileToken = ref('') diff --git a/src/components/graph/GraphCanvas.test.ts b/src/components/graph/GraphCanvas.test.ts index 5be7511ce4a..d884d6749d5 100644 --- a/src/components/graph/GraphCanvas.test.ts +++ b/src/components/graph/GraphCanvas.test.ts @@ -18,7 +18,6 @@ import { createNodeLocatorId } from '@/types/nodeIdentification' import GraphCanvas from './GraphCanvas.vue' vi.mock(import('firebase/auth')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) /** * GraphCanvas is the only place the first-run tour is wired into startup: it diff --git a/src/components/graph/agentPanelMount.test.ts b/src/components/graph/agentPanelMount.test.ts index 7fe5969d268..007757bfc7c 100644 --- a/src/components/graph/agentPanelMount.test.ts +++ b/src/components/graph/agentPanelMount.test.ts @@ -9,7 +9,6 @@ import { useSettingStore } from '@/platform/settings/settingStore' import LiteGraphCanvasSplitterOverlay from '../LiteGraphCanvasSplitterOverlay.vue' vi.mock(import('firebase/auth')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) beforeEach(() => { useSettingStore().settingValues['Comfy.Sidebar.Location'] = 'left' diff --git a/src/components/sidebar/SideToolbar.test.ts b/src/components/sidebar/SideToolbar.test.ts index 1550f544728..f9ab107fdd1 100644 --- a/src/components/sidebar/SideToolbar.test.ts +++ b/src/components/sidebar/SideToolbar.test.ts @@ -15,7 +15,6 @@ import type { SidebarTabExtension } from '@/types/extensionTypes' import SideToolbar from './SideToolbar.vue' vi.mock(import('firebase/auth')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) beforeEach(() => { useSettingStore().$patch({ diff --git a/src/components/sidebar/tabs/AppsSidebarTab.test.ts b/src/components/sidebar/tabs/AppsSidebarTab.test.ts index e43a2c79ba4..d15a25ea5bc 100644 --- a/src/components/sidebar/tabs/AppsSidebarTab.test.ts +++ b/src/components/sidebar/tabs/AppsSidebarTab.test.ts @@ -14,7 +14,6 @@ import { useCommandStore } from '@/stores/commandStore' import AppsSidebarTab from './AppsSidebarTab.vue' vi.mock(import('firebase/auth')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) beforeEach(() => { useAppMode().isAppMode = computed(() => true) diff --git a/src/components/sidebar/tabs/BaseWorkflowsSidebarTab.test.ts b/src/components/sidebar/tabs/BaseWorkflowsSidebarTab.test.ts index 9dca6fedc75..7eb373918da 100644 --- a/src/components/sidebar/tabs/BaseWorkflowsSidebarTab.test.ts +++ b/src/components/sidebar/tabs/BaseWorkflowsSidebarTab.test.ts @@ -16,7 +16,6 @@ import type { ComfyWorkflow } from '@/platform/workflow/management/stores/workfl import type { TreeExplorerNode } from '@/types/treeExplorerTypes' import { flattenTree } from '@/utils/treeUtil' vi.mock(import('firebase/auth')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) beforeEach(() => { useSettingStore().settingValues['Comfy.Workflow.WorkflowTabsPosition'] = diff --git a/src/components/topbar/CurrentUserButton.test.ts b/src/components/topbar/CurrentUserButton.test.ts index 5e6e6ce8b0e..c8737ca2eb7 100644 --- a/src/components/topbar/CurrentUserButton.test.ts +++ b/src/components/topbar/CurrentUserButton.test.ts @@ -10,7 +10,6 @@ import { useTeamWorkspaceStore } from '@/platform/workspace/stores/teamWorkspace import CurrentUserButton from './CurrentUserButton.vue' vi.mock(import('firebase/auth')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) const mockIsCloud = vi.hoisted(() => ({ value: false })) diff --git a/src/components/topbar/WorkflowTab.test.ts b/src/components/topbar/WorkflowTab.test.ts index defa5b31f76..d820cbaa291 100644 --- a/src/components/topbar/WorkflowTab.test.ts +++ b/src/components/topbar/WorkflowTab.test.ts @@ -14,7 +14,6 @@ import { useWorkflowTabActivityStore } from '@/stores/workflowTabActivityStore' import WorkflowTab from './WorkflowTab.vue' vi.mock(import('firebase/auth')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) const mockCloseWorkflow = vi.hoisted(() => vi.fn().mockResolvedValue(true)) vi.mock(import('@/composables/usePragmaticDragAndDrop'), () => ({ diff --git a/src/components/topbar/WorkflowTabs.test.ts b/src/components/topbar/WorkflowTabs.test.ts index ee5036efb03..9d10753bd07 100644 --- a/src/components/topbar/WorkflowTabs.test.ts +++ b/src/components/topbar/WorkflowTabs.test.ts @@ -17,7 +17,6 @@ import WorkflowTabs from './WorkflowTabs.vue' vi.mock(import('firebase/auth')) vi.mock(import('@/platform/telemetry')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) const distribution = vi.hoisted(() => ({ isCloud: false, diff --git a/src/extensions/core/agentPanel.test.ts b/src/extensions/core/agentPanel.test.ts index 62067c500cf..d0a4367ddd1 100644 --- a/src/extensions/core/agentPanel.test.ts +++ b/src/extensions/core/agentPanel.test.ts @@ -1,6 +1,5 @@ import { fromPartial } from '@total-typescript/shoehorn' vi.mock(import('firebase/auth')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import type { Mocked } from 'vitest' import { computed, effectScope, ref } from 'vue' diff --git a/src/extensions/core/agentPanelGateDependencyFailure.test.ts b/src/extensions/core/agentPanelGateDependencyFailure.test.ts index bf5d6a3220b..86e0567ed16 100644 --- a/src/extensions/core/agentPanelGateDependencyFailure.test.ts +++ b/src/extensions/core/agentPanelGateDependencyFailure.test.ts @@ -1,6 +1,5 @@ import { fromPartial } from '@total-typescript/shoehorn' vi.mock(import('firebase/auth')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) import { beforeEach, describe, expect, it, vi } from 'vitest' import { useAgentPanelStore } from '@/workbench/extensions/agent/stores/agent/agentPanelStore' diff --git a/src/platform/auth/unified/remintRetry.test.ts b/src/platform/auth/unified/remintRetry.test.ts index 8893cdd9bb9..28d5514c6d6 100644 --- a/src/platform/auth/unified/remintRetry.test.ts +++ b/src/platform/auth/unified/remintRetry.test.ts @@ -18,7 +18,6 @@ const { mockRemint, flagState } = vi.hoisted(() => ({ vi.mock(import('@/platform/telemetry')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) vi.mock(import('firebase/auth')) vi.mock(import('@/composables/useFeatureFlags'), () => ({ diff --git a/src/platform/workspace/billing/sdk/billingSdkStore.test.ts b/src/platform/workspace/billing/sdk/billingSdkStore.test.ts index 0d19621aa9c..69ff1bede20 100644 --- a/src/platform/workspace/billing/sdk/billingSdkStore.test.ts +++ b/src/platform/workspace/billing/sdk/billingSdkStore.test.ts @@ -74,7 +74,6 @@ vi.mock(import('@/composables/useFeatureFlags'), () => ({ vi.mock(import('@/platform/distribution/types'), () => ({ isCloud: true })) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) vi.mock(import('firebase/auth')) const mockLoadStripe = vi.hoisted(() => vi.fn()) diff --git a/src/platform/workspace/composables/useTopupOperation.test.ts b/src/platform/workspace/composables/useTopupOperation.test.ts index 40926914af4..ee1c767ee31 100644 --- a/src/platform/workspace/composables/useTopupOperation.test.ts +++ b/src/platform/workspace/composables/useTopupOperation.test.ts @@ -13,7 +13,6 @@ import { useTopupOperation } from '@/platform/workspace/composables/useTopupOper import { useBillingOperationStore } from '@/platform/workspace/stores/billingOperationStore' import { stubAccountIdentityPort } from '@/utils/__tests__/stubAccountIdentityPort' -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) vi.mock(import('firebase/auth')) const flagState = vi.hoisted(() => ({ diff --git a/src/platform/workspace/composables/useWorkspaceBilling.sdk.test.ts b/src/platform/workspace/composables/useWorkspaceBilling.sdk.test.ts index 91b23ba5c00..8b8cea73f8c 100644 --- a/src/platform/workspace/composables/useWorkspaceBilling.sdk.test.ts +++ b/src/platform/workspace/composables/useWorkspaceBilling.sdk.test.ts @@ -11,7 +11,6 @@ import { useWorkspaceBilling } from '@/platform/workspace/composables/useWorkspa import { useBillingOperationStore } from '@/platform/workspace/stores/billingOperationStore' import { stubAccountIdentityPort } from '@/utils/__tests__/stubAccountIdentityPort' -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) vi.mock(import('firebase/auth')) const flagState = vi.hoisted(() => ({ diff --git a/src/platform/workspace/stores/teamWorkspaceStore.test.ts b/src/platform/workspace/stores/teamWorkspaceStore.test.ts index b71e8940f3f..f6b3959c476 100644 --- a/src/platform/workspace/stores/teamWorkspaceStore.test.ts +++ b/src/platform/workspace/stores/teamWorkspaceStore.test.ts @@ -12,7 +12,6 @@ const mockDistributionTypes = vi.hoisted(() => ({ isCloud: true })) vi.mock(import('@/platform/distribution/types'), () => mockDistributionTypes) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) vi.mock(import('firebase/auth')) const mockClearWorkflowRestoreState = vi.hoisted(() => vi.fn()) diff --git a/src/stores/__tests__/authTokenPriority.test.ts b/src/stores/__tests__/authTokenPriority.test.ts index e422edc7c41..fd40ca46caa 100644 --- a/src/stores/__tests__/authTokenPriority.test.ts +++ b/src/stores/__tests__/authTokenPriority.test.ts @@ -6,7 +6,6 @@ import type { User } from 'firebase/auth' import * as firebaseAuth from 'firebase/auth' import type { Mock } from 'vitest' import { beforeEach, describe, expect, it, vi } from 'vitest' -import * as vuefire from 'vuefire' import { useAuthStore } from '@/stores/authStore' import { stubFirebaseAuthHarness } from '@/utils/__tests__/stubAccountIdentityPort' @@ -20,10 +19,6 @@ const { mockDistributionTypes } = vi.hoisted(() => ({ vi.mock(import('@/composables/useFeatureFlags')) -vi.mock(import('vuefire'), () => ({ - useFirebaseAuth: vi.fn() -})) - vi.mock(import('firebase/auth')) vi.mock(import('@/platform/telemetry')) @@ -37,8 +32,6 @@ describe('auth token priority chain', () => { let store: ReturnType let authStateCallback: (user: User | null) => void - const mockAuth: Record = {} - const mockUser: MockUser = { uid: 'test-user-id', email: 'test@example.com', @@ -48,9 +41,6 @@ describe('auth token priority chain', () => { beforeEach(() => { mockDistributionTypes.isCloud = true stubFirebaseAuthHarness() - vi.mocked(vuefire.useFirebaseAuth).mockReturnValue( - mockAuth as unknown as ReturnType - ) const authStateObservers: Array<(user: User | null) => void> = [] authStateCallback = (user) => authStateObservers.forEach((observer) => observer(user)) diff --git a/src/stores/apiKeyAuthStore.integration.test.ts b/src/stores/apiKeyAuthStore.integration.test.ts index b188d54fd36..0f005e8ed9b 100644 --- a/src/stores/apiKeyAuthStore.integration.test.ts +++ b/src/stores/apiKeyAuthStore.integration.test.ts @@ -1,17 +1,12 @@ import type { User } from 'firebase/auth' import * as firebaseAuth from 'firebase/auth' import { beforeEach, describe, expect, it, vi } from 'vitest' -import * as vuefire from 'vuefire' import { useApiKeyAuthStore } from '@/stores/apiKeyAuthStore' import { useAuthStore } from '@/stores/authStore' const mockFetch = vi.fn() -vi.mock(import('vuefire'), () => ({ - useFirebaseAuth: vi.fn() -})) - vi.mock(import('firebase/auth')) vi.mock( @@ -40,9 +35,6 @@ describe('API key authentication initialization', () => { json: () => Promise.resolve({ id: 'test-customer-id' }) }) - vi.mocked(vuefire.useFirebaseAuth).mockReturnValue( - {} as ReturnType - ) vi.mocked(firebaseAuth.onAuthStateChanged).mockImplementation( (_, callback) => { ;(callback as (user: User | null) => void)(null) diff --git a/src/workbench/extensions/agent/AgentPanelRoot.test.ts b/src/workbench/extensions/agent/AgentPanelRoot.test.ts index b1eb16b5725..2a46fd0843d 100644 --- a/src/workbench/extensions/agent/AgentPanelRoot.test.ts +++ b/src/workbench/extensions/agent/AgentPanelRoot.test.ts @@ -13,7 +13,6 @@ import { computed, defineComponent, h, nextTick, ref } from 'vue' import { useClipboard } from '@vueuse/core' vi.mock(import('firebase/auth')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) import { i18n } from '@/i18n' import { useCurrentUser } from '@/composables/auth/useCurrentUser' diff --git a/src/workbench/extensions/agent/composables/agent/useAgentConsent.test.ts b/src/workbench/extensions/agent/composables/agent/useAgentConsent.test.ts index 5b1836384c9..526457c2328 100644 --- a/src/workbench/extensions/agent/composables/agent/useAgentConsent.test.ts +++ b/src/workbench/extensions/agent/composables/agent/useAgentConsent.test.ts @@ -2,13 +2,12 @@ import { useDialogService } from '@/services/dialogService' import { render, screen } from '@testing-library/vue' import userEvent from '@testing-library/user-event' vi.mock(import('firebase/auth')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) -import { computed, defineComponent, h, reactive, ref } from 'vue' import type { GlobalSetting } from '@comfyorg/ingest-types' import { useAuthStore } from '@/stores/authStore' import { useTeamWorkspaceStore } from '@/platform/workspace/stores/teamWorkspaceStore' import { useToastStore } from '@/platform/updates/common/toastStore' import { beforeEach, describe, expect, it, vi } from 'vitest' +import { computed, defineComponent, h, reactive, ref } from 'vue' import { setImmediate } from 'node:timers/promises' import { useCurrentUser } from '@/composables/auth/useCurrentUser' diff --git a/src/workbench/extensions/agent/stores/agent/agentConsentStore.test.ts b/src/workbench/extensions/agent/stores/agent/agentConsentStore.test.ts index 2881936a3cf..62d3929446c 100644 --- a/src/workbench/extensions/agent/stores/agent/agentConsentStore.test.ts +++ b/src/workbench/extensions/agent/stores/agent/agentConsentStore.test.ts @@ -1,10 +1,9 @@ vi.mock(import('firebase/auth')) -vi.mock(import('vuefire'), () => ({ useFirebaseAuth: vi.fn() })) -import { computed, ref } from 'vue' import type { GlobalSetting } from '@comfyorg/ingest-types' import { useAuthStore } from '@/stores/authStore' import { useTeamWorkspaceStore } from '@/platform/workspace/stores/teamWorkspaceStore' import { beforeEach, describe, expect, it, vi } from 'vitest' +import { computed, ref } from 'vue' import { useCurrentUser } from '@/composables/auth/useCurrentUser' import { useAgentConsentStore } from './agentConsentStore'