refactor(ui): 清理 K26 旧 UI 与死代码

This commit is contained in:
Zhou Weidong committed 2026-10-19 15:58:22 +08:00
1 parent a5398daab3
commit 5422581f8b
23 files changed
+291 -1225

No files matched your search

+1 -33
View File
@@ -122,38 +122,12 @@ void main() {
await tester.pumpAndSettle();
expect(find.byKey(const Key('home-feed-download')), findsOneWidget);
expect(find.byKey(const Key('home-feed-pip')), findsOneWidget);
expect(find.byKey(const Key('home-feed-clear')), findsOneWidget);
await tester.binding.handlePopRoute();
await tester.pumpAndSettle();
expect(find.text('Watch Full'), findsNothing);
expect(find.byTooltip('Explore series'), findsNothing);
});
testWidgets('should_hide_tabs_and_restore_them_when_clear_screen_is_tapped', (
tester,
) async {
tester.view.physicalSize = const Size(390, 844);
tester.view.devicePixelRatio = 1;
addTearDown(tester.view.resetPhysicalSize);
addTearDown(tester.view.resetDevicePixelRatio);
await tester.pumpWidget(appUnderTest());
await tester.pumpAndSettle();
await tester.tap(find.byKey(const Key('tab-home')));
await tester.pumpAndSettle();
await tester.tap(find.byKey(const Key('home-feed-more')));
await tester.pumpAndSettle();
await tester.tap(find.byKey(const Key('home-feed-clear')));
await tester.pumpAndSettle();
expect(find.byKey(const Key('home-tabs-bar')), findsNothing);
expect(find.byTooltip('Exit clear screen'), findsOneWidget);
await tester.tap(find.byTooltip('Exit clear screen'));
await tester.pumpAndSettle();
expect(find.byKey(const Key('home-tabs-bar')), findsOneWidget);
expect(find.byKey(const Key('home-feed-more')), findsOneWidget);
expect(tester.takeException(), isNull);
});
testWidgets(
'should_open_current_series_and_switch_root_tabs_when_quick_drawer_is_used',
(tester) async {
@@ -177,13 +151,7 @@ void main() {
);
expect(find.text('Quick access'), findsOneWidget);
expect(find.text('Bahasa Indonesia'), findsOneWidget);
expect(
find.descendant(
of: find.byType(Drawer),
matching: find.text('7 EPISODES'),
),
findsOneWidget,
);
expect(find.text('7 EPISODES'), findsOneWidget);
expect(tester.takeException(), isNull);
await tester.tap(find.byKey(const Key('drawer-open-series')));