From 577f6453a52aeb7f1bc55d540f89ddb24bc76269 Mon Sep 17 00:00:00 2001 From: Sn-Kinos Date: Thu, 22 Oct 2026 00:35:06 +0900 Subject: [PATCH] =?UTF-8?q?HOME=20GIVE=20[+1]=20=C2=B7=20[+10]=20=EB=9D=BC?= =?UTF-8?q?=EB=B2=A8=EC=9D=84=20=ED=96=89=EC=84=B1=20=EC=9A=B0=ED=95=98?= =?UTF-8?q?=EB=8B=A8=20=EC=95=88=EC=AA=BD=EC=9C=BC=EB=A1=9C=20=EC=98=AE?= =?UTF-8?q?=EA=B2=A8=20GALAXY=20=EB=AF=B8=EB=8B=88=EB=A7=B5=EA=B3=BC=20?= =?UTF-8?q?=EA=B2=B9=EC=B9=98=EC=A7=80=20=EC=95=8A=EA=B2=8C=20=ED=95=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/lib/features/home/widgets/home_hero.dart | 5 ++-- app/test/planet_give_reaction_test.dart | 28 +++++++++++++++++++- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/app/lib/features/home/widgets/home_hero.dart b/app/lib/features/home/widgets/home_hero.dart index 3e77e36..3a1c52a 100644 --- a/app/lib/features/home/widgets/home_hero.dart +++ b/app/lib/features/home/widgets/home_hero.dart @@ -1255,14 +1255,15 @@ class _PlanetReactionState extends State<_PlanetReaction> child: widget.builder(boost), ), if (_count case final count?) - // 행성 우측 하단 — 행성 그림 상자([planetSize]) 안 오른쪽 아래. + // 행성 우측 하단 — 행성 그림 상자([planetSize]) 안 오른쪽 아래. x 0.6 은 360 폭에서도 [+10] 이 + // 오른쪽 GALAXY 미니맵에 가려지지 않는 자리다(10/22 iPhone 캡처에서 0.85 는 끝자리가 가려졌다). Positioned.fill( child: IgnorePointer( child: Center( child: SizedBox.square( dimension: widget.planetSize, child: Align( - alignment: const Alignment(0.85, 0.85), + alignment: const Alignment(0.6, 0.85), child: Text( count, key: const ValueKey('planet-give-count'), diff --git a/app/test/planet_give_reaction_test.dart b/app/test/planet_give_reaction_test.dart index 8712fc3..54b4a69 100644 --- a/app/test/planet_give_reaction_test.dart +++ b/app/test/planet_give_reaction_test.dart @@ -3,6 +3,7 @@ import 'dart:async'; import 'package:fancake/core/theme/app_theme.dart'; import 'package:fancake/core/ui/planet_25d.dart'; import 'package:fancake/features/galaxy/galaxy_data.dart'; +import 'package:fancake/features/galaxy/widgets/galaxy_web_view.dart'; import 'package:fancake/features/galaxy/widgets/zap_button.dart'; import 'package:fancake/features/galaxy/zap_controller.dart'; import 'package:fancake/features/home/home_data.dart'; @@ -164,8 +165,9 @@ void main() { Future pumpHome( WidgetTester tester, [ GalaxyRepository galaxy = const _OkGalaxy(), + Size size = const Size(1125, 2436), ]) async { - tester.view.physicalSize = const Size(1125, 2436); + tester.view.physicalSize = size; tester.view.devicePixelRatio = 3; addTearDown(tester.view.reset); await tester.pumpWidget( @@ -278,6 +280,30 @@ void main() { await tester.pump(const Duration(seconds: 3)); }); + // 10/22 iPhone 캡처 — [+10] 끝자리가 GALAXY 미니맵에 가려졌다. 행성 우하단에 두되 미니맵과 겹치지 않는다. + for (final (name, size) in const [ + ('360×760', Size(1080, 2280)), + ('375×812', Size(1125, 2436)), + ('390×844', Size(1170, 2532)), + ]) { + testWidgets('$name — [+10] 라벨이 GALAXY 미니맵과 겹치지 않는다', (tester) async { + await pumpHome(tester, const _OkGalaxy(), size); + for (var i = 0; i < 10; i++) { + await tester.tap(find.byType(ZapButton)); + await tester.pump(const Duration(milliseconds: 120)); + } + await tester.pump(const Duration(milliseconds: 300)); + await tester.pump(); + final label = tester.getRect(find.text('+10')); + final map = tester.getRect(find.byType(GalaxyWebView)); + expect(label.overlaps(map), isFalse, reason: '[+10] $label · 미니맵 $map'); + final planet = tester.getRect(find.byType(Planet25D).first); + expect(label.center.dx, greaterThan(planet.center.dx)); + expect(label.center.dy, greaterThan(planet.center.dy)); + await tester.pump(const Duration(seconds: 3)); + }); + } + testWidgets('GIVE 10회 이상: [+10] · 자전 1.5배(Planet25D.spinBoost)', (tester) async { await pumpHome(tester); for (var i = 0; i < 10; i++) {