Result preparation refactoring done
This commit is contained in:
@@ -6,28 +6,28 @@ import { Decision } from '../hooks/useSession';
|
||||
describe('ResultsDisplay Refactor', () => {
|
||||
it('should render all categories correctly', () => {
|
||||
const decision: Decision = {
|
||||
goTo: ['Pizza'],
|
||||
alsoGood: ['Pasta'],
|
||||
considerable: ['Burgers'],
|
||||
noGoes: ['Salad'],
|
||||
needsDiscussion: ['Tacos'],
|
||||
goTo: 'Everyone wants Pizza.',
|
||||
alsoGood: 'Many people are okay with Pasta.',
|
||||
considerable: 'Burgers are an option for some.',
|
||||
noGoes: 'No one wants Salad.',
|
||||
needsDiscussion: 'There is a conflict regarding Tacos.',
|
||||
};
|
||||
|
||||
render(<ResultsDisplay decision={decision} />);
|
||||
|
||||
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('Pasta')).toBeInTheDocument();
|
||||
expect(screen.getByText('Many people are okay with Pasta.')).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('Salad')).toBeInTheDocument();
|
||||
expect(screen.getByText('No one wants Salad.')).toBeInTheDocument();
|
||||
|
||||
expect(screen.getByText('Needs discussion')).toBeInTheDocument();
|
||||
expect(screen.getByText('Tacos')).toBeInTheDocument();
|
||||
expect(screen.getByText('There is a conflict regarding Tacos.')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user