From b28b0f335f9d4a1344635f9c5ea688c2f3938d8d Mon Sep 17 00:00:00 2001 From: Dorian Date: Wed, 18 Mar 2026 23:27:26 +0000 Subject: [PATCH] test: fix 5 appLauncher tests for panel mode, 515/515 passing Tests expected router.push but panel mode (now default) uses panelAppId store state instead. Updated assertions to check panelAppId. Fixed BTCPay app ID from 'btcpay' to 'btcpay-server'. All 515 tests pass. Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/MASTER_PLAN.md | 2 +- neode-ui/src/stores/__tests__/appLauncher.test.ts | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/MASTER_PLAN.md b/docs/MASTER_PLAN.md index f2e2efa7..2ac0dd29 100644 --- a/docs/MASTER_PLAN.md +++ b/docs/MASTER_PLAN.md @@ -15,7 +15,7 @@ | **FEATURE-4** | **Onboarding loading screen with progress** | **P1** | IN PROGRESS | - | | **TASK-9** | **Full feature testing sweep** | **P1** | PLANNED | - | | **TASK-10** | **ISO build verification + multi-hardware test** | **P1** | PLANNED | - | -| **TASK-12** | **Beta telemetry — node reporting + monitoring panel** | **P1** | PLANNED | - | +| **TASK-12** | **Beta telemetry — node reporting + settings toggle** | **P1** | IN PROGRESS | - | | **TASK-39** | **Finish .198 rootless container migration** | **P1** | PLANNED | TASK-11 | | **BUG-3** | **IndeedHub WebSocket spam in console** | **P2** | PLANNED | - | | **TASK-17** | **Alpha version tags + rollback strategy** | **P2** | PLANNED | - | diff --git a/neode-ui/src/stores/__tests__/appLauncher.test.ts b/neode-ui/src/stores/__tests__/appLauncher.test.ts index e1fe69ee..1fa39617 100644 --- a/neode-ui/src/stores/__tests__/appLauncher.test.ts +++ b/neode-ui/src/stores/__tests__/appLauncher.test.ts @@ -44,9 +44,9 @@ describe('useAppLauncherStore', () => { // Port 8083 maps to /app/filebrowser/ — should route to session store.open({ url: 'http://192.168.1.228:8083', title: 'FileBrowser' }) - // Legacy overlay should NOT open — routed to session view instead + // Default panel mode: sets panelAppId, doesn't open overlay expect(store.isOpen).toBe(false) - expect(mockPush).toHaveBeenCalledWith({ name: 'app-session', params: { appId: 'filebrowser' } }) + expect(store.panelAppId).toBe('filebrowser') expect(mockWindowOpen).not.toHaveBeenCalled() }) @@ -56,7 +56,7 @@ describe('useAppLauncherStore', () => { store.open({ url: 'http://192.168.1.228:23000', title: 'BTCPay' }) expect(store.isOpen).toBe(false) - expect(mockPush).toHaveBeenCalledWith({ name: 'app-session', params: { appId: 'btcpay' } }) + expect(store.panelAppId).toBe('btcpay-server') }) it('routes Home Assistant (port 8123) to full-page session', () => { @@ -65,7 +65,7 @@ describe('useAppLauncherStore', () => { store.open({ url: 'http://192.168.1.228:8123', title: 'Home Assistant' }) expect(store.isOpen).toBe(false) - expect(mockPush).toHaveBeenCalled() + expect(store.panelAppId).toBeTruthy() }) it('routes Grafana (port 3000) to full-page session', () => { @@ -74,7 +74,7 @@ describe('useAppLauncherStore', () => { store.open({ url: 'http://192.168.1.228:3000', title: 'Grafana' }) expect(store.isOpen).toBe(false) - expect(mockPush).toHaveBeenCalled() + expect(store.panelAppId).toBeTruthy() }) it('opens in new tab when openInNewTab flag is set for unknown URL', () => { @@ -101,9 +101,9 @@ describe('useAppLauncherStore', () => { store.open({ url: 'http://192.168.1.228:8083', title: 'FileBrowser' }) - // Known port — routes to full-page session + // Known port — routes to session (panel mode by default) expect(store.isOpen).toBe(false) - expect(mockPush).toHaveBeenCalledWith({ name: 'app-session', params: { appId: 'filebrowser' } }) + expect(store.panelAppId).toBe('filebrowser') }) it('opens unknown URL in iframe overlay on HTTP', () => {