mirror of
https://github.com/kuhyx/screen-locker.git
synced 2026-07-04 15:23:02 +02:00
- Add sqflite_common_ffi + very_good_analysis; tighten analysis_options - Add BackupService for JSON export/import of exercise state - Add full test coverage: models, screens, services, widgets - Add scripts/check_flutter_coverage.sh to enforce 100% line coverage - Add docstrings to ExerciseState fields and storage service - Minor fixes across screens, widgets, and sync/HTTP services Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VuiPt6GPWkxpLbJFrnfy8U
27 lines
762 B
Dart
27 lines
762 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:sqflite_common_ffi/sqflite_ffi.dart';
|
|
import 'package:workout_app/main.dart';
|
|
import 'package:workout_app/services/storage_service.dart';
|
|
|
|
void main() {
|
|
setUpAll(() {
|
|
sqfliteFfiInit();
|
|
databaseFactory = databaseFactoryFfi;
|
|
});
|
|
|
|
setUp(() async {
|
|
StorageService.resetForTesting();
|
|
await StorageService.init();
|
|
});
|
|
|
|
testWidgets('WorkoutApp renders HomeScreen', (tester) async {
|
|
await tester.runAsync(() async {
|
|
await tester.pumpWidget(const WorkoutApp());
|
|
await Future<void>.delayed(const Duration(milliseconds: 300));
|
|
});
|
|
await tester.pump();
|
|
expect(find.text('Workout Tracker'), findsOneWidget);
|
|
});
|
|
}
|