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:
17
src/pages/listings/components/ToolsTab.test.jsx
Normal file
17
src/pages/listings/components/ToolsTab.test.jsx
Normal 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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user