This commit is contained in:
2025-09-11 07:45:25 -07:00
parent f443e7a64e
commit 651ce46183
46 changed files with 5063 additions and 164 deletions

View File

@@ -0,0 +1,20 @@
import { render, screen } from '@testing-library/react';
import RulePreview from '../RulePreview';
describe('RulePreview', () => {
const mockRules = {
maxRides: 4,
minRestDays: 1
};
test('renders preview with rules', () => {
render(<RulePreview rules={mockRules} />);
expect(screen.getByText('Rule Configuration Preview')).toBeInTheDocument();
expect(screen.getByText('maxRides')).toBeInTheDocument();
});
test('shows placeholder when no rules', () => {
render(<RulePreview rules={null} />);
expect(screen.getByText('Parsed rules will appear here...')).toBeInTheDocument();
});
});