chore(version): update app version to 1.3.5+85 and improve test coverage reporting in CI

This commit is contained in:
mso7nueh
2025-12-08 11:19:08 +03:00
parent abe4985f0e
commit c2a506cdbf
148 changed files with 12395 additions and 1889 deletions

View File

@@ -0,0 +1,87 @@
import 'package:eatvio_app/core/theme/theme_helper.dart';
import 'package:eatvio_app/features/feed/presentation/widgets/chip_group.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
group('ChipGroup', () {
testWidgets('displays chip group widget', (tester) async {
await tester.pumpWidget(
MaterialApp(
theme: ThemeHelper().themeData(),
home: Scaffold(
body: ChipGroup(
selectedChipIndex: 0,
chipsLabelList: ['All', 'Recipes', 'Diets'],
setSelectedChipIndex: (index) {},
),
),
),
);
expect(find.byType(ChipGroup), findsOneWidget);
});
testWidgets('displays all chips from list', (tester) async {
await tester.pumpWidget(
MaterialApp(
theme: ThemeHelper().themeData(),
home: Scaffold(
body: ChipGroup(
selectedChipIndex: 0,
chipsLabelList: ['All', 'Recipes', 'Diets', 'Plans'],
setSelectedChipIndex: (index) {},
),
),
),
);
expect(find.byType(ChipGroup), findsOneWidget);
expect(find.text('All'), findsOneWidget);
expect(find.text('Recipes'), findsOneWidget);
expect(find.text('Diets'), findsOneWidget);
expect(find.text('Plans'), findsOneWidget);
});
testWidgets('calls setSelectedChipIndex when chip is tapped', (tester) async {
int? selectedIndex;
await tester.pumpWidget(
MaterialApp(
theme: ThemeHelper().themeData(),
home: Scaffold(
body: ChipGroup(
selectedChipIndex: 0,
chipsLabelList: ['All', 'Recipes', 'Diets'],
setSelectedChipIndex: (index) {
selectedIndex = index;
},
),
),
),
);
await tester.tap(find.text('Recipes'));
await tester.pump();
expect(selectedIndex, 1);
});
testWidgets('displays empty chip group when list is empty', (tester) async {
await tester.pumpWidget(
MaterialApp(
theme: ThemeHelper().themeData(),
home: Scaffold(
body: ChipGroup(
selectedChipIndex: 0,
chipsLabelList: [],
setSelectedChipIndex: (index) {},
),
),
),
);
expect(find.byType(ChipGroup), findsOneWidget);
});
});
}