mirror of
https://github.com/Dvorinka/1356.git
synced 2026-06-05 04:22:55 +00:00
feat: Complete Phase 1 - Full Flutter app implementation with comprehensive features
Version: 1.1.0 Major changes: - Implemented complete Flutter app structure with all core features - Added comprehensive UI screens for auth, countdown, goals, profile, settings, and social features - Integrated Supabase backend with authentication and data repositories - Added offline support with Hive caching and local storage - Implemented comprehensive routing with go_router - Added location services with Google Maps integration - Implemented notifications and home widget support - Added voice recording capabilities and AI chat features - Created comprehensive test suite and documentation - Added Android and iOS platform configurations - Implemented achievements system and social features - Added calendar integration and bucket list functionality This represents a complete Phase 1 milestone with 3,775 additions across 31 files.
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
// ignore_for_file: unnecessary_const
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:lifetimer/features/settings/presentation/about_challenge_screen.dart';
|
||||
|
||||
void main() {
|
||||
group('AboutChallengeScreen Widget', () {
|
||||
testWidgets('should display about challenge title',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: AboutChallengeScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('About the 1356-Day Challenge'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display challenge description',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: AboutChallengeScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.textContaining('1356'), findsOneWidget);
|
||||
expect(find.textContaining('days'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display bucket list explanation',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: AboutChallengeScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.textContaining('bucket list'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display countdown rules', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: AboutChallengeScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.textContaining('cannot be paused'), findsOneWidget);
|
||||
expect(find.textContaining('cannot be reset'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display motivation section', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: AboutChallengeScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.textContaining('Make every day count'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display close button', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: AboutChallengeScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Close'), findsOneWidget);
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
// ignore_for_file: unnecessary_const
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:lifetimer/features/settings/presentation/notification_settings_screen.dart';
|
||||
|
||||
void main() {
|
||||
group('NotificationSettingsScreen Widget', () {
|
||||
testWidgets('should display notification settings title',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: NotificationSettingsScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Notification Settings'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display daily reminder option',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: NotificationSettingsScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Daily Reminder'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display weekly reminder option',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: NotificationSettingsScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Weekly Reminder'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display milestone notifications option',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: NotificationSettingsScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Milestone Notifications'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display countdown checkpoint notifications',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: NotificationSettingsScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Countdown Checkpoints'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display toggle switches', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: NotificationSettingsScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.byType(Switch), findsWidgets);
|
||||
});
|
||||
|
||||
testWidgets('should display save button', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: NotificationSettingsScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Save'), findsOneWidget);
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
// ignore_for_file: unnecessary_const
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:lifetimer/features/settings/presentation/privacy_settings_screen.dart';
|
||||
|
||||
void main() {
|
||||
group('PrivacySettingsScreen Widget', () {
|
||||
testWidgets('should display privacy settings title',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: PrivacySettingsScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Privacy Settings'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display profile visibility toggle',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: PrivacySettingsScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Public Profile'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display visibility description',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: PrivacySettingsScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.textContaining('Make your profile visible'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display private profile description',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: PrivacySettingsScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.textContaining('Only you can see'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display public profile description',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: PrivacySettingsScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.textContaining('Others can see'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display visibility toggle switch',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: PrivacySettingsScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.byType(Switch), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display save button', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: PrivacySettingsScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Save'), findsOneWidget);
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
// ignore_for_file: unnecessary_const
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:lifetimer/features/settings/presentation/settings_home_screen.dart';
|
||||
|
||||
void main() {
|
||||
group('SettingsHomeScreen Widget', () {
|
||||
testWidgets('should display settings title', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: SettingsHomeScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Settings'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display account section', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: SettingsHomeScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Account'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display preferences section',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: SettingsHomeScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Preferences'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display privacy section', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: SettingsHomeScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Privacy'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display about section', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: SettingsHomeScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('About'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display account settings option',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: SettingsHomeScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Account Settings'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display notification settings option',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: SettingsHomeScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Notifications'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display privacy settings option',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: SettingsHomeScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Privacy Settings'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should display about challenge option',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const ProviderScope(
|
||||
child: const MaterialApp(
|
||||
home: SettingsHomeScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('About the Challenge'), findsOneWidget);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user