feat(flutter): 重设计创作与我的页面

This commit is contained in:
Zhou Weidong committed 2026-10-20 10:28:31 +08:00
1 parent d50c6e6d9f
commit 03c3964353
17 files changed
+807 -234

No files matched your search

+9 -14
View File
@@ -3,7 +3,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:fruitshorts/app.dart';
import 'package:fruitshorts/core/data/models/watch_progress.dart';
import 'package:fruitshorts/core/data/repositories/favorite_repository.dart';
import 'package:fruitshorts/core/data/repositories/playback_repository.dart';
import 'package:fruitshorts/core/data/repositories/watch_history_repository.dart';
@@ -18,7 +17,7 @@ import '../support/fake_notice_repository.dart';
import '../support/widget_player.dart';
void main() {
testWidgets('should_render_only_continue_and_six_core_entries', (
testWidgets('should_render_minimal_profile_shortcuts_wallet_vip_and_menu', (
tester,
) async {
SharedPreferencesAsyncPlatform.instance =
@@ -34,16 +33,7 @@ void main() {
playerFactory: createWidgetPlayer,
catalogRepository: catalog,
categoryRepository: FakeCategoryRepository(catalog: catalog),
watchHistoryRepository: InMemoryWatchHistoryRepository(
seed: const [
WatchProgress(
dramaId: 'city-lights-demo',
episodeId: 'city-lights-demo-1',
position: Duration(minutes: 2),
duration: Duration(minutes: 5),
),
],
),
watchHistoryRepository: InMemoryWatchHistoryRepository(),
favoriteRepository: InMemoryFavoriteRepository(cards: catalog.dramas),
playbackRepository: FakePlaybackRepository(),
commentRepository: FakeCommentRepository(),
@@ -57,15 +47,20 @@ void main() {
await tester.pumpAndSettle();
expect(find.byKey(const Key('mine-user-row')), findsOneWidget);
expect(find.byKey(const Key('mine-continue-watching')), findsOneWidget);
expect(find.byKey(const Key('mine-continue-play')), findsOneWidget);
expect(find.byKey(const Key('mine-continue-watching')), findsNothing);
for (final key in const [
Key('mine-watchlist'),
Key('mine-history'),
Key('mine-downloads'),
Key('mine-wallet'),
Key('mine-wallet-recharge'),
Key('mine-vip'),
Key('mine-menu'),
Key('mine-works'),
Key('mine-creator-center'),
Key('mine-notices'),
Key('mine-settings'),
Key('mine-help'),
]) {
expect(find.byKey(key), findsOneWidget);
}