feat(todo): Upcoming's tasks dragged onto another day (ADR 0033, D16)
A row of Upcoming, overdue ones too, held and dropped on another day moves there, its time, duration and recurrence kept; Moved to … offers Undo. The tint over a day a drag hovers is laid beside the rows, not around them, which paint on the Material beneath. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
7fe74ed0d5
commit
c83f7c46ff
1 changed files with 173 additions and 15 deletions
|
|
@ -1374,6 +1374,40 @@ void main() {
|
|||
expect(find.byKey(quickAddTitleKey), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('a row of Upcoming held and dropped on another day moves '
|
||||
'there, its time kept, which can be undone', (tester) async {
|
||||
final today = Day.of(DateTime.now());
|
||||
await start(tester, usedBefore: true);
|
||||
await seed(
|
||||
tester,
|
||||
TaskContent(
|
||||
title: 'Water plants',
|
||||
projectId: inbox(),
|
||||
date: TaskDate(today, time: 23 * 60 + 30),
|
||||
),
|
||||
);
|
||||
await goTab(tester, 'Upcoming');
|
||||
final day = find.byTooltip(RegExp('^Add a task on .*Tomorrow'));
|
||||
|
||||
await dragFrom(
|
||||
tester,
|
||||
tester.getCenter(row('Water plants')),
|
||||
tester.getCenter(day) - const Offset(200, 0),
|
||||
);
|
||||
|
||||
expect(
|
||||
(await stored(tester))['Water plants']!.date,
|
||||
TaskDate(today.plus(1), time: 23 * 60 + 30),
|
||||
);
|
||||
expect(find.textContaining('Moved to'), findsOneWidget);
|
||||
await tester.tap(find.text('Undo'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(
|
||||
(await stored(tester))['Water plants']!.date,
|
||||
TaskDate(today, time: 23 * 60 + 30),
|
||||
);
|
||||
});
|
||||
|
||||
testWidgets('the add button dropped on a day in Upcoming adds a task '
|
||||
'for that day', (tester) async {
|
||||
final tomorrow = Day.of(DateTime.now()).plus(1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue