feat: add journey stats and history detail

This commit is contained in:
2026-06-12 01:26:19 +08:00
parent b287a56731
commit eb8b209c0c
10 changed files with 701 additions and 1 deletions
+31
View File
@@ -63,6 +63,37 @@ void main() {
expect(find.text('Import JSON'), findsNothing);
});
testWidgets('Journey opens history detail with empty states', (tester) async {
await pumpFocusSeedApp(tester, locale: const Locale('en'));
await tester.tap(find.text('Journey'));
await tester.pumpAndSettle();
final journeyScroll = find.byType(Scrollable).first;
await tester.scrollUntilVisible(
find.text('This week'),
180,
scrollable: journeyScroll,
);
expect(find.text('This week'), findsOneWidget);
await tester.scrollUntilVisible(
find.text('View history'),
180,
scrollable: journeyScroll,
);
expect(find.text('View history'), findsOneWidget);
await tester.tap(find.text('View history'));
await tester.pumpAndSettle();
expect(find.text('History'), findsOneWidget);
expect(find.text('No focus sessions yet'), findsOneWidget);
await tester.tap(find.text('Notes'));
await tester.pumpAndSettle();
expect(find.text('No notes yet'), findsOneWidget);
});
testWidgets('Today remains usable at narrow width and 200 percent text', (
tester,
) async {