Result preparation refactoring done

This commit is contained in:
AG
2025-10-11 17:48:07 +03:00
parent 641caf74eb
commit 16abfe632b

View File

@@ -6,28 +6,28 @@ import { Decision } from '../hooks/useSession';
describe('ResultsDisplay Refactor', () => { describe('ResultsDisplay Refactor', () => {
it('should render all categories correctly', () => { it('should render all categories correctly', () => {
const decision: Decision = { const decision: Decision = {
goTo: ['Pizza'], goTo: 'Everyone wants Pizza.',
alsoGood: ['Pasta'], alsoGood: 'Many people are okay with Pasta.',
considerable: ['Burgers'], considerable: 'Burgers are an option for some.',
noGoes: ['Salad'], noGoes: 'No one wants Salad.',
needsDiscussion: ['Tacos'], needsDiscussion: 'There is a conflict regarding Tacos.',
}; };
render(<ResultsDisplay decision={decision} />); render(<ResultsDisplay decision={decision} />);
expect(screen.getByText('Go-to')).toBeInTheDocument(); expect(screen.getByText('Go-to')).toBeInTheDocument();
expect(screen.getByText('Pizza')).toBeInTheDocument(); expect(screen.getByText('Everyone wants Pizza.')).toBeInTheDocument();
expect(screen.getByText('Also good')).toBeInTheDocument(); expect(screen.getByText('Also good')).toBeInTheDocument();
expect(screen.getByText('Pasta')).toBeInTheDocument(); expect(screen.getByText('Many people are okay with Pasta.')).toBeInTheDocument();
expect(screen.getByText('Considerable')).toBeInTheDocument(); expect(screen.getByText('Considerable')).toBeInTheDocument();
expect(screen.getByText('Burgers')).toBeInTheDocument(); expect(screen.getByText('Burgers are an option for some.')).toBeInTheDocument();
expect(screen.getByText('No-goes')).toBeInTheDocument(); expect(screen.getByText('No-goes')).toBeInTheDocument();
expect(screen.getByText('Salad')).toBeInTheDocument(); expect(screen.getByText('No one wants Salad.')).toBeInTheDocument();
expect(screen.getByText('Needs discussion')).toBeInTheDocument(); expect(screen.getByText('Needs discussion')).toBeInTheDocument();
expect(screen.getByText('Tacos')).toBeInTheDocument(); expect(screen.getByText('There is a conflict regarding Tacos.')).toBeInTheDocument();
}); });
}); });