mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-11 02:46:16 -08:00
test(stalker): mark typed session fixtures current
This commit is contained in:
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',
|
||||
},
|
||||
]);
|
||||
});
|
||||
});
|
||||
+3
@@ -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',
|
||||
|
||||
+3
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user