feat(listings): Listings shell+스타일+라우트 배선 + 청약 교차링크 + 문서
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:
19
src/pages/listings/Listings.test.jsx
Normal file
19
src/pages/listings/Listings.test.jsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import { describe, it, expect, vi } from 'vitest';
|
||||
import { render, screen, fireEvent } from '@testing-library/react';
|
||||
|
||||
vi.mock('./components/ListingsTab.jsx', () => ({ default: () => <div>LISTINGS_TAB</div> }));
|
||||
vi.mock('./components/ToolsTab.jsx', () => ({ default: () => <div>TOOLS_TAB</div> }));
|
||||
vi.mock('./components/CriteriaTab.jsx', () => ({ default: () => <div>CRITERIA_TAB</div> }));
|
||||
vi.mock('react-router-dom', () => ({ Link: ({ children }) => <a>{children}</a> }));
|
||||
import Listings from './Listings.jsx';
|
||||
|
||||
describe('Listings', () => {
|
||||
it('기본 매물 탭 렌더 + 탭 전환', () => {
|
||||
render(<Listings />);
|
||||
expect(screen.getByText('LISTINGS_TAB')).toBeInTheDocument();
|
||||
fireEvent.click(screen.getByRole('button', { name: '판정 도구' }));
|
||||
expect(screen.getByText('TOOLS_TAB')).toBeInTheDocument();
|
||||
fireEvent.click(screen.getByRole('button', { name: '조건' }));
|
||||
expect(screen.getByText('CRITERIA_TAB')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user