POP 내역 총 보유 · 예약 · 사용 가능 3구분 · 온보딩 추천인 코드

This commit is contained in:
Sn-Kinos
2026-10-06 20:05:18 +09:00
parent 363c74736c
commit a04626b003
20 changed files with 235 additions and 29 deletions
+48
View File
@@ -206,6 +206,54 @@ void main() {
expect(find.byType(BackButton), findsOneWidget); // ③ 프로필로 돌아왔다.
});
testWidgets('추천인 코드(C-119) — 귀속 뒤 돌아와도 다시 부르지 않고, 다른 코드는 511:86845 문구로 거절', (
tester,
) async {
final (auth, repo) = await boot(tester, needs: true);
await auth.signIn(SocialProvider.google);
await tester.pumpAndSettle();
for (final label in [
'서비스 이용약관 (필수)',
'개인정보 수집·이용 및 처리방침 동의 (필수)',
'위치기반 서비스 이용약관 (필수)',
'만 14세 이상입니다. (필수)',
]) {
await tester.tap(find.text(label));
}
await tester.pump();
await tester.tap(find.text('완료'));
await tester.pumpAndSettle();
await tester.enterText(find.byType(TextField).first, '우주팬');
await tester.enterText(find.byType(TextField).last, 'abcdefghjk');
await tester.pump();
await tester.tap(find.text('다음'));
await tester.pumpAndSettle();
expect(repo.referral, 'ABCDEFGHJK');
// ④ → ③ : 귀속한 코드가 채워져 있고 그대로 「다음」이면 통과(두 번째 호출 없음).
await tester.tap(find.byType(BackButton));
await tester.pumpAndSettle();
expect(find.text('ABCDEFGHJK'), findsOneWidget);
// 목 저장소는 저장한 닉네임을 돌려주지 않는다 — 다시 넣는다.
await tester.enterText(find.byType(TextField).first, '우주팬');
await tester.pump();
await tester.tap(find.text('다음'));
await tester.pumpAndSettle();
expect(find.text('NewJeans'), findsOneWidget); // ④ 로 넘어갔다.
// 다른 코드로 바꾸면 서버가 1인 1회로 거절 → Figma 오류 문구, 단계는 그대로.
await tester.tap(find.byType(BackButton));
await tester.pumpAndSettle();
await tester.enterText(find.byType(TextField).first, '우주팬');
await tester.enterText(find.byType(TextField).last, 'ZZZZZZZZZZ');
await tester.pump();
await tester.tap(find.text('다음'));
await tester.pumpAndSettle();
expect(find.text('추천인 코드를 확인해 주세요.'), findsOneWidget);
expect(repo.referral, 'ABCDEFGHJK');
});
testWidgets('가입 모드에서 받은 약관은 다시 묻지 않고 기록만 한다', (tester) async {
final (auth, repo) = await boot(tester, needs: true);
auth.pendingConsent = {