diff --git a/dor-tools-builtin/package.json b/dor-tools-builtin/package.json index a9229b819..a5b206c24 100644 --- a/dor-tools-builtin/package.json +++ b/dor-tools-builtin/package.json @@ -37,7 +37,7 @@ "@types/react": "^19.3.0", "@types/react-dom": "^19.3.0", "esbuild": "^0.28.2", - "jsdom": "^30.0.0", + "jsdom": "^31.0.0", "typescript": "^7.0.0" } } diff --git a/hosted/package.json b/hosted/package.json index f9b0e3d12..7b39d5160 100644 --- a/hosted/package.json +++ b/hosted/package.json @@ -50,7 +50,7 @@ "@types/react-dom": "^19.3.0", "@vitejs/plugin-react": "^6.0.2", "esbuild": "^0.28.2", - "jsdom": "^30.0.0", + "jsdom": "^31.0.0", "miniflare": "5.20261113.0-beta", "node-pg-migrate": "^9.0.0", "storybook": "11.0.0-beta.3", diff --git a/lib/package.json b/lib/package.json index fb82ee8a0..3e70adc88 100644 --- a/lib/package.json +++ b/lib/package.json @@ -59,7 +59,7 @@ "@vitest/browser": "^5.0.0", "@vitest/browser-playwright": "^5.0.0", "fake-indexeddb": "^6.2.5", - "jsdom": "^30.0.0", + "jsdom": "^31.0.0", "playwright": "^1.63.0", "playwright-core": "^1.63.0", "remark-gfm": "^4.0.1", diff --git a/lib/src/components/Wall.test.tsx b/lib/src/components/Wall.test.tsx index 36f8cfead..dcea0bff7 100644 --- a/lib/src/components/Wall.test.tsx +++ b/lib/src/components/Wall.test.tsx @@ -266,6 +266,10 @@ describe('Wall on the Lath engine', () => { expect(container.querySelector('[data-terminal-context]')).toBeNull(); } finally { window.matchMedia = originalMatchMedia; + // Closing the focused menu made jsdom start its rendering interval on the + // fake clock; run one frame so it settles, or it strands every later + // requestAnimationFrame in this file. + await act(async () => vi.advanceTimersByTime(20)); vi.useRealTimers(); } }); diff --git a/lib/src/components/wall/SelectionRing.test.tsx b/lib/src/components/wall/SelectionRing.test.tsx index 00f61f935..3783f3294 100644 --- a/lib/src/components/wall/SelectionRing.test.tsx +++ b/lib/src/components/wall/SelectionRing.test.tsx @@ -51,7 +51,7 @@ it('renders the smear transform origin without a React DOM-property warning', as const corners = [...container.querySelectorAll('[data-piece]')] .filter((el) => isRingCorner(el.dataset.piece as RingPiece)); expect(corners).toHaveLength(4); - expect(corners.map((el) => el.style.transformOrigin)).toEqual(['0 0', '0 0', '0 0', '0 0']); + expect(corners.map((el) => el.style.transformOrigin)).toEqual(['0px 0px', '0px 0px', '0px 0px', '0px 0px']); await act(async () => root.unmount()); container.remove(); diff --git a/lib/src/components/wall/SurfacePaneHeader.test.tsx b/lib/src/components/wall/SurfacePaneHeader.test.tsx index c35990bee..22cd92af8 100644 --- a/lib/src/components/wall/SurfacePaneHeader.test.tsx +++ b/lib/src/components/wall/SurfacePaneHeader.test.tsx @@ -223,7 +223,7 @@ describe('SurfacePaneHeader — browser chrome', () => { openPopup(); expect(popup()!.style.top).toBe('208px'); expect(popup()!.style.left).toBe('12px'); - expect(popup()!.style.maxWidth).toBe('calc(100vw - 24px)'); + expect(popup()!.style.maxWidth).toBe('calc(-24px + 100vw)'); act(() => inPopup('[role="button"]')!.click()); const input = inPopup('input')!; expect(document.activeElement).toBe(input); diff --git a/lib/src/components/wall/TerminalContext.test.tsx b/lib/src/components/wall/TerminalContext.test.tsx index 6d6663e1d..1ce50b8f0 100644 --- a/lib/src/components/wall/TerminalContext.test.tsx +++ b/lib/src/components/wall/TerminalContext.test.tsx @@ -36,7 +36,11 @@ beforeEach(() => { onClose: vi.fn(), onCopyId: vi.fn(), onCopyPath: vi.fn(), onExplore: vi.fn(), onWatch: vi.fn(), onTodo: vi.fn(), onPort: vi.fn(), onReset: vi.fn(async () => {}), onPromote: vi.fn(async () => {}), children: