2023-11-21 21:52:39 +01:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
import 'package:kochkomplize/main.dart';
|
2024-01-10 07:20:15 +01:00
|
|
|
import 'package:kochkomplize/recipesoverview.dart';
|
2023-11-21 21:52:39 +01:00
|
|
|
|
|
|
|
void main() {
|
2024-01-10 07:20:15 +01:00
|
|
|
testWidgets('Menu navigation test', (WidgetTester tester) async {
|
2023-11-21 21:52:39 +01:00
|
|
|
await tester.pumpWidget(const MyApp());
|
|
|
|
|
2024-01-10 07:20:15 +01:00
|
|
|
// Öffne das Menü
|
|
|
|
await tester.tap(find.byIcon(Icons.menu));
|
|
|
|
await tester.pumpAndSettle();
|
|
|
|
|
|
|
|
// Wähle einen Menüpunkt
|
|
|
|
await tester.tap(find.text('Meine Rezepte'));
|
|
|
|
await tester.pumpAndSettle();
|
|
|
|
|
|
|
|
// Überprüfe, ob das richtige Widget angezeigt wird
|
|
|
|
expect(find.byType(RecipesOverview), findsOneWidget);
|
|
|
|
});
|
|
|
|
}
|