Render overnight blocks across midnight in the day view

This commit is contained in:
NeilClack
2026-09-11 18:24:54 -05:00
parent 177b7bb13a
commit 46d7cf66b8
3 changed files with 66 additions and 24 deletions
@@ -74,6 +74,12 @@ describe('BlockModal', () => {
await expect.element(page.getByText('Peace')).toBeInTheDocument();
});
it('marks an overnight block in the review', async () => {
mount({ initialStartMinutes: 21 * 60, initialEndMinutes: 9 * 60 });
await expect.element(page.getByText('9:00 PM – 9:00 AM (next day)')).toBeInTheDocument();
});
it('rejects an overlapping time range with the specific error', async () => {
mount({
existingBlocks: [{ id: 'b1', startMinutes: 6 * 60, endMinutes: 8 * 60 }],