Figma 설명 프레임 반영 — 로그인·온보딩·스플래시 · HOME · GALAXY · 퀘스트·이클립스·알림

This commit is contained in:
Sn-Kinos
2026-10-06 03:03:20 +09:00
parent 64825e72b0
commit ecf5998725
77 changed files with 2703 additions and 640 deletions
+74 -2
View File
@@ -121,6 +121,20 @@ class _PrimaryRepository extends SampleGalaxyRepository {
}
}
/// 오늘 성운을 이미 만든 계정.
class _CreatedTodayRepository extends SampleGalaxyRepository {
@override
Future<GalaxySnapshot> load() async {
final s = await super.load();
return GalaxySnapshot(
planets: s.planets,
myPop: s.myPop,
memberships: s.memberships,
nebulaCreatedToday: true,
);
}
}
void main() {
group('GALAXY 모아보기 (§2.56 · §2.58) — 기본 행성 변경', () {
Future<void> pumpHome(WidgetTester tester, GalaxyRepository repo) async {
@@ -146,6 +160,24 @@ void main() {
expect(repo.changes, ['newjeans']);
});
testWidgets('그리드 변경 — 격자 ↔ 리스트(540:19580)', (tester) async {
await pumpHome(tester, _PrimaryRepository());
expect(find.text('NewJeans'), findsNothing); // 격자는 그림만
await tester.tap(find.bySemanticsLabel('리스트 그리드'));
await tester.pumpAndSettle();
expect(find.text('NewJeans'), findsOneWidget);
await tester.tap(find.bySemanticsLabel('격자 그리드'));
await tester.pumpAndSettle();
expect(find.text('NewJeans'), findsNothing);
});
testWidgets('오늘 성운을 만들었으면 성운 생성은 초과 안내 모달만(540:19592 · 543:19609)', (tester) async {
await pumpHome(tester, _CreatedTodayRepository());
await tester.tap(find.text('성운 생성'));
await tester.pumpAndSettle();
expect(find.text('이미 오늘 성운을 생성하셨습니다.'), findsOneWidget);
});
testWidgets('30일 대기 중이면 서버 사유(E-FDM-04)를 알린다', (tester) async {
final repo = _PrimaryRepository(
error: const BackendException('E-FDM-04', '기본 행성은 변경 후 30일이 지나야 다시 바꿀 수 있습니다.'),
@@ -465,7 +497,10 @@ void main() {
await _pump(tester, const GalaxySearchScreen());
await tester.enterText(find.byType(TextField), 'BTS');
await tester.pumpAndSettle();
expect(find.textContaining('멤버 12,840명'), findsOneWidget);
// 결과 줄 — Figma `353:218091` 가입자 수 · 「FPI : n」 · 규모 칩.
expect(find.text('12,840'), findsOneWidget);
expect(find.text('FPI : 284,310'), findsOneWidget);
expect(find.text('중형 팬덤'), findsOneWidget);
await tester.testTextInput.receiveAction(TextInputAction.search);
await tester.pumpAndSettle();
@@ -479,10 +514,47 @@ void main() {
await _pump(tester, GalaxySearchScreen(onOpen: (p) => opened = p));
await tester.enterText(find.byType(TextField), 'BTS');
await tester.pumpAndSettle();
await tester.tap(find.textContaining('멤버 12,840명'));
await tester.tap(find.text('12,840'));
expect(opened?.name, 'BTS');
});
testWidgets('탭(행성 · 성운) · 필터(전체 · 가입자 수 · FPI) — 543:19672 · 543:19683', (tester) async {
await _pump(tester, const GalaxySearchScreen());
await tester.enterText(find.byType(TextField), 'e');
await tester.pumpAndSettle();
expect(find.text('행성'), findsOneWidget);
expect(find.text('성운'), findsOneWidget);
// 가입자 수 순 — NewJeans(11,230) 가 SEVENTEEN(10,450) 보다 위.
await tester.tap(find.text('가입자 수'));
await tester.pumpAndSettle();
expect(
tester.getTopLeft(find.text('NewJeans')).dy,
lessThan(tester.getTopLeft(find.text('SEVENTEEN')).dy),
);
// 성운 탭 — 표본은 모두 정식 행성이라 비고, FPI 필터는 없다.
await tester.tap(find.text('성운'));
await tester.pumpAndSettle();
expect(find.text('NewJeans'), findsNothing);
expect(find.text('FPI'), findsNothing);
});
testWidgets('가입 → 가입 처리 후 가입중(543:19694)', (tester) async {
final joined = <String>[];
await _pump(
tester,
GalaxySearchScreen(
repository: const SampleGalaxyRepository(),
onJoin: (p) async => joined.add(p.id),
),
);
await tester.enterText(find.byType(TextField), 'IVE');
await tester.pumpAndSettle();
await tester.tap(find.text('가입'));
await tester.pumpAndSettle();
expect(joined, ['ive']);
expect(find.text('가입중'), findsOneWidget);
});
testWidgets('없는 이름이면 사유를 알린다', (tester) async {
await _pump(tester, const GalaxySearchScreen());
await tester.enterText(find.byType(TextField), 'zzzz');