Files
geo_front/test/widget_test.dart
dmit.b 506608c508 Replace paid flutter_background_geolocation with free flutter_foreground_task
Replace proprietary flutter_background_geolocation (requires paid license
for Android release builds) with free flutter_foreground_task package.
Background location tracking now uses foreground service with periodic
geolocation updates every 30 seconds.
2026-06-25 13:24:24 +03:00

30 lines
1.1 KiB
Dart

// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility in the flutter_test package. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:family_safety_frontend/main.dart';
import 'package:family_safety_frontend/services/background_geo_service.dart';
import 'package:family_safety_frontend/services/settings_service.dart';
void main() {
testWidgets('App loads login screen', (WidgetTester tester) async {
final bgGeo = BackgroundGeoService();
await bgGeo.init();
await tester.pumpWidget(MyApp(
settingsService: SettingsService(),
bgGeo: bgGeo,
));
await tester.pump();
expect(find.text('Family Safety'), findsOneWidget);
expect(find.byType(TabBar), findsOneWidget);
expect(find.byType(ElevatedButton), findsOneWidget);
});
}