FPI 랭킹 내 행성·내 국가 판정 · 콜드 스타트 약관 깜빡임 · 로그아웃 상한
This commit is contained in:
@@ -1030,6 +1030,31 @@ void main() {
|
||||
await session.close();
|
||||
});
|
||||
|
||||
testWidgets('푸시 정리가 멈춰도 상한 안에 첫 확인으로 로그아웃된다 — 확인 버튼은 진행 중 (10/6 r3)', (tester) async {
|
||||
final session = _LogoutSession(
|
||||
const AuthAccount(uid: 'u1', provider: SocialProvider.google),
|
||||
);
|
||||
final auth = AuthRepository(providers: const [], session: session, releaseMode: true);
|
||||
await pumpWide(
|
||||
tester,
|
||||
SettingsScreen(repository: SampleMyRepository(), auth: auth, push: _HangingPush()),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
await tester.scrollUntilVisible(find.text('로그아웃'), 220, scrollable: find.byType(Scrollable).first);
|
||||
await tester.tap(find.text('로그아웃'));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.widgetWithText(FilledButton, '로그아웃'));
|
||||
await tester.pump();
|
||||
// 정리가 도는 동안 확인 버튼은 진행 중 표시다.
|
||||
expect(find.byType(CircularProgressIndicator), findsOneWidget);
|
||||
expect(session.signOutCalls, 0);
|
||||
await tester.pump(const Duration(seconds: 4));
|
||||
await tester.pumpAndSettle();
|
||||
expect(session.signOutCalls, 1);
|
||||
auth.dispose();
|
||||
await session.close();
|
||||
});
|
||||
|
||||
testWidgets('로그아웃을 확인하면 세션이 끊긴다 (F6 · 554:22903)', (tester) async {
|
||||
final session = _LogoutSession(
|
||||
const AuthAccount(uid: 'u1', provider: SocialProvider.google),
|
||||
@@ -1074,6 +1099,15 @@ class _FailingPush implements PushMessaging {
|
||||
dynamic noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
|
||||
}
|
||||
|
||||
/// 푸시 정리가 응답 없이 멈추는 경계 — 토픽 해제가 끝나지 않는다.
|
||||
class _HangingPush implements PushMessaging {
|
||||
@override
|
||||
Future<void> clearOnSignOut() => Completer<void>().future;
|
||||
|
||||
@override
|
||||
dynamic noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
|
||||
}
|
||||
|
||||
/// 로그아웃 호출을 세는 최소 세션. 실제 Firebase 를 붙이지 않는다.
|
||||
final class _LogoutSession implements AuthSession {
|
||||
_LogoutSession(this._current);
|
||||
|
||||
Reference in New Issue
Block a user