feat: 调整播放历史为单列列表

This commit is contained in:
Zhou Weidong committed 2026-10-22 21:18:02 +08:00
1 parent b185200e8c
commit c14d89ffce
8 files changed
+317 -14

No files matched your search

+35
View File
@@ -208,11 +208,46 @@ void main() {
expect(find.text('Server title'), findsOneWidget);
expect(find.text('Episode 3 / 8 total'), findsOneWidget);
expect(find.text('Watched 25%'), findsOneWidget);
expect(
find.byKey(const Key('following-history-card-the-signal-demo')),
findsOneWidget,
);
expect(
find.byKey(const Key('following-history-continue-the-signal-demo')),
findsOneWidget,
);
expect(
find.byKey(const Key('following-progress-the-signal-demo')),
findsOneWidget,
);
final cover = tester.widget<SizedBox>(
find.byKey(const Key('following-history-cover-the-signal-demo')),
);
expect(cover.width, AppDimens.followingHistoryCoverWidth);
expect(cover.height, AppDimens.followingHistoryCoverHeight);
final historyGrid = tester.widget<SliverGrid>(
find.descendant(
of: find.byKey(const Key('following-history-grid')),
matching: find.byType(SliverGrid),
),
);
final historyDelegate =
historyGrid.gridDelegate as SliverGridDelegateWithFixedCrossAxisCount;
expect(historyDelegate.crossAxisCount, 1);
expect(historyDelegate.mainAxisSpacing, AppDimens.followingHistoryRowGap);
expect(catalog.detailFetches, 0);
await tester.tap(find.byKey(const Key('following-edit')));
await tester.pumpAndSettle();
expect(
find.byKey(const Key('following-history-remove-the-signal-demo')),
findsOneWidget,
);
expect(
find.byKey(const Key('following-history-continue-the-signal-demo')),
findsNothing,
);
});
testWidgets('should_switch_following_pages_horizontally', (tester) async {