feat: implement recipe drafting functionality and refactor MyRecipesTab to be stateless

This commit is contained in:
mso7nueh
2026-02-16 12:46:55 +03:00
parent 516dfa4158
commit d4f41fe6cf
13 changed files with 388 additions and 153 deletions

View File

@@ -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);