알림함 항목 생성 · 알림 이동 · 브리핑 항목 승인·상세 · 푸시 토픽을 가입 팬덤 전체로

This commit is contained in:
Sn-Kinos
2026-10-05 22:48:10 +09:00
parent fbf9a2c3d7
commit cf608a1d99
27 changed files with 714 additions and 69 deletions
+43
View File
@@ -176,6 +176,49 @@ void main() {
expect(returned, contains('n1'));
});
testWidgets('누르면 스낵바가 아니라 대상 화면으로 간다 — 이클립스는 경로가 있어도 이동 X', (tester) async {
final opened = <String>[];
final now = DateTime.now();
await pumpWide(
tester,
NotificationTargets(
screenFor: (path) {
opened.add(path);
return Scaffold(body: Text('열린 화면 $path'));
},
child: NotificationScreen(
repository: SampleNotificationRepository(
items: [
AppNotification(
id: 'q',
kind: NotificationKind.quest,
title: '[만보기] 퀘스트를 완료했어요!',
at: now,
targetPath: 'quests/steps-1',
),
AppNotification(
id: 'e',
kind: NotificationKind.eclipse,
title: '내 행성의 이클립스가 발생했어요.',
at: now,
targetPath: 'fandoms/bts',
),
],
),
),
),
);
await tester.tap(find.text('내 행성의 이클립스가 발생했어요.'));
await tester.pumpAndSettle();
expect(find.byType(SnackBar), findsNothing);
expect(find.textContaining('열린 화면'), findsNothing);
await tester.tap(find.text('[만보기] 퀘스트를 완료했어요!'));
await tester.pumpAndSettle();
expect(find.text('열린 화면 quests/steps-1'), findsOneWidget);
expect(find.byType(SnackBar), findsNothing);
});
testWidgets('비어 있으면 그렇게 알린다', (tester) async {
await pumpWide(
tester,