2026-03-29 22:50:24 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter_test/flutter_test.dart';
|
2026-04-12 20:45:24 +02:00
|
|
|
import 'package:pomodoro_app/main.dart' as app;
|
2026-03-29 22:50:24 +02:00
|
|
|
import 'package:pomodoro_app/main.dart';
|
|
|
|
|
|
|
|
|
|
void main() {
|
2026-04-12 20:45:24 +02:00
|
|
|
testWidgets('main() runs the app', (tester) async {
|
|
|
|
|
app.main();
|
|
|
|
|
await tester.pump();
|
|
|
|
|
expect(find.byType(MaterialApp), findsOneWidget);
|
|
|
|
|
});
|
|
|
|
|
|
2026-03-29 22:50:24 +02:00
|
|
|
testWidgets('PomodoroApp builds and shows MaterialApp', (tester) async {
|
|
|
|
|
await tester.pumpWidget(const PomodoroApp());
|
|
|
|
|
expect(find.byType(MaterialApp), findsOneWidget);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
testWidgets('PomodoroApp uses dark theme', (tester) async {
|
|
|
|
|
await tester.pumpWidget(const PomodoroApp());
|
|
|
|
|
final materialApp = tester.widget<MaterialApp>(find.byType(MaterialApp));
|
|
|
|
|
expect(materialApp.debugShowCheckedModeBanner, false);
|
|
|
|
|
expect(materialApp.title, 'Pomodoro');
|
|
|
|
|
expect(materialApp.theme, isNotNull);
|
|
|
|
|
});
|
|
|
|
|
}
|