Retain media sessions admitted after installed app state arrives

This commit is contained in:
archipelago
2026-10-07 02:20:49 -04:00
parent fdc596854e
commit 49232fd547
6 changed files with 80 additions and 7 deletions
@@ -20,7 +20,7 @@ vi.mock('vue-router', () => ({
}))
vi.mock('@/stores/appLauncher', () => ({
useAppLauncherStore: () => ({ panelAppId: null }),
useAppLauncherStore: () => ({ panelAppId: null, mediaSessionGeneration: () => null, retainMediaSession: () => false }),
}))
vi.mock('@/stores/app', () => ({
@@ -5,7 +5,7 @@ import { beforeEach, afterEach, describe, expect, it, vi } from 'vitest'
import AppSession from '../AppSession.vue'
import { useAppStore } from '@/stores/app'
vi.mock('vue-router', () => ({ useRoute: () => ({ params: { appId: 'indeedhub' }, query: {}, fullPath: '/dashboard/app-session/indeedhub' }), useRouter: () => ({ replace: vi.fn(() => Promise.resolve()), push: vi.fn(() => Promise.resolve()) }) }))
vi.mock('@/stores/appLauncher', () => ({ useAppLauncherStore: () => ({ panelAppId: null }) }))
vi.mock('@/stores/appLauncher', () => ({ useAppLauncherStore: () => ({ panelAppId: null, mediaSessionGeneration: () => null, retainMediaSession: () => false }) }))
vi.mock('@/stores/app', async () => {
const { reactive } = await import('vue')
const state = reactive({ data: { 'package-data': {} } })