사용자 화면 문구·표본 데이터 · 퀘스트 참여 흐름 · HOME 진입 구획 · 미니맵 · 공통 확인 창 배치 수정
This commit is contained in:
@@ -11,9 +11,11 @@ import 'package:fancake/features/galaxy/galaxy_screen.dart';
|
||||
import 'package:fancake/features/galaxy/widgets/galaxy_mini_map.dart';
|
||||
import 'package:fancake/features/home/home_data.dart';
|
||||
import 'package:fancake/features/home/home_screen.dart';
|
||||
import 'package:fancake/features/home/widgets/home_hero.dart';
|
||||
import 'package:fancake/features/planet/planet_data.dart';
|
||||
import 'package:fancake/features/quest/quest_data.dart';
|
||||
import 'eclipse_stubs.dart';
|
||||
import 'galaxy_mini_map_capture_test.dart' show loadAppFonts, mineAt;
|
||||
import 'perf_paint_test.dart' show medianPaintMicros, paintBudgetMicros;
|
||||
|
||||
/// 프로토타입 궤도 간격 450 × Mass Volume 1.5 × Orbit Exp 1.0.
|
||||
@@ -187,24 +189,68 @@ void main() {
|
||||
expect(painterOf(tester).orbitOf('c'), closeTo(2 * _spacing, 5));
|
||||
});
|
||||
|
||||
testWidgets('140 에서는 내 행성 간략 카드만 — 두 줄 모두 9pt 이상', (tester) async {
|
||||
// 10/4 실기기 — 140pt 에서 HUD 글상자가 미니맵 대부분을 덮어 궤도·행성이 안 보였다.
|
||||
testWidgets('140 에서는 내 행성 간략 카드만(C-105) — 장면을 덮지 않는 크기', (tester) async {
|
||||
await tester.runAsync(loadAppFonts);
|
||||
await pumpMap(tester, _snap(_base));
|
||||
final p = painterOf(tester);
|
||||
expect(p.compactText, [
|
||||
('ALPHA', GalaxyMiniMapPainter.compactNamePt),
|
||||
('#1 · FPI 5,000 · LIVE 1,204', GalaxyMiniMapPainter.compactLinePt),
|
||||
('#1 · FPI 5,000', GalaxyMiniMapPainter.compactLinePt),
|
||||
('LIVE 1,204', GalaxyMiniMapPainter.compactLinePt),
|
||||
]);
|
||||
expect(p.compactText.first.$2, greaterThanOrEqualTo(10));
|
||||
for (final (_, pt) in p.compactText) {
|
||||
expect(pt, greaterThanOrEqualTo(9));
|
||||
expect(pt, greaterThanOrEqualTo(8));
|
||||
}
|
||||
final w = p.hudWidthOf('a')!;
|
||||
expect(w, greaterThan(0));
|
||||
expect(w, lessThanOrEqualTo(140 * GalaxyMiniMapPainter.hudFloor));
|
||||
final card = p.compactSize;
|
||||
expect(card.width, lessThanOrEqualTo(140 * GalaxyMiniMapPainter.hudFloor));
|
||||
expect(
|
||||
card.width * card.height,
|
||||
lessThan(140 * 140 * 0.2),
|
||||
reason: '카드는 미니맵 넓이의 1/5 미만',
|
||||
);
|
||||
expect(p.hudWidthOf('b'), 0, reason: '다른 행성 카드는 뺀다');
|
||||
expect(p.hudWidthOf('c'), 0);
|
||||
});
|
||||
|
||||
testWidgets('긴 행성 이름은 말줄임 — 순위·FPI·LIVE 숫자는 줄이지 않는다', (tester) async {
|
||||
await tester.runAsync(loadAppFonts);
|
||||
await pumpMap(
|
||||
tester,
|
||||
_snap(const [
|
||||
PlanetNode(
|
||||
id: 'a',
|
||||
name: 'FANUZU 데모 행성 아주 긴 이름 #1',
|
||||
rank: 1,
|
||||
fpi: 123456,
|
||||
members: 10,
|
||||
online: 1204,
|
||||
isMine: true,
|
||||
),
|
||||
]),
|
||||
);
|
||||
final p = painterOf(tester);
|
||||
expect(p.compactText.skip(1).map((t) => t.$1), [
|
||||
'#1 · FPI 123,456',
|
||||
'LIVE 1,204',
|
||||
]);
|
||||
for (final (_, pt) in p.compactText.skip(1)) {
|
||||
expect(pt, GalaxyMiniMapPainter.compactLinePt);
|
||||
}
|
||||
expect(
|
||||
p.compactSize.width,
|
||||
lessThanOrEqualTo(140 * GalaxyMiniMapPainter.hudFloor + 0.01),
|
||||
);
|
||||
});
|
||||
|
||||
testWidgets('내 행성이 1위가 아니어도 첫 화면 가운데에 둔다(C-103)', (tester) async {
|
||||
await pumpMap(tester, _snap(mineAt(3)));
|
||||
final p = painterOf(tester);
|
||||
expect(p.worldOf('3')!.distance, lessThan(1), reason: '내 행성 = 장면 원점');
|
||||
expect(p.orbitOf('3'), 2 * _spacing, reason: '궤도는 FPI 순위 그대로');
|
||||
expect(p.worldOf('1')!.distance, greaterThan(_spacing / 2));
|
||||
});
|
||||
|
||||
testWidgets('320 에서는 모든 행성에 프로토타입 카드를 그린다', (tester) async {
|
||||
await pumpMap(tester, _snap(_base), size: 320);
|
||||
final p = painterOf(tester);
|
||||
@@ -307,11 +353,24 @@ void main() {
|
||||
await tester.pump(const Duration(seconds: 1));
|
||||
final mini = find.byType(GalaxyMiniMap);
|
||||
expect(mini, findsOneWidget);
|
||||
// Q-DS-06 권고안 A(회신 전 임시) — 행성 영역 우측 상단 140 정사각.
|
||||
expect(tester.getSize(mini), const Size(140, 140));
|
||||
// C-105 약 140pt · C-113 자리 = Figma 「홈」(2097:16428) 히어로 우측 상단 · 오른쪽 여백 0.
|
||||
expect(
|
||||
tester.getSize(mini),
|
||||
const Size.square(HomeHero.miniMapSize),
|
||||
);
|
||||
expect(
|
||||
tester.getTopRight(mini).dx,
|
||||
closeTo(tester.getSize(find.byType(HomeScreen)).width - 16, 1),
|
||||
closeTo(tester.getSize(find.byType(HomeScreen)).width, 1),
|
||||
);
|
||||
expect(
|
||||
tester.getTopLeft(mini).dy,
|
||||
closeTo(
|
||||
tester.getTopLeft(find.byType(HomeHero)).dy +
|
||||
MediaQuery.paddingOf(tester.element(mini)).top -
|
||||
48 + // 사본 y 는 상태 표시줄 48 을 포함한다(HomeHero 와 같은 환산).
|
||||
HomeHero.miniMapTop,
|
||||
1,
|
||||
),
|
||||
);
|
||||
await tester.tap(mini);
|
||||
await tester.pump();
|
||||
|
||||
Reference in New Issue
Block a user