앱 단위·화면·통합 테스트
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
// F2 GALAXY 화면군 캡처. 방법은 `capture_common.dart` 참고.
|
||||
//
|
||||
// 검토회신서 3절(K-2 — 「HUD 가 행성 연계가 아니라 화면 최상단 고정 패널」)에
|
||||
// 대한 응답을 **화면으로** 보이는 것이 목적이다. 그래서 정지 화면 한 장으로
|
||||
// 끝내지 않고 중심 전환 중 한 장을 함께 찍는다 — HUD 가 행성에 붙어 같이
|
||||
// 움직인다는 사실은 멈춘 그림 하나로는 구분되지 않는다.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'package:fancake/features/eclipse/eclipse_data.dart';
|
||||
import 'package:fancake/features/galaxy/galaxy_data.dart';
|
||||
import 'package:fancake/features/galaxy/galaxy_screen.dart';
|
||||
import 'package:fancake/features/planet/planet_data.dart';
|
||||
|
||||
import 'capture_common.dart';
|
||||
|
||||
void main() {
|
||||
final cap = Capture();
|
||||
|
||||
setUpAll(cap.prepare);
|
||||
|
||||
testWidgets('F2 GALAXY', (tester) async {
|
||||
await cap.open(
|
||||
tester,
|
||||
'F2',
|
||||
GalaxyScreen(
|
||||
repository: SampleGalaxyRepository(),
|
||||
planetRepository: samplePlanetRepository,
|
||||
// 캡처는 이클립스 배너·침식 HUD 가 든 상태를 함께 남긴다.
|
||||
eclipse: SampleEclipseRepository(),
|
||||
),
|
||||
);
|
||||
await cap.shot('F2_01_GALAXY_내_행성_HUD');
|
||||
|
||||
// 키는 이름이 아니라 문서 ID 다 — 동명 팬덤이 둘이면 이름으로는 못 집는다.
|
||||
// 바깥 궤도는 계속 돌므로 어느 행성이 탭 가능한 자리에 있을지 정해지지
|
||||
// 않는다. 표본을 차례로 눌러 HUD 수치가 바뀐 첫 행성에서 멈춘다.
|
||||
const others = {
|
||||
'newjeans': '271,905',
|
||||
'seventeen': '254,120',
|
||||
'ive': '198,740',
|
||||
'aespa': '176,250',
|
||||
'lesserafim': '152,080',
|
||||
};
|
||||
for (final e in others.entries) {
|
||||
await tester.tap(find.byKey(ValueKey(e.key)), warnIfMissed: false);
|
||||
await tester.pump();
|
||||
await tester.pump(const Duration(milliseconds: 120));
|
||||
if (find.text(e.value).evaluate().isNotEmpty) break;
|
||||
}
|
||||
// 전환이 끝나기 전 — HUD 가 행성을 따라 화면 한가운데로 날아가는 중이다.
|
||||
await cap.shot('F2_02_GALAXY_중심_전환_중');
|
||||
|
||||
await tester.pump(const Duration(milliseconds: 700));
|
||||
await tester.pump();
|
||||
await cap.shot('F2_03_GALAXY_전환_완료_HUD_연동');
|
||||
|
||||
await tester.fling(
|
||||
find.byType(InteractiveViewer),
|
||||
const Offset(-140, -40),
|
||||
900,
|
||||
);
|
||||
await tester.pump(const Duration(milliseconds: 260));
|
||||
await tester.pump();
|
||||
await cap.shot('F2_04_GALAXY_드래그_관성');
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user