화면 하단 여백 · 로그아웃 진행 · 스낵바 강조색 · TODAY'S QUEST 관리자 퀘스트 3개
This commit is contained in:
@@ -19,6 +19,7 @@ import 'package:fancake/features/my/tier_screens.dart';
|
||||
import 'package:fancake/features/my/widgets/profile_card.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:fancake/core/push/push_messaging.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
|
||||
@@ -1009,6 +1010,26 @@ void main() {
|
||||
///
|
||||
/// 이 배선이 없던 동안 모달은 「09-10 회차에 연결합니다」 안내만 띄우고 세션을
|
||||
/// 그대로 두었다. 화면만 보면 로그아웃된 것처럼 보이지 않아 결함이 드러나지 않는다.
|
||||
testWidgets('푸시 정리가 실패해도 첫 확인에 로그아웃된다 (10/6 실기기)', (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: _FailingPush()),
|
||||
);
|
||||
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.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),
|
||||
@@ -1044,6 +1065,15 @@ void main() {
|
||||
});
|
||||
}
|
||||
|
||||
/// 푸시 정리가 실패하는 경계 — 토픽 해제 · 토큰 쓰기가 네트워크 오류로 던진다.
|
||||
class _FailingPush implements PushMessaging {
|
||||
@override
|
||||
Future<void> clearOnSignOut() async => throw Exception('offline');
|
||||
|
||||
@override
|
||||
dynamic noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
|
||||
}
|
||||
|
||||
/// 로그아웃 호출을 세는 최소 세션. 실제 Firebase 를 붙이지 않는다.
|
||||
final class _LogoutSession implements AuthSession {
|
||||
_LogoutSession(this._current);
|
||||
|
||||
Reference in New Issue
Block a user