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.
This commit is contained in:
1 parent
ffc2051e20
commit
4d377c1336
17 files changed
+500
-658
No files matched your search
@@ -2,15 +2,14 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:mobile_app/app.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('App smoke test - renders dashboard, navigates to settings',
|
||||
testWidgets('App smoke test - renders match results, navigates to settings',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(const MobileApp());
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
// Verify Dashboard is visible
|
||||
expect(find.text('Dashboard'), findsWidgets);
|
||||
expect(find.text('Task Progress'), findsOneWidget);
|
||||
expect(find.text('Add Task'), findsOneWidget);
|
||||
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');
|
||||
@@ -24,10 +23,10 @@ void main() {
|
||||
expect(find.text('Android & iOS (iPhone/iPad)'), findsOneWidget);
|
||||
|
||||
// Switch back to Dashboard
|
||||
final dashboardNav = find.text('Dashboard');
|
||||
await tester.tap(dashboardNav.first);
|
||||
final resultsNav = find.text('Results');
|
||||
await tester.tap(resultsNav.first);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Task Progress'), findsOneWidget);
|
||||
expect(find.text('Match Results'), findsOneWidget);
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user