2024-01-10 14:36:14 +01:00
|
|
|
import 'package:flutter/material.dart';
|
2024-01-10 14:36:24 +01:00
|
|
|
import 'package:flutter/scheduler.dart';
|
2024-01-10 14:36:14 +01:00
|
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
|
|
|
|
import 'package:pong/main.dart';
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
testWidgets('Tests "Berühren um zu beginnen!"', (WidgetTester tester) async {
|
|
|
|
final tapToStart = find.text("Berühren um zu beginnen!");
|
|
|
|
|
|
|
|
await tester.pumpWidget(const MaterialApp(home: StartScreen()));
|
|
|
|
|
|
|
|
expect(tapToStart, findsOneWidget);
|
|
|
|
});
|
|
|
|
|
2024-01-10 14:36:24 +01:00
|
|
|
testWidgets('Tests "Punkte:"', (WidgetTester tester) async {
|
|
|
|
final points = find.text("Punkte: 0");
|
2024-01-10 14:36:14 +01:00
|
|
|
|
2024-01-10 14:36:24 +01:00
|
|
|
await tester.pumpWidget(const MaterialApp(home: GameScreen()));
|
|
|
|
|
|
|
|
expect(points, findsOneWidget);
|
2024-01-10 14:36:14 +01:00
|
|
|
});
|
|
|
|
}
|