fix(recommend): 更正筛选按钮所属页面

This commit is contained in:
Zhou Weidong committed 2026-10-22 21:05:51 +08:00
1 parent bf20e44b85
commit 13d70fcef2
10 files changed
+124 -107

No files matched your search

@@ -25,7 +25,6 @@ void main() {
body: AllDramasFilterGrid(
feedController: controller,
onOpenDrama: (_) {},
onOpenFilter: () {},
),
),
),
+2 -33
View File
@@ -309,7 +309,7 @@ void main() {
}
expect(
tester.getSize(find.byKey(const Key('all-filter-row-3'))).height,
AppDimens.allDramasFilterButton,
AppDimens.filterChipHeight,
);
expect(
tester.getRect(find.byKey(const Key('all-dramas-scroll'))).top -
@@ -437,38 +437,7 @@ void main() {
(chipContainer.decoration! as BoxDecoration).borderRadius,
BorderRadius.circular(AppDimens.filterChipRadius),
);
final filterButton = find.byKey(const Key('all-dramas-filter-page'));
expect(
find.descendant(
of: find.byKey(const Key('all-filter-scroll-3')),
matching: filterButton,
),
findsNothing,
);
expect(
tester.getSize(filterButton),
const Size.square(AppDimens.allDramasFilterButton),
);
expect(
tester.getRect(filterButton).right,
closeTo(
tester.getRect(find.byKey(const Key('all-filter-row-3'))).right,
0.1,
),
);
final filterMaterial = tester.widget<Material>(
find.byKey(const Key('all-dramas-filter-page-button')),
);
expect(filterMaterial.color, AppColors.filterMenuButton);
expect(filterMaterial.shape, const CircleBorder());
final filterIcon = tester.widget<Icon>(
find.descendant(
of: filterButton,
matching: find.byIcon(Icons.filter_list_rounded),
),
);
expect(filterIcon.size, AppDimens.allDramasFilterIcon);
expect(filterIcon.color, AppColors.filterMenuIcon);
expect(find.byKey(const Key('all-dramas-filter-page')), findsNothing);
await tester.tap(find.byKey(const Key('recommend-tab-playlist')));
await tester.pumpAndSettle();