refactor(navigation): 移除全局两侧悬浮元素

This commit is contained in:
Zhou Weidong committed 2026-10-22 17:58:43 +08:00
1 parent 5cead7ce00
commit 9cf832b318
8 files changed
+103 -217

No files matched your search

+9
View File
@@ -82,12 +82,14 @@ void main() {
expect(find.byKey(const Key('recommend-tab-playlist')), findsOneWidget);
expect(find.byKey(const Key('recommend-tab-all')), findsOneWidget);
expect(find.byKey(const Key('recommend-feed-player')), findsOneWidget);
_expectNoFloatingOverlays();
await tester.tap(find.byKey(const Key('recommend-tab-playlist')));
await tester.pumpAndSettle();
expect(find.byKey(const Key('recommend-section-hits')), findsOneWidget);
expect(find.byKey(const Key('recommend-section-new')), findsOneWidget);
expect(find.byKey(const Key('recommend-section-costume')), findsOneWidget);
_expectNoFloatingOverlays();
});
testWidgets('should_switch_playlist_and_all_dramas_in_recommend', (
@@ -101,6 +103,7 @@ void main() {
await tester.pumpAndSettle();
expect(find.byKey(const Key('recommend-section-hits')), findsOneWidget);
expect(find.byType(AppBottomNav), findsOneWidget);
_expectNoFloatingOverlays();
await tester.tap(find.byKey(const Key('recommend-tab-all')));
await tester.pumpAndSettle();
@@ -108,6 +111,7 @@ void main() {
for (var row = 0; row < 4; row++) {
expect(find.byKey(Key('all-filter-row-$row')), findsOneWidget);
}
_expectNoFloatingOverlays();
});
testWidgets('should_open_search_from_home_and_recommend', (tester) async {
@@ -159,6 +163,11 @@ const _tabKeys = [
Key('tab-mine'),
];
void _expectNoFloatingOverlays() {
expect(find.byKey(const Key('mine-mini-player')), findsNothing);
expect(find.byType(FloatingActionButton), findsNothing);
}
bool _hasLightStatusBar(WidgetTester tester) => tester
.widgetList<AnnotatedRegion<SystemUiOverlayStyle>>(
find.byType(AnnotatedRegion<SystemUiOverlayStyle>),