mirror of
https://github.com/Dvorinka/1356.git
synced 2026-06-04 20:12:56 +00:00
37ffb93923
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.
127 lines
3.1 KiB
Dart
127 lines
3.1 KiB
Dart
// 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/profile/presentation/profile_screen.dart';
|
|
|
|
void main() {
|
|
group('ProfileScreen Widget', () {
|
|
testWidgets('should display profile title', (WidgetTester tester) async {
|
|
await tester.pumpWidget(
|
|
const ProviderScope(
|
|
child: const MaterialApp(
|
|
home: ProfileScreen(),
|
|
),
|
|
),
|
|
);
|
|
|
|
await tester.pumpAndSettle();
|
|
|
|
expect(find.text('Profile'), findsOneWidget);
|
|
});
|
|
|
|
testWidgets('should display user avatar', (WidgetTester tester) async {
|
|
await tester.pumpWidget(
|
|
const ProviderScope(
|
|
child: const MaterialApp(
|
|
home: ProfileScreen(),
|
|
),
|
|
),
|
|
);
|
|
|
|
await tester.pumpAndSettle();
|
|
|
|
expect(find.byType(CircleAvatar), findsOneWidget);
|
|
});
|
|
|
|
testWidgets('should display username', (WidgetTester tester) async {
|
|
await tester.pumpWidget(
|
|
const ProviderScope(
|
|
child: const MaterialApp(
|
|
home: ProfileScreen(),
|
|
),
|
|
),
|
|
);
|
|
|
|
await tester.pumpAndSettle();
|
|
|
|
// Should display username section
|
|
expect(find.textContaining('Username'), findsOneWidget);
|
|
});
|
|
|
|
testWidgets('should display countdown information',
|
|
(WidgetTester tester) async {
|
|
await tester.pumpWidget(
|
|
const ProviderScope(
|
|
child: const MaterialApp(
|
|
home: ProfileScreen(),
|
|
),
|
|
),
|
|
);
|
|
|
|
await tester.pumpAndSettle();
|
|
|
|
expect(find.textContaining('Days Left'), findsOneWidget);
|
|
});
|
|
|
|
testWidgets('should display goals completed stat',
|
|
(WidgetTester tester) async {
|
|
await tester.pumpWidget(
|
|
const ProviderScope(
|
|
child: const MaterialApp(
|
|
home: ProfileScreen(),
|
|
),
|
|
),
|
|
);
|
|
|
|
await tester.pumpAndSettle();
|
|
|
|
expect(find.textContaining('Goals Completed'), findsOneWidget);
|
|
});
|
|
|
|
testWidgets('should display edit profile button',
|
|
(WidgetTester tester) async {
|
|
await tester.pumpWidget(
|
|
const ProviderScope(
|
|
child: const MaterialApp(
|
|
home: ProfileScreen(),
|
|
),
|
|
),
|
|
);
|
|
|
|
await tester.pumpAndSettle();
|
|
|
|
expect(find.text('Edit Profile'), findsOneWidget);
|
|
});
|
|
|
|
testWidgets('should display settings button', (WidgetTester tester) async {
|
|
await tester.pumpWidget(
|
|
const ProviderScope(
|
|
child: const MaterialApp(
|
|
home: ProfileScreen(),
|
|
),
|
|
),
|
|
);
|
|
|
|
await tester.pumpAndSettle();
|
|
|
|
expect(find.text('Settings'), findsOneWidget);
|
|
});
|
|
|
|
testWidgets('should display sign out button', (WidgetTester tester) async {
|
|
await tester.pumpWidget(
|
|
const ProviderScope(
|
|
child: const MaterialApp(
|
|
home: ProfileScreen(),
|
|
),
|
|
),
|
|
);
|
|
|
|
await tester.pumpAndSettle();
|
|
|
|
expect(find.text('Sign Out'), findsOneWidget);
|
|
});
|
|
});
|
|
}
|