가입 약관 동의 기록 · 서비스 탈퇴 · 온보딩 6단계 · Coach Mark
This commit is contained in:
@@ -180,10 +180,7 @@ void main() {
|
||||
testWidgets('행성/성운 칸은 가입 목록을 팬덤 stage 그림으로 그린다', (tester) async {
|
||||
await pumpWide(
|
||||
tester,
|
||||
MyScreen(
|
||||
repository: SampleMyRepository(),
|
||||
galaxy: _OneNebula(),
|
||||
),
|
||||
MyScreen(repository: SampleMyRepository(), galaxy: _OneNebula()),
|
||||
);
|
||||
await tester.pump();
|
||||
final images = tester
|
||||
@@ -191,7 +188,10 @@ void main() {
|
||||
.map((i) => (i.image as AssetImage).assetName)
|
||||
.toList();
|
||||
expect(images, contains('assets/figma/nebula-card.png'));
|
||||
expect(images.where((a) => a.startsWith('assets/figma/my-planet-')), isEmpty);
|
||||
expect(
|
||||
images.where((a) => a.startsWith('assets/figma/my-planet-')),
|
||||
isEmpty,
|
||||
);
|
||||
expect(find.bySemanticsLabel('새 성운'), findsOneWidget);
|
||||
});
|
||||
|
||||
@@ -233,8 +233,12 @@ void main() {
|
||||
return null;
|
||||
},
|
||||
);
|
||||
addTearDown(() => tester.binding.defaultBinaryMessenger
|
||||
.setMockMethodCallHandler(SystemChannels.platform, null));
|
||||
addTearDown(
|
||||
() => tester.binding.defaultBinaryMessenger.setMockMethodCallHandler(
|
||||
SystemChannels.platform,
|
||||
null,
|
||||
),
|
||||
);
|
||||
expect(await shareProfile(profile, '문구 복사'), isTrue);
|
||||
expect(clip, profileShareText(profile));
|
||||
});
|
||||
@@ -471,6 +475,41 @@ void main() {
|
||||
expect(find.text('취소'), findsOneWidget);
|
||||
});
|
||||
|
||||
Future<void> confirmWithdraw(WidgetTester tester) async {
|
||||
await tester.scrollUntilVisible(find.text('서비스 탈퇴'), 200);
|
||||
await tester.ensureVisible(find.text('서비스 탈퇴'));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('서비스 탈퇴'));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('서비스 탈퇴').last);
|
||||
await tester.pumpAndSettle();
|
||||
}
|
||||
|
||||
testWidgets('SNS 연동이 남아 있으면 비정상 탈퇴 안내만 (554:24908)', (tester) async {
|
||||
final repo = _WithdrawRepo();
|
||||
await pumpWide(tester, SettingsScreen(repository: repo));
|
||||
await tester.pump();
|
||||
await confirmWithdraw(tester);
|
||||
expect(find.text('연동된 계정 해제 후 계정 탈퇴를 진행해주세요.'), findsOneWidget);
|
||||
expect(repo.withdrawn, isFalse);
|
||||
});
|
||||
|
||||
testWidgets('연동이 하나뿐이면 서버 탈퇴를 부른다 (554:24885)', (tester) async {
|
||||
final repo = _WithdrawRepo();
|
||||
await pumpWide(
|
||||
tester,
|
||||
SettingsScreen(
|
||||
repository: repo,
|
||||
linker: SampleAccountLinker(
|
||||
seed: const {AuthProviderKind.google: 'fan@gmail.com'},
|
||||
),
|
||||
),
|
||||
);
|
||||
await tester.pump();
|
||||
await confirmWithdraw(tester);
|
||||
expect(repo.withdrawn, isTrue);
|
||||
});
|
||||
|
||||
testWidgets('SNS 연동 라벨은 제공자 이름만 쓴다 — 「LINE으」 잘림 없음', (tester) async {
|
||||
await pumpWide(tester, SettingsScreen(repository: SampleMyRepository()));
|
||||
await tester.pump();
|
||||
@@ -1112,9 +1151,22 @@ class _OneNebula extends SampleGalaxyRepository {
|
||||
myPop: 0,
|
||||
memberships: [
|
||||
PlanetNode(
|
||||
id: 'n1', name: '새 성운', rank: 0, fpi: 0, members: 1, online: 0,
|
||||
isMine: true, stage: 0,
|
||||
id: 'n1',
|
||||
name: '새 성운',
|
||||
rank: 0,
|
||||
fpi: 0,
|
||||
members: 1,
|
||||
online: 0,
|
||||
isMine: true,
|
||||
stage: 0,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
class _WithdrawRepo extends SampleMyRepository {
|
||||
bool withdrawn = false;
|
||||
|
||||
@override
|
||||
Future<void> withdraw() async => withdrawn = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user