Planner: Calendar and Tasks in one menu entry, due tasks shown on the calendar; menu, More sheet and Home tiles grouped by kind
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b305ccac51
commit
8d38584d37
11 files changed
+105
-36
No files matched your search
@@ -36,6 +36,15 @@ const wait = ms => new Promise(r => setTimeout(r, ms));
|
||||
ok('a missing parent is refused', r.status === 400, r);
|
||||
r = await call('/api/tasks/delete', { list: L, id: rep.id });
|
||||
ts = await list(); ok('deleting the parent deletes its subtasks', !ts.some(t => t.id === rep.id || t.id === sub.id), ts);
|
||||
// tasks due in a date range, for the calendar
|
||||
await call('/api/tasks', { list: L, fields: { title: 'Due soon', notes: '', due: plus(2), done: false, repeat: 'weekly' } });
|
||||
await call('/api/tasks', { list: L, fields: { title: 'Due later', notes: '', due: plus(40), done: false } });
|
||||
await call('/api/tasks', { list: L, fields: { title: 'Done already', notes: '', due: plus(2), done: true } });
|
||||
ts = await list(); const soonT = ts.find(t => t.title === 'Due soon');
|
||||
await call('/api/tasks', { list: L, fields: { title: 'A subtask', notes: '', due: plus(2), done: false, parent: soonT.id } });
|
||||
r = await call(`/api/tasks/due?from=${plus(0)}&to=${plus(7)}`);
|
||||
ok('the calendar gets open tasks due in the range (not done ones, subtasks or other dates)', r.status === 200 && r.json.length === 1 && r.json[0].title === 'Due soon' && r.json[0].repeat === 'weekly' && r.json[0].listName, r.json);
|
||||
r = await call('/api/tasks/due?from=bad&to=worse'); ok('a bad date range is refused', r.status === 400, r.status);
|
||||
ok('the server is still running', child.exitCode === null);
|
||||
child.kill(); fs.rmSync(dir, { recursive: true, force: true });
|
||||
console.log(failed ? `\n${failed} check(s) failed` : '\nAll task checks passed'); process.exit(failed ? 1 : 0);
|
||||
|
||||
Reference in new issue
Block a user