/** * @license * Copyright 2026 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi, afterEach, beforeEach } from 'vitest'; import { renderWithProviders } from '../../test-utils/render.js'; import { Footer } from './Footer.js'; import { createMockSettings } from '../../test-utils/settings.js'; import path from 'node:path'; // Normalize paths to POSIX slashes for stable cross-platform snapshots. const normalizeFrame = (frame: string | undefined) => { if (!frame) return frame; return frame.replace(/\\/g, '/'); }; const mockSessionStats = { sessionId: 'test-session-id', sessionStartTime: new Date(), promptCount: 0, lastPromptTokenCount: 150000, metrics: { files: { totalLinesAdded: 12, totalLinesRemoved: 4, }, tools: { count: 0, totalCalls: 0, totalSuccess: 0, totalFail: 0, totalDurationMs: 0, totalDecisions: { accept: 0, reject: 0, modify: 0, auto_accept: 0, }, byName: {}, latency: { avg: 0, max: 0, min: 0 }, }, models: { 'gemini-pro': { api: { totalRequests: 0, totalErrors: 0, totalLatencyMs: 0, }, tokens: { input: 0, prompt: 0, candidates: 0, total: 1500, cached: 0, thoughts: 0, tool: 0, }, roles: {}, }, }, }, }; const defaultProps = { model: 'gemini-pro', targetDir: '/long/path/to/some/deeply/nested/directories/to/make/it/long', debugMode: false, branchName: 'main', errorCount: 0, }; describe('