fix(playback): harden external launch lifecycle

This commit is contained in:
4gray committed 2026-08-09 12:52:24 +02:00
1 parent 13b1cfe57e
commit 1e8770c049
52 files changed
+5096 -649

No files matched your search

@@ -1085,6 +1085,17 @@ describe('WorkspaceShellFacade', () => {
expect(externalPlayback.closeSession).not.toHaveBeenCalled();
});
it('handles a rejected external-session close', async () => {
const externalPlayback = TestBed.inject(PORTAL_EXTERNAL_PLAYBACK);
const closeSession = externalPlayback.closeSession as jest.Mock;
closeSession.mockRejectedValueOnce(new Error('close failed'));
facade.closeActiveExternalSession();
await Promise.resolve();
expect(closeSession).toHaveBeenCalledTimes(1);
});
it('waits for embedded MPV support preload before opening the palette', async () => {
const dialog = TestBed.inject(MatDialog) as unknown as {
open: jest.Mock;
@@ -156,9 +156,9 @@ export class WorkspaceShellFacade {
}
closeActiveExternalSession(): void {
void this.externalPlayback.closeSession(
this.externalPlayback.activeSession()
);
void this.externalPlayback
.closeSession(this.externalPlayback.activeSession())
.catch(() => undefined);
}
dismissActiveExternalSession(): void {