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) <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-18 23:27:26 +00:00
parent 165972e75c
commit b8afb10ec6
2 changed files with 8 additions and 8 deletions

View File

@@ -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 | - |

View File

@@ -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', () => {