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.

test(ui): keep the layer tree harness out of the tree's scroll geometry

Josh Corbett835a76de4270
diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersTree.browser.test.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersTree.browser.test.tsx
index 45a9029ce8..16910de6b5 100644
--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersTree.browser.test.tsx
+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersTree.browser.test.tsx
@@ -71,7 +71,10 @@ vi.mock('./LayerStackHeader', () => ({
}));
vi.mock('./LayerSurfaceHost', () => ({
LayerSurfaceHost: ({ surface }: { surface: { kind: string; id?: string; child?: { key: string } } | null }) => (
- <output data-testid="surface">{surface ? `${surface.kind}:${surface.child?.key ?? surface.id}` : 'none'}</output>
+ // Hidden like the harness outputs so the tree's scroll geometry doesn't depend on this stand-in's line height.
+ <output data-testid="surface" style={{ display: 'none' }}>
+ {surface ? `${surface.kind}:${surface.child?.key ?? surface.id}` : 'none'}
+ </output>
),
}));