feat(planner): desktop redesign — flip tiles, full-width grid, no right panel #54
@@ -161,6 +161,15 @@ describe('DesktopDayTile — filled slot', () => {
|
||||
expect(screen.getByRole('button', { name: /Entfernen/i })).toBeTruthy();
|
||||
});
|
||||
|
||||
it('hides Entfernen button when slot.id is null (optimistic slot)', () => {
|
||||
const slotWithoutId = { ...filledSlot, id: null };
|
||||
render(DesktopDayTile, { props: { slot: slotWithoutId, isToday: false, activeSlotId: null, isPlanner: true, slotMap: {}, suggestions: [] } });
|
||||
// flip the tile first so back face is visible
|
||||
// activeSlotId must match slot.id to flip — but slot.id is null, so isFlipped = false
|
||||
// The back face is still rendered in the DOM; check button is absent
|
||||
expect(screen.queryByRole('button', { name: /Entfernen/i })).toBeNull();
|
||||
});
|
||||
|
||||
it('calls onremove when Entfernen clicked', async () => {
|
||||
const onremove = vi.fn();
|
||||
const user = userEvent.setup();
|
||||
|
||||
Reference in New Issue
Block a user