feat(listings): 판정 도구 탭(안전마진 체커+예산 계산기, disclaimer) + 스모크

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UHXzpsZQxKG9hQmNRfZjRS
This commit is contained in:
2026-07-09 16:11:39 +09:00
parent ffd306859f
commit 9fc023da9d
2 changed files with 178 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { render, screen } from '@testing-library/react';
vi.mock('../../../api', () => ({ safetyCheck: vi.fn(), budgetCalc: vi.fn() }));
import ToolsTab from './ToolsTab.jsx';
beforeEach(() => vi.clearAllMocks());
describe('ToolsTab', () => {
it('안전마진·예산 카드 헤딩과 disclaimer 안내를 렌더', () => {
render(<ToolsTab />);
expect(screen.getByText('안전마진 체커')).toBeInTheDocument();
expect(screen.getByText('예산 계산기')).toBeInTheDocument();
// 제출 버튼 존재
expect(screen.getAllByRole('button', { name: /판정|계산/ }).length).toBeGreaterThan(0);
});
});