mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-21 14:36:31 +00:00
d01d9df93a
The desktop note dialog and the phone note sheet fill their editor with dayNoteDraft and save through writeDayNote, so both trim the title, store an empty detail as null and default the icon the same way. Both count the detail line against one shared limit.
14 lines
557 B
TypeScript
14 lines
557 B
TypeScript
// FE-PLANNER-NOTELIMIT-001: the detail limit both day note editors count against.
|
|
import { describe, expect, it } from 'vitest';
|
|
|
|
import { DAY_NOTE_DETAIL_MAX, dayNoteNearLimit } from './DayPlanSidebar.constants';
|
|
|
|
describe('day note detail limit', () => {
|
|
it('FE-PLANNER-NOTELIMIT-001: the counter warns from a hundred characters before the limit', () => {
|
|
expect(DAY_NOTE_DETAIL_MAX).toBe(2000);
|
|
expect(dayNoteNearLimit(1899)).toBe(false);
|
|
expect(dayNoteNearLimit(1900)).toBe(true);
|
|
expect(dayNoteNearLimit(2000)).toBe(true);
|
|
});
|
|
});
|