CPD/test/widget_test.dart

23 lines
654 B
Dart
Raw Normal View History

2024-01-10 14:36:14 +01:00
import 'package:flutter/material.dart';
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);
});
testWidgets('Tests ', (WidgetTester tester) async {
final tapToStart = find.text("Berühren um zu beginnen!");
await tester.pumpWidget(const MaterialApp(home: StartScreen()));
await tester.tap(tapToStart);
await tester.pump();
});
}