28 lines · 1.0 KB · TypeScript
RawDownload
import { ApprovalRequestId } from "@t3tools/contracts";import { renderToStaticMarkup } from "react-dom/server";import { describe, expect, it } from "vite-plus/test"; import { ComposerPendingApprovalPanel } from "./ComposerPendingApprovalPanel"; describe("ComposerPendingApprovalPanel", () => {  it("renders complete multiline command details without hover or truncation", () => {    const detail = `bun run release -- ${"long-argument ".repeat(20)}\nsecond line`;    const markup = renderToStaticMarkup(      <ComposerPendingApprovalPanel        approval={{          requestId: ApprovalRequestId.make("approval-1"),          requestKind: "command",          createdAt: "2026-07-18T00:00:00.000Z",          detail,        }}        pendingCount={1}      />,    );     expect(markup).toContain('data-approval-detail="complete"');    expect(markup).toContain('aria-label="Command"');    expect(markup).toContain(detail);    expect(markup).not.toContain("truncate");    expect(markup).not.toContain("line-clamp");  });});

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t