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(layers): assert per-pointer-target dedup instead of global uniqueness
Josh Corbett9e935699439b
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.tsxindex 87fa87150d..2fda333017 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@@ -603,15 +603,12 @@ describe('LayersTree selection, surfaces and structure', () => {}expect(stillFrames).toBe(10);expect(scroller.scrollTop).toBe(settled);- // "Once per target": how many rows scrolled under the pointer depends on- // timing, so assert dedup, not a count — every check was for a distinct- // drop target, never a repeat for the target already under the pointer.- // Holds because the edge only recomputes on dragMove/over transitions;- // (row N, below) and (row N+1, above) map to the same command, so an- // edge recompute per scroll tick would break this.+ // "Once per target": a starved rAF can flap the target back to a row+ // already checked, so assert no re-check for the target still under the+ // pointer — the memoized check's contract — not global uniqueness.const checked = refusalChecks.mock.calls.map(([command]) => JSON.stringify(command));await act(() => pointer('pointerup', document, start.x, rect.top + rect.height / 2));- expect(new Set(checked).size).toBe(checked.length);+ expect(checked.filter((command, index) => command === checked[index - 1])).toEqual([]);});it('reorders with a pointer drag and reparents from the keyboard', async () => {