mirror of
https://github.com/ruvnet/RuView
synced 2026-08-01 19:01:42 +00:00
fix(ui): map sensing websocket port for docker (#572)
This commit is contained in:
+13
-1
@@ -3,6 +3,7 @@
|
||||
import { API_CONFIG, buildApiUrl, buildWsUrl } from '../config/api.config.js';
|
||||
import { apiService } from '../services/api.service.js';
|
||||
import { wsService } from '../services/websocket.service.js';
|
||||
import { buildSensingWsUrl } from '../services/sensing.service.js';
|
||||
import { poseService } from '../services/pose.service.js';
|
||||
import { healthService } from '../services/health.service.js';
|
||||
import { TabManager } from '../components/TabManager.js';
|
||||
@@ -232,6 +233,17 @@ testRunner.test('buildWsUrl constructs WebSocket URLs', 'apiConfig', () => {
|
||||
testRunner.assert(url.includes('token=test-token'), 'URL should contain token parameter');
|
||||
});
|
||||
|
||||
testRunner.test('buildSensingWsUrl maps Docker UI port to sensing WebSocket port', 'apiConfig', () => {
|
||||
const url = buildSensingWsUrl({
|
||||
protocol: 'http:',
|
||||
host: '192.168.28.147:3000',
|
||||
hostname: '192.168.28.147',
|
||||
port: '3000',
|
||||
});
|
||||
|
||||
testRunner.assertEqual(url, 'ws://192.168.28.147:3001/ws/sensing');
|
||||
});
|
||||
|
||||
// API Service Tests
|
||||
testRunner.test('apiService has required methods', 'apiService', () => {
|
||||
testRunner.assert(typeof apiService.get === 'function', 'get method should exist');
|
||||
@@ -473,4 +485,4 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
testRunner.updateSummary();
|
||||
});
|
||||
|
||||
export { testRunner };
|
||||
export { testRunner };
|
||||
|
||||
Reference in New Issue
Block a user