mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-13 12:36:15 -08:00
fix(playback): harden external launch lifecycle
This commit is contained in:
1 parent
13b1cfe57e
commit
1e8770c049
52 files changed
+5096
-649
No files matched your search
+11
@@ -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;
|
||||
|
||||
+3
-3
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user