Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

fix(webv2): keep account lifecycle identity mock in sync with real exports

joshistoastf4bd21cf91ee
diff --git a/invokeai/frontend/webv2/src/app/AccountLifecycleCoordinator.browser.test.tsx b/invokeai/frontend/webv2/src/app/AccountLifecycleCoordinator.browser.test.tsx
index db38acd7f7..495c3f8e8b 100644
--- a/invokeai/frontend/webv2/src/app/AccountLifecycleCoordinator.browser.test.tsx
+++ b/invokeai/frontend/webv2/src/app/AccountLifecycleCoordinator.browser.test.tsx
@@ -73,8 +73,13 @@ const sessionStore = vi.hoisted(() => {
vi.mock('@features/identity', async () => {
const React = await import('react');
+ // Modules outside this test's mock map (reached via other import specifiers)
+ // still bind real identity exports — spread them so the mock only overrides
+ // what the test drives instead of rotting on every new identity export.
+ const actual = await vi.importActual<typeof import('@features/identity')>('@features/identity');
return {
+ ...actual,
AuthSessionUnavailableError: identityErrors.AuthSessionUnavailableError,
AuthUnavailableScreen: ({ onRetry }: { onRetry: () => Promise<void> | void }) => {
unavailableScreen.setRetry(onRetry);