Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dor-tools-builtin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
2 changes: 1 addition & 1 deletion hosted/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions lib/src/components/Wall.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
});
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/wall/SelectionRing.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ it('renders the smear transform origin without a React DOM-property warning', as
const corners = [...container.querySelectorAll<SVGPathElement>('[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();
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/wall/SurfacePaneHeader.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 5 additions & 1 deletion lib/src/components/wall/TerminalContext.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: <div data-aux-terminal="aux"><textarea aria-label="Aux terminal input" /></div> };
});
afterEach(() => { act(() => root.unmount()); container.remove(); removeMouseSelectionState('parent'); cfg.layout.animate = previousAnimate; vi.useRealTimers(); });
// jsdom runs focus fixup on an interval it starts on whichever clock is current;
// one started on the fake clock never runs once real timers return, stranding
// every later requestAnimationFrame in this file. So run a frame before
// restoring real timers, and unmount (which can blur a focused control) after.
afterEach(() => { if (vi.isFakeTimers()) act(() => { vi.advanceTimersByTime(20); }); vi.useRealTimers(); act(() => root.unmount()); container.remove(); removeMouseSelectionState('parent'); cfg.layout.animate = previousAnimate; });
const render = () => act(() => root.render(<TerminalContextView {...props} />));
const button = (label: string) => container.querySelector<HTMLButtonElement>(`button[aria-label="${label}"]`)!;
const click = async (label: string) => { await act(async () => button(label).click()); };
Expand Down
3 changes: 2 additions & 1 deletion lib/src/components/wall/WorkspaceSelectionOverlay.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ describe('SelectionRing settled render', () => {
const path = container.querySelector('[data-ring="outline"]') as SVGPathElement;
expect(path.style.animation).toBe('');

const marching = `marching-ants ${cfg.marchingAnts.cycleDuration}s linear infinite`;
// jsdom serializes the shorthand with the name last.
const marching = `${cfg.marchingAnts.cycleDuration}s linear infinite marching-ants`;
await act(async () => root.render(<Harness selectedId="a" mode="command" store={store} panes={panes} />));
expect(container.querySelector('[data-ring="outline"]')).toBe(path);
expect(path.style.animation).toBe(marching);
Expand Down
Loading
Loading