feat(flutter): 按参考图重做首页 feed 浮层

This commit is contained in:
Zhou Weidong committed 2026-10-20 13:46:20 +08:00
1 parent d6b055dc62
commit ee6f0d7e72
14 files changed
+1062 -398

No files matched your search

+36 -1
View File
@@ -50,12 +50,47 @@ void main() {
await _pumpApp(tester);
expect(find.byKey(const Key('home-feed-title')), findsOneWidget);
expect(find.byKey(const Key('home-feed-info-card')), findsOneWidget);
expect(find.byKey(const Key('home-feed-full-series')), findsOneWidget);
expect(find.byType(PageView), findsOneWidget);
expect(find.byKey(const Key('home-browse-page')), findsNothing);
expect(
tester.widget<Text>(find.byKey(const Key('rail-like-count'))).data,
'41.9万',
);
expect(
tester.widget<Text>(find.byKey(const Key('rail-save-count'))).data,
'1006',
);
expect(
tester.widget<Text>(find.byKey(const Key('rail-comments-count'))).data,
'3.2万',
);
expect(tester.widget<PlayerPage>(find.byType(PlayerPage)).homeMode, isTrue);
});
testWidgets('should_open_episode_sheet_from_full_series_bar', (tester) async {
await _pumpApp(tester);
await tester.tap(find.byKey(const Key('home-feed-full-series')));
await tester.pumpAndSettle();
expect(find.byKey(const Key('player-episodes-sheet')), findsOneWidget);
});
testWidgets('should_show_coming_soon_for_danmaku_and_following_tab', (
tester,
) async {
await _pumpApp(tester);
await tester.tap(find.byKey(const Key('home-feed-danmaku')));
await tester.pump();
expect(find.text('Coming soon'), findsOneWidget);
await tester.tap(find.byKey(const Key('home-feed-tab-follow')));
await tester.pump();
expect(find.text('Coming soon'), findsOneWidget);
});
testWidgets('should_switch_feed_drama_when_swiped_up', (tester) async {
await _pumpApp(tester);
final before = tester