test(stalker): mark typed session fixtures current

This commit is contained in:
4gray committed 2026-07-27 12:45:31 +02:00
1 parent cb199b6e52
commit 87faef7463
3 files changed
+26 -15

No files matched your search

@@ -1,4 +1,5 @@
import { DataService } from '@iptvnator/services';
import { STALKER_RECIPE_CLASSIFIER_VERSION } from '@iptvnator/portal/stalker/protocol';
import {
PlaylistMeta,
STALKER_REQUEST,
@@ -109,6 +110,9 @@ describe('loadFullItvChannelList', () => {
{
...PLAYLIST,
isFullStalkerPortal: true,
stalkerRecipeClassifierVersion:
STALKER_RECIPE_CLASSIFIER_VERSION,
stalkerRequestRecipe: 'full-session',
},
jest.fn(),
{
@@ -119,20 +123,21 @@ describe('loadFullItvChannelList', () => {
).resolves.toBe('error');
expect(sendIpcEvent).not.toHaveBeenCalled();
expect(makeAuthenticatedRequest.mock.calls.map(([, params]) => params))
.toEqual([
{
action: StalkerPortalActions.GetAllChannels,
type: 'itv',
},
{
action: StalkerPortalActions.GetOrderedList,
category: '*',
genre: '*',
p: 1,
sortby: 'number',
type: 'itv',
},
]);
expect(
makeAuthenticatedRequest.mock.calls.map(([, params]) => params)
).toEqual([
{
action: StalkerPortalActions.GetAllChannels,
type: 'itv',
},
{
action: StalkerPortalActions.GetOrderedList,
category: '*',
genre: '*',
p: 1,
sortby: 'number',
type: 'itv',
},
]);
});
});
@@ -11,6 +11,7 @@ import {
STALKER_SESSION_APPLICATION_OPERATIONS,
StalkerPortalActions,
} from '@iptvnator/shared/interfaces';
import { STALKER_RECIPE_CLASSIFIER_VERSION } from '@iptvnator/portal/stalker/protocol';
import { StalkerSessionService } from '../../stalker-session.service';
import { withStalkerPlayer } from './with-stalker-player.feature';
@@ -311,6 +312,8 @@ describe('withStalkerPlayer', () => {
store.setCurrentPlaylist({
...PLAYLIST,
isFullStalkerPortal: true,
stalkerRecipeClassifierVersion: STALKER_RECIPE_CLASSIFIER_VERSION,
stalkerRequestRecipe: 'full-session',
userAgent: 'renderer-user-agent',
referrer: 'https://portal.example/referrer',
origin: 'https://portal.example',
@@ -1,5 +1,6 @@
import { TestBed } from '@angular/core/testing';
import { signalStore } from '@ngrx/signals';
import { STALKER_RECIPE_CLASSIFIER_VERSION } from '@iptvnator/portal/stalker/protocol';
import { DataService, RuntimeCapabilitiesService } from '@iptvnator/services';
import { PlaylistMeta, STALKER_REQUEST } from '@iptvnator/shared/interfaces';
import { StalkerSessionService } from '../../stalker-session.service';
@@ -130,6 +131,8 @@ describe('withStalkerPortal', () => {
const fullPlaylist = {
...PLAYLIST,
isFullStalkerPortal: true,
stalkerRecipeClassifierVersion: STALKER_RECIPE_CLASSIFIER_VERSION,
stalkerRequestRecipe: 'full-session' as const,
};
const response = { js: [{ id: 'vod' }] };
stalkerSession.makeAuthenticatedRequest.mockResolvedValue(response);