HOME GIVE [+1] · [+10] 라벨을 행성 우하단 안쪽으로 옮겨 GALAXY 미니맵과 겹치지 않게 함
This commit is contained in:
@@ -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'),
|
||||
|
||||
@@ -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<void> 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++) {
|
||||
|
||||
Reference in New Issue
Block a user