사용자 화면 문구·표본 데이터 · 퀘스트 참여 흐름 · HOME 진입 구획 · 미니맵 · 공통 확인 창 배치 수정

This commit is contained in:
Sn-Kinos
2026-10-05 00:44:39 +09:00
parent c8d29d032b
commit 8a0297eb92
66 changed files with 1812 additions and 959 deletions
+28 -1
View File
@@ -207,13 +207,25 @@ void main() {
'active': true, 'title': '오늘의 출석체크', 'rewardPop': 50, 'dailyLimit': 1,
});
await db.doc('users/$_uid/questProgress/attend')
.set({'count': 1, 'dayKey': '2026-09-01'});
.set({'count': 1, 'dayKey': kstDayKey()});
final snapshot = await FirestoreHomeRepository(_backend(db)).load();
expect(snapshot.quests.single.state, QuestState.done);
expect(snapshot.quests.single.rewardPop, 50);
});
test('지난 날의 진행 행은 완료로 보지 않는다 — 목록 · 상세와 같은 판정(실기기 4-1)', () async {
final db = await _seed();
await db.doc('quests/attend').set({
'active': true, 'type': 'attend', 'title': '출석 체크', 'dailyLimit': 1,
});
await db.doc('users/$_uid/questProgress/attend')
.set({'count': 1, 'dayKey': '2026-09-21'});
final snapshot = await FirestoreHomeRepository(_backend(db)).load();
expect(snapshot.quests.single.state, isNot(QuestState.done));
});
test('출석 보상은 서버 지급과 같은 config/policy.attendPop 을 쓴다', () async {
final db = await _seed();
await db.doc('quests/attend').set({
@@ -464,6 +476,21 @@ void main() {
expect(detail.scores.every((s) => s.myTopPercent == null), isTrue);
});
test('행성 값이 0 인 축은 남아 있는 내 기여 상위 값을 쓰지 않는다', () async {
// 10/4 실기기 — FPI 0 행성에 시드의 「상위 43%」가 그대로 떴다.
final db = await seedPlanet();
await db.doc('fandoms/bts').set({
'fpiAxes': {'bpm': 0},
}, SetOptions(merge: true));
final detail = await FirestorePlanetRepository(_backend(db), fandomId: 'bts')
.load(nebula: false);
final bpm = detail.scores.firstWhere((s) => s.metric == FpiMetric.bpm);
expect(bpm.myTopPercent, isNull);
// 값이 있는 축은 그대로 읽는다.
final health = detail.scores.firstWhere((s) => s.metric == FpiMetric.health);
expect(health.myTopPercent, 12);
});
test('스냅샷이 없으면 동향은 0 이다', () async {
final db = await seedPlanet();
await db.doc('fandoms/bts/fpiSnapshots/2026-09-01-00').delete();