fix: make presentation workflow graph readable

This commit is contained in:
lda
2026-07-10 02:36:53 +07:00 Verified
parent b33e37b732
commit edc5422351
9 changed files with 391 additions and 193 deletions
+29
View File
@@ -1 +1,30 @@
import "@testing-library/jest-dom/vitest";
class TestResizeObserver {
observe() {}
unobserve() {}
disconnect() {}
}
// React Flow measures nodes through browser layout APIs. JSDOM does not provide
// these APIs, so tests install stable no-op versions and assert our projected
// graph state rather than actual browser layout.
if (!globalThis.ResizeObserver) {
globalThis.ResizeObserver = TestResizeObserver as unknown as typeof ResizeObserver;
}
if (!globalThis.DOMRect) {
globalThis.DOMRect = {
fromRect: () => ({
x: 0,
y: 0,
width: 0,
height: 0,
top: 0,
right: 0,
bottom: 0,
left: 0,
toJSON() {},
}),
} as unknown as typeof DOMRect;
}