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.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
test(workbench): cover palette lazy import
Josh Corbett2027110a1d07
diff --git a/invokeai/frontend/webv2/src/workbench/palette/WorkbenchCommandPalette.lazy.browser.test.ts b/invokeai/frontend/webv2/src/workbench/palette/WorkbenchCommandPalette.lazy.browser.test.tsnew file mode 100644index 0000000000..7268e22db3--- /dev/null+++ b/invokeai/frontend/webv2/src/workbench/palette/WorkbenchCommandPalette.lazy.browser.test.ts@@ -0,0 +1,11 @@+import { describe, expect, it } from 'vitest';++import { loadWorkbenchCommandPaletteDialog } from './WorkbenchCommandPalette';++describe('Workbench command-palette lazy boundary', () => {+ it('loads the real workbench dialog module in the browser', async () => {+ const module = await loadWorkbenchCommandPaletteDialog();++ expect(module.default).toEqual(expect.any(Function));+ });+});diff --git a/invokeai/frontend/webv2/src/workbench/palette/WorkbenchCommandPalette.tsx b/invokeai/frontend/webv2/src/workbench/palette/WorkbenchCommandPalette.tsxindex 49460400ad..9225cc3eab 100644--- a/invokeai/frontend/webv2/src/workbench/palette/WorkbenchCommandPalette.tsx+++ b/invokeai/frontend/webv2/src/workbench/palette/WorkbenchCommandPalette.tsx@@ -11,7 +11,9 @@ import { lazy, Suspense } from 'react';import { closeCommandPalette, useIsCommandPaletteOpen } from './paletteStore';import { SETTINGS_ENTRY_DEPS } from './settingsEntryDeps';-const LazyWorkbenchCommandPaletteDialog = lazy(() => import('./WorkbenchCommandPaletteDialog'));+export const loadWorkbenchCommandPaletteDialog = () => import('./WorkbenchCommandPaletteDialog');++const LazyWorkbenchCommandPaletteDialog = lazy(loadWorkbenchCommandPaletteDialog);/** Lightweight route host; the palette implementation is loaded only while open. */export const WorkbenchCommandPalette = () => {