fix: Bug - Login screen shows up on unreachable signal servers
Skip authorize login navigation when a signal server endpoint is offline or unreachable; gate connection and credential flows on online status only. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import {
|
||||
describe,
|
||||
expect,
|
||||
it
|
||||
} from 'vitest';
|
||||
import { isEndpointOnlineForConnection } from './server-endpoint-connectivity.rules';
|
||||
|
||||
describe('server-endpoint-connectivity rules', () => {
|
||||
it('treats only online endpoints as reachable for connection', () => {
|
||||
expect(isEndpointOnlineForConnection('online')).toBe(true);
|
||||
expect(isEndpointOnlineForConnection('offline')).toBe(false);
|
||||
expect(isEndpointOnlineForConnection('checking')).toBe(false);
|
||||
expect(isEndpointOnlineForConnection('unknown')).toBe(false);
|
||||
expect(isEndpointOnlineForConnection('incompatible')).toBe(false);
|
||||
expect(isEndpointOnlineForConnection(undefined)).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user