Files
t3code/apps/web/src/components/preview/agentBrowserCursorLogic.test.ts
Julius Marminge dd739c880d Port browser preview annotations to desktop
- Add IPC and runtime plumbing for preview annotation theming
- Generate and ship annotation CSS for the desktop overlay
- Add pointer and artifact handling for browser preview interactions
2026-06-13 22:18:37 -07:00

20 lines
682 B
TypeScript

import { describe, expect, it } from "vite-plus/test";
import { agentBrowserCursorOpacity } from "./agentBrowserCursorLogic";
describe("agentBrowserCursorOpacity", () => {
it("keeps active movement fully visible", () => {
expect(agentBrowserCursorOpacity(true, "agent")).toBe(1);
expect(agentBrowserCursorOpacity(true, "human")).toBe(1);
});
it("settles to a visible idle state", () => {
expect(agentBrowserCursorOpacity(false, "none")).toBe(0.35);
expect(agentBrowserCursorOpacity(false, "agent")).toBe(0.35);
});
it("dims further while the human controls the page", () => {
expect(agentBrowserCursorOpacity(false, "human")).toBe(0.18);
});
});