major refactor
Some checks failed
Release / meta (push) Successful in 9s
Release / android-build (push) Failing after 4m3s
Release / linux-build (push) Successful in 5m38s
Release / release-dev (push) Has been skipped
Release / release-master (push) Has been skipped

This commit is contained in:
2025-12-17 16:32:53 +00:00
parent 1239a9dc85
commit 334d6e3e18
29 changed files with 3614 additions and 3501 deletions

View File

@@ -1,30 +1,18 @@
// 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:mileograph_flutter/main.dart';
import 'package:mileograph_flutter/app.dart';
import 'package:shared_preferences/shared_preferences.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MyApp());
TestWidgetsFlutterBinding.ensureInitialized();
// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
expect(find.text('1'), findsNothing);
setUp(() {
SharedPreferences.setMockInitialValues({});
});
// Tap the '+' icon and trigger a frame.
await tester.tap(find.byIcon(Icons.add));
await tester.pump();
testWidgets('Shows login UI when logged out', (WidgetTester tester) async {
await tester.pumpWidget(const App());
await tester.pump(const Duration(milliseconds: 100));
// Verify that our counter has incremented.
expect(find.text('0'), findsNothing);
expect(find.text('1'), findsOneWidget);
expect(find.text('Login'), findsWidgets);
});
}