Push Notifications Testing

πŸ”” Push Notifications Test

Subscription Status

Loading subscription info...

⚠️ No active subscriptions found. Click below to enable notifications.

Testing Instructions

  1. 1. πŸ“’ Make sure notifications are enabled in your browser settings
  2. 2. βœ… Check that "Active Subscriptions" shows at least 1
  3. 3. πŸ“ Fill in the notification details above
  4. 4. πŸš€ Click "Send Test Notification"
  5. 5. πŸ‘‚ Look at the bottom right of your screen for the notification
  6. 6. πŸ“– Check browser console (F12) for any errors

πŸ’‘ Tips:

  • Open DevTools (F12) β†’ Console to see notification logs
  • Notifications might appear in action center on Windows, notification drawer on Mac
  • Click the notification to navigate to the specified URL
  • Check notification.json payload in Network tab for debugging

πŸ“š Resources & Documentation

Browser Support

  • βœ… Chrome/Edge 50+
  • βœ… Firefox 48+
  • βœ… Safari 16+ (macOS)
  • ❌ Safari (iOS)

Common Issues

  • ⚠️ HTTPS required (except localhost)
  • ⚠️ Service Worker must be registered
  • ⚠️ Check notification permissions
  • ⚠️ VAPID keys must match

Debugging Steps

  1. 1. Open DevTools: F12 or Right-click β†’ Inspect
  2. 2. Go to Application β†’ Service Workers to check registration
  3. 3. Check Console tab for errors and log messages
  4. 4. Verify Network tab shows POST to /admin/push/subscribe
  5. 5. Check that Notification.permission === "granted"

πŸ”— API Endpoints

Get Subscription Info

GET /admin/push/test/info

Send Test Notification

POST /admin/push/test/send

Body: { title, body, url }

Subscribe to Push

POST /admin/push/subscribe

Unsubscribe from Push

POST /admin/push/unsubscribe