알림함 항목 생성 · 알림 이동 · 브리핑 항목 승인·상세 · 푸시 토픽을 가입 팬덤 전체로
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user