You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement a method to NotificationService that checks if the current device is correctly registered for PushNotification with all required servers (firebase, aam-backend):
async checkDeviceRegistered(): Promise<boolean>
We need this to reliably display the push notification state/toggle to users and help them re-register the device if necessary.
Before implementing the actual code, add unit tests for the following scenarios (by mocking different http/Notification.permission responses):
browser push permission not granted --> expect false
aam-backend does not have device registered --> expect false
firebase does not have device registered --> expect false
all of the above are correct --> expect true
The text was updated successfully, but these errors were encountered:
Implement a method to
NotificationService
that checks if the current device is correctly registered for PushNotification with all required servers (firebase, aam-backend):async checkDeviceRegistered(): Promise<boolean>
We need this to reliably display the push notification state/toggle to users and help them re-register the device if necessary.
Before implementing the actual code, add unit tests for the following scenarios (by mocking different http/Notification.permission responses):
The text was updated successfully, but these errors were encountered: