feat(app): 底部导航精简为三 Tab

This commit is contained in:
Zhou Weidong committed 2026-10-20 05:14:52 +08:00
1 parent 19caaa0a22
commit dc8ca7b743
3 files changed
+2 -115

No files matched your search

+2 -8
View File
@@ -20,7 +20,6 @@ const _keys = [
Key('home-tabs-bar'),
Key('tab-home'),
Key('tab-discover'),
Key('tab-ranking'),
Key('tab-my'),
];
@@ -34,7 +33,7 @@ void main() {
});
});
testWidgets('should_theme_four_tabs_and_switch_selected_state_when_tapped', (
testWidgets('should_theme_three_tabs_and_switch_selected_state_when_tapped', (
tester,
) async {
final haptics = FakeHaptics();
@@ -96,14 +95,13 @@ void main() {
);
});
testWidgets('should_map_four_tabs_to_home_discover_ranking_and_me', (
testWidgets('should_map_three_tabs_to_home_discover_and_me', (
tester,
) async {
await _pumpApp(tester);
expect(find.byKey(const Key('tab-home')), findsOneWidget);
expect(find.byKey(const Key('tab-discover')), findsOneWidget);
expect(find.byKey(const Key('tab-ranking')), findsOneWidget);
expect(find.byKey(const Key('tab-my')), findsOneWidget);
expect(find.byKey(const Key('home-feed-info-card')), findsOneWidget);
@@ -111,10 +109,6 @@ void main() {
await tester.pumpAndSettle();
expect(find.byKey(const Key('home-all-dramas-grid')), findsOneWidget);
await tester.tap(find.byKey(const Key('tab-ranking')));
await tester.pumpAndSettle();
expect(find.byKey(const Key('ranking-page')), findsOneWidget);
await tester.tap(find.byKey(const Key('tab-my')));
await tester.pumpAndSettle();
expect(find.text('Viewer'), findsOneWidget);