Files
fusion/packages/dashboard/app/components/__tests__/AgentLogViewer.test-helpers.ts
gsxdsm e48f80b764 FN-7028: split AgentLogViewer tests by concern
Split the large AgentLogViewer suite into focused, line-count-friendly test files.

- Move header, layout, markdown, and rendering coverage into separate test modules.
- Add a shared AgentLogViewer test helper for reusable setup.
- Remove the oversized combined AgentLogViewer test and update the line-count baseline.

Files changed:
 .../__tests__/AgentLogViewer.header.test.tsx       |  490 +++++
 .../__tests__/AgentLogViewer.layout.test.tsx       |  367 ++++
 .../__tests__/AgentLogViewer.markdown.test.tsx     |  797 ++++++++
 .../__tests__/AgentLogViewer.rendering.test.tsx    |  410 ++++
 .../__tests__/AgentLogViewer.test-helpers.ts       |   16 +
 .../components/__tests__/AgentLogViewer.test.tsx   | 2010 --------------------
 scripts/line-count-baseline.json                   |    1 -
 7 files changed, 2080 insertions(+), 2011 deletions(-)

Fusion-Task-Id: FN-7028

Fusion-Task-Lineage: 5ef134c7-0969-4b9b-908c-9713daa9d0d2
2026-06-25 19:51:21 -07:00

17 lines
619 B
TypeScript

// FNXC:DashboardTests 2026-06-25-19:31: Shared fixtures for AgentLogViewer.*.test.tsx — split from AgentLogViewer.test.tsx to drop under the 2000-line guard (FN-7028, see FN-7013).
import type { AgentLogEntry } from "@fusion/core";
export function makeEntry(overrides: Partial<AgentLogEntry> = {}): AgentLogEntry {
return {
timestamp: "2026-01-01T00:00:00Z",
taskId: "FN-001",
text: "Hello world",
type: "text",
...overrides,
};
}
export function getScrollContainer(container: HTMLElement): HTMLDivElement {
return container.querySelector(".agent-log-viewer-scroll") as HTMLDivElement;
}