mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-06 16:34:36 +00:00
* feat(app): add persistent workspace side panes Keep the common review and file-browsing workflow beside the active agent without tearing down pane contents. Workspace tabs now share one compact chip language, assistant file links route into the retained right pane, and diff/file trees share stable geometry. * fix(app): localize pull request empty state * test(app): update explorer pane coverage * fix(app): preserve explorer pane workflows * test(app): make explorer tab selection idempotent * fix(app): persist workspace review pins * fix(app): preserve sidebar scrim drag hook * fix(app): restore companion pane interactions * test(app): follow selected sidebar surface
32 lines
1005 B
TypeScript
32 lines
1005 B
TypeScript
import { describe, expect, it, vi } from "vitest";
|
|
import { startResizeHandleDrag } from "@/components/resize-handle-drag";
|
|
|
|
describe("startResizeHandleDrag", () => {
|
|
it("previews pointer frames and commits only the final size", () => {
|
|
const preview = vi.fn();
|
|
const commit = vi.fn();
|
|
const drag = startResizeHandleDrag({
|
|
sizes: [0.5, 0.5],
|
|
index: 0,
|
|
preview,
|
|
commit,
|
|
});
|
|
|
|
drag.move(0.05);
|
|
drag.move(0.1);
|
|
|
|
expect(preview).toHaveBeenCalledTimes(2);
|
|
expect(preview.mock.calls[0]?.[0][0]).toBeCloseTo(0.55, 10);
|
|
expect(preview.mock.calls[0]?.[0][1]).toBeCloseTo(0.45, 10);
|
|
expect(preview.mock.calls[1]?.[0][0]).toBeCloseTo(0.6, 10);
|
|
expect(preview.mock.calls[1]?.[0][1]).toBeCloseTo(0.4, 10);
|
|
expect(commit).not.toHaveBeenCalled();
|
|
|
|
drag.finish();
|
|
|
|
expect(commit).toHaveBeenCalledOnce();
|
|
expect(commit.mock.calls[0]?.[0][0]).toBeCloseTo(0.6, 10);
|
|
expect(commit.mock.calls[0]?.[0][1]).toBeCloseTo(0.4, 10);
|
|
});
|
|
});
|