mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-08-12 11:43:03 +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);
|
console.error('Push subscribe failed:', err);
|
||||||
toast.error('Failed to enable push notifications', {
|
toast.error('Failed to enable push notifications', {
|
||||||
description: err instanceof Error ? err.message : 'Check that notifications are allowed',
|
description: err instanceof Error ? err.message : 'Check that notifications are allowed',
|
||||||
|
duration: 8_000,
|
||||||
});
|
});
|
||||||
return null;
|
return null;
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -171,9 +171,12 @@ describe('usePushSubscription', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
expect(result.current.loading).toBe(false);
|
expect(result.current.loading).toBe(false);
|
||||||
expect(mocks.toast.error).toHaveBeenCalledWith('Failed to enable push notifications', {
|
expect(mocks.toast.error).toHaveBeenCalledWith(
|
||||||
description: expect.stringContaining('trusted TLS certificate for service workers'),
|
'Failed to enable push notifications',
|
||||||
});
|
expect.objectContaining({
|
||||||
|
description: expect.stringContaining('trusted TLS certificate for service workers'),
|
||||||
|
})
|
||||||
|
);
|
||||||
}, 5_000);
|
}, 5_000);
|
||||||
|
|
||||||
it('recreates a stale browser subscription when the server VAPID key changed', async () => {
|
it('recreates a stale browser subscription when the server VAPID key changed', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user