Files
hockeyUmpire/mobile_app/test/widget_test.dart
T
kejaro 4d377c1336 Refactor app to focus on match results instead of tasks
- Introduced MatchRepository and MatchResultsViewModel to handle match data.
- Replaced task-related code with match-related functionality in the app.
- Added match results view and updated navigation to reflect changes.
- Removed task-related models, services, and view models.
- Added JSON data for match results and integrated it into the app.
- Updated tests to validate match results loading and UI behavior.
2026-09-27 19:34:46 +01:00

33 lines
1.1 KiB
Dart

import 'package:flutter_test/flutter_test.dart';
import 'package:mobile_app/app.dart';
void main() {
testWidgets('App smoke test - renders match results, navigates to settings',
(WidgetTester tester) async {
await tester.pumpWidget(const MobileApp());
await tester.pumpAndSettle();
expect(find.text('Match Results'), findsOneWidget);
expect(find.text('Home'), findsWidgets);
expect(find.text('Away'), findsWidgets);
// Switch to Settings tab
final settingsNav = find.text('Settings');
expect(settingsNav, findsWidgets);
await tester.tap(settingsNav.first);
await tester.pumpAndSettle();
// Verify Settings is displayed
expect(find.text('Appearance'), findsOneWidget);
expect(find.text('Supported Platforms'), findsOneWidget);
expect(find.text('Android & iOS (iPhone/iPad)'), findsOneWidget);
// Switch back to Dashboard
final resultsNav = find.text('Results');
await tester.tap(resultsNav.first);
await tester.pumpAndSettle();
expect(find.text('Match Results'), findsOneWidget);
});
}