feat(planner): replace Variationskonflikt with red delta badge
Shows the actual score delta (e.g. "↓ -1.5 Punkte") in red instead of a generic ⚠ Variationskonflikt label, letting users compare the cost of each recipe to make an informed swap decision. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -47,11 +47,12 @@ describe('RecipePicker', () => {
|
||||
expect(badge.getAttribute('data-type')).toBe('good');
|
||||
});
|
||||
|
||||
it('shows yellow badge when hasConflict is true', () => {
|
||||
it('shows red delta badge when hasConflict is true', () => {
|
||||
render(RecipePicker, { props: baseProps });
|
||||
// Hähnchen-Curry: hasConflict = true → yellow badge
|
||||
// Hähnchen-Curry: hasConflict = true, scoreDelta = -1.5 → red badge with delta
|
||||
const badge = screen.getByTestId('badge-s2');
|
||||
expect(badge.getAttribute('data-type')).toBe('warning');
|
||||
expect(badge.getAttribute('data-type')).toBe('bad');
|
||||
expect(badge.textContent).toContain('-1.5');
|
||||
});
|
||||
|
||||
it('shows Alle Rezepte section', () => {
|
||||
|
||||
Reference in New Issue
Block a user