mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
Add a "Send test notification" button to verify push delivery
Adds POST /api/notifications/test, which delivers a canned test push to every registered device through the existing relay path (not persisted to the notifications list), wired into the router and OpenAPI. In Settings, a "Send test notification" button appears under the push toggle, only when push is enabled on this device, so the full backend -> relay -> FCM -> APNs -> device path can be verified on demand without waiting for a real device event. Backend, API and widget tests added; clippy and dart analyze clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
c7c5b45ae8
commit
817ec5872c
@@ -36,6 +36,15 @@ void main() {
|
||||
await BackendAPI.instance.markAllNotificationsAsRead();
|
||||
});
|
||||
|
||||
test('sendTestNotification POSTs to /notifications/test', () async {
|
||||
adapter.onPost(
|
||||
'/notifications/test',
|
||||
(server) => server.reply(200, null),
|
||||
);
|
||||
|
||||
await BackendAPI.instance.sendTestNotification();
|
||||
});
|
||||
|
||||
test(
|
||||
'listNotifications sends is_new + pagination and reports the total',
|
||||
() async {
|
||||
|
||||
Reference in New Issue
Block a user