forked from eatvio/eatvio_app
feat: implement recipe drafting functionality and refactor MyRecipesTab to be stateless
This commit is contained in:
@@ -7,7 +7,7 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
group('MyRecipesTab smoke', () {
|
||||
Widget wrap(Widget child) {
|
||||
Widget wrap() {
|
||||
return MaterialApp(
|
||||
theme: ThemeHelper().themeData(),
|
||||
localizationsDelegates: const [
|
||||
@@ -17,12 +17,17 @@ void main() {
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
],
|
||||
supportedLocales: const [Locale('ru')],
|
||||
home: Scaffold(body: child),
|
||||
home: Material(
|
||||
child: MyRecipesTab(
|
||||
selectedIndex: 0,
|
||||
onTabChanged: (_) {},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
testWidgets('renders my recipes tab', (tester) async {
|
||||
await tester.pumpWidget(wrap(const MyRecipesTab()));
|
||||
await tester.pumpWidget(wrap());
|
||||
await tester.pump();
|
||||
|
||||
expect(find.byType(MyRecipesTab), findsOneWidget);
|
||||
|
||||
Reference in New Issue
Block a user