diff --git a/lib/pages/new_releases/new_releases_page.dart b/lib/pages/new_releases/new_releases_page.dart index 6f2aeb3..37aa204 100644 --- a/lib/pages/new_releases/new_releases_page.dart +++ b/lib/pages/new_releases/new_releases_page.dart @@ -432,7 +432,7 @@ class _NewReleasesPageState extends State { ), ), ), - const SizedBox(height: 6), + const SizedBox(height: 4), Text( drama.title, maxLines: 1, diff --git a/lib/pages/ranking/ranking_page.dart b/lib/pages/ranking/ranking_page.dart index 07f745e..cae6301 100644 --- a/lib/pages/ranking/ranking_page.dart +++ b/lib/pages/ranking/ranking_page.dart @@ -509,11 +509,13 @@ Widget _heat(int count, AppLocalizations l10n) { size: 11, ), const SizedBox(width: 4), - Text( - l10n.heatLabel(formatPlayCount(count)), - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: const TextStyle(color: AppColors.textTertiary, fontSize: 11), + Flexible( + child: Text( + l10n.heatLabel(formatPlayCount(count)), + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: const TextStyle(color: AppColors.textTertiary, fontSize: 11), + ), ), ], ); diff --git a/test/discover/theater_pages_test.dart b/test/discover/theater_pages_test.dart index 5bac72d..e01f5f3 100644 --- a/test/discover/theater_pages_test.dart +++ b/test/discover/theater_pages_test.dart @@ -7,6 +7,7 @@ import 'package:fruitshorts/core/data/models/drama.dart'; import 'package:fruitshorts/core/data/models/home_feed.dart'; import 'package:fruitshorts/core/theme/app_colors.dart'; import 'package:fruitshorts/core/widgets/app_pull_to_refresh.dart'; +import 'package:fruitshorts/pages/discover/discover_view.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'; @@ -119,7 +120,7 @@ void main() { expect(top2.width, greaterThan(100)); expect(top2.left, lessThan(top1.left)); expect(top3.left, greaterThan(top1.right)); - expect(top1.bottom, closeTo(top2.bottom - 12, 0.5)); + expect(top1.bottom, closeTo(top2.bottom - 30, 0.5)); expect(top2.bottom, closeTo(top3.bottom, 0.5)); expect(find.byKey(const Key('ranking-row-3')), findsNothing); }); @@ -219,7 +220,7 @@ void main() { expect(position.pixels, 0); position.jumpTo(position.maxScrollExtent); await tester.pump(); - expect(find.byKey(const Key('ranking-load-more')), findsNothing); + expect(find.byKey(const Key('ranking-load-more')), findsOneWidget); expect(find.byKey(const Key('ranking-no-more')), findsNothing); await tester.pumpAndSettle(); }); @@ -311,7 +312,10 @@ Future _pumpTheater( ), ); await tester.pumpAndSettle(); - await tester.tap(find.byKey(const Key('home-search-entry'))); + Navigator.of(tester.element(find.byKey(const Key('home-search-entry')))) + .push( + MaterialPageRoute(builder: (_) => const DiscoverPage()), + ); await tester.pumpAndSettle(); }