parent
83b02eca1a
commit
d409005e4c
|
@ -1,6 +1,8 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
|
import 'package:kochkomplize/main.dart';
|
||||||
import 'package:kochkomplize/menu.dart';
|
import 'package:kochkomplize/menu.dart';
|
||||||
|
import 'package:kochkomplize/recipeformpage.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
||||||
|
@ -86,4 +88,21 @@ void main() {
|
||||||
expect(find.byType(DrawerHeader), findsOneWidget);
|
expect(find.byType(DrawerHeader), findsOneWidget);
|
||||||
expect(find.text('Hauptmenü'), findsOneWidget);
|
expect(find.text('Hauptmenü'), findsOneWidget);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
testWidgets('Recipeformpage has form fields', (WidgetTester tester) async {
|
||||||
|
await tester.pumpWidget(const MaterialApp(home: Recipeformpage()));
|
||||||
|
|
||||||
|
// Prüfen Sie, ob die Formularfelder vorhanden sind
|
||||||
|
expect(find.byType(TextFormField), findsWidgets);
|
||||||
|
// Prüfen Sie den Speichern-Button
|
||||||
|
expect(find.byType(FloatingActionButton), findsOneWidget);
|
||||||
|
});
|
||||||
|
|
||||||
|
testWidgets('MyHomePage renders correctly', (WidgetTester tester) async {
|
||||||
|
await tester.pumpWidget(const MaterialApp(home: MyHomePage(title: 'Kochkomplize')));
|
||||||
|
|
||||||
|
// Überprüfen Sie, ob der Titel korrekt angezeigt wird
|
||||||
|
expect(find.text('Kochkomplize'), findsOneWidget);
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
Loading…
Reference in New Issue