1차 보완(0.1.1+14) 내용 합치기
This commit is contained in:
@@ -4,6 +4,7 @@ import 'package:fancake/app.dart';
|
||||
import 'package:fancake/core/data/repositories.dart';
|
||||
import 'package:fancake/core/firebase/firebase_boot.dart';
|
||||
import 'package:fancake/core/i18n/app_locale.dart';
|
||||
import 'package:fancake/core/ui/app_dialog.dart';
|
||||
import 'package:fancake/features/planet/planet_data.dart' show countryName;
|
||||
import 'package:fancake/features/auth/auth.dart';
|
||||
import 'package:fancake/features/auth/auth_repository.dart';
|
||||
@@ -50,7 +51,68 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
expect(auth.onboarding, OnboardingGate.required);
|
||||
expect(find.byType(NavigationBar), findsNothing);
|
||||
expect(find.text('개인정보 수집·이용 및 처리방침 동의 (필수)'), findsOneWidget);
|
||||
expect(find.text('개인정보 수집·이용 동의 (필수)'), findsOneWidget);
|
||||
// Q-E1 · R02 — 위치기반 약관은 가입 때 받지 않고, 개인정보처리방침은 체크 칸 없는 고지 · 보기 링크다.
|
||||
expect(find.textContaining('위치기반'), findsNothing);
|
||||
expect(find.text('개인정보처리방침'), findsNothing);
|
||||
await tester.tap(find.byKey(const ValueKey('privacy-policy-link')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('개인정보처리방침'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('개인정보처리방침 보기는 약관 문구가 아닌 처리방침 문구를 보여 준다', (tester) async {
|
||||
final (auth, _) = await boot(tester, needs: true);
|
||||
await auth.signIn(SocialProvider.google);
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.byKey(const ValueKey('privacy-policy-link')));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
final body = tester
|
||||
.widget<Text>(
|
||||
find.descendant(
|
||||
of: find.byType(AppDialog),
|
||||
matching: find.textContaining('임시 문구'),
|
||||
),
|
||||
)
|
||||
.data!;
|
||||
expect(body, contains('개인정보처리방침'));
|
||||
expect(body, isNot(contains('서비스 이용약관')));
|
||||
});
|
||||
|
||||
testWidgets('개인정보처리방침 고지는 iPhone 11 높이에서 스크롤 없이 하단 버튼 위에 보이고 체크 칸이 없다', (
|
||||
tester,
|
||||
) async {
|
||||
final (auth, _) = await boot(tester, needs: true);
|
||||
// iPhone 11 — 414x896pt · 상단 48 · 하단 34.
|
||||
tester.view.physicalSize = const Size(828, 1792);
|
||||
tester.view.padding = const FakeViewPadding(top: 96, bottom: 68);
|
||||
await auth.signIn(SocialProvider.google);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
final notice = find.byKey(const ValueKey('privacy-policy-notice'));
|
||||
expect(
|
||||
find.descendant(
|
||||
of: notice,
|
||||
matching: find.text('개인정보 처리 내용은 개인정보처리방침에서 확인할 수 있습니다.'),
|
||||
),
|
||||
findsOneWidget,
|
||||
);
|
||||
final link = find.descendant(of: notice, matching: find.text('보기'));
|
||||
expect(link, findsOneWidget);
|
||||
expect(
|
||||
find.descendant(of: notice, matching: find.byType(ImageIcon)),
|
||||
findsNothing,
|
||||
);
|
||||
expect(tester.getRect(link).bottom, lessThanOrEqualTo(896 - 34));
|
||||
expect(
|
||||
tester.getRect(notice).bottom,
|
||||
lessThanOrEqualTo(
|
||||
tester.getRect(find.widgetWithText(FilledButton, '이전')).top,
|
||||
),
|
||||
);
|
||||
await tester.tap(link);
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('개인정보처리방침'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('약관 동의가 있는 계정은 바로 셸', (tester) async {
|
||||
@@ -86,8 +148,7 @@ void main() {
|
||||
// ② 약관 — 필수만 동의(마케팅 미동의).
|
||||
for (final label in [
|
||||
'서비스 이용약관 (필수)',
|
||||
'개인정보 수집·이용 및 처리방침 동의 (필수)',
|
||||
'위치기반 서비스 이용약관 (필수)',
|
||||
'개인정보 수집·이용 동의 (필수)',
|
||||
'만 14세 이상입니다. (필수)',
|
||||
]) {
|
||||
await tester.tap(find.text(label));
|
||||
@@ -95,7 +156,7 @@ void main() {
|
||||
await tester.pump();
|
||||
await tester.tap(find.text('완료'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(repo.agreed, {'service', 'privacy', 'location', 'age'});
|
||||
expect(repo.agreed, {'service', 'privacy', 'age'});
|
||||
|
||||
// ③ 프로필
|
||||
await tester.enterText(find.byType(TextField).first, '우주팬');
|
||||
@@ -143,8 +204,7 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
for (final label in [
|
||||
'서비스 이용약관 (필수)',
|
||||
'개인정보 수집·이용 및 처리방침 동의 (필수)',
|
||||
'위치기반 서비스 이용약관 (필수)',
|
||||
'개인정보 수집·이용 동의 (필수)',
|
||||
'만 14세 이상입니다. (필수)',
|
||||
]) {
|
||||
await tester.tap(find.text(label));
|
||||
@@ -184,8 +244,7 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
for (final label in [
|
||||
'서비스 이용약관 (필수)',
|
||||
'개인정보 수집·이용 및 처리방침 동의 (필수)',
|
||||
'위치기반 서비스 이용약관 (필수)',
|
||||
'개인정보 수집·이용 동의 (필수)',
|
||||
'만 14세 이상입니다. (필수)',
|
||||
]) {
|
||||
await tester.tap(find.text(label));
|
||||
@@ -214,8 +273,7 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
for (final label in [
|
||||
'서비스 이용약관 (필수)',
|
||||
'개인정보 수집·이용 및 처리방침 동의 (필수)',
|
||||
'위치기반 서비스 이용약관 (필수)',
|
||||
'개인정보 수집·이용 동의 (필수)',
|
||||
'만 14세 이상입니다. (필수)',
|
||||
]) {
|
||||
await tester.tap(find.text(label));
|
||||
|
||||
Reference in New Issue
Block a user