mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-05-01 19:12:57 +02:00
Longer linger for web push mobile error
This commit is contained in:
@@ -224,6 +224,7 @@ export function usePushSubscription(): PushSubscriptionState {
|
||||
console.error('Push subscribe failed:', err);
|
||||
toast.error('Failed to enable push notifications', {
|
||||
description: err instanceof Error ? err.message : 'Check that notifications are allowed',
|
||||
duration: 8_000,
|
||||
});
|
||||
return null;
|
||||
} finally {
|
||||
|
||||
@@ -171,9 +171,12 @@ describe('usePushSubscription', () => {
|
||||
});
|
||||
|
||||
expect(result.current.loading).toBe(false);
|
||||
expect(mocks.toast.error).toHaveBeenCalledWith('Failed to enable push notifications', {
|
||||
description: expect.stringContaining('trusted TLS certificate for service workers'),
|
||||
});
|
||||
expect(mocks.toast.error).toHaveBeenCalledWith(
|
||||
'Failed to enable push notifications',
|
||||
expect.objectContaining({
|
||||
description: expect.stringContaining('trusted TLS certificate for service workers'),
|
||||
})
|
||||
);
|
||||
}, 5_000);
|
||||
|
||||
it('recreates a stale browser subscription when the server VAPID key changed', async () => {
|
||||
|
||||
Reference in New Issue
Block a user