mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
test: add selectedCategoryId signal and setSelectedCategory method to manage category selection
This commit is contained in:
1 parent
655fa292ad
commit
062002e91c
1 file changed
+6
@@ -58,6 +58,7 @@ describe('XtreamWorkspaceRouteSession', () => {
|
||||
const playlistId = signal<string | null>(PLAYLIST_ID);
|
||||
const portalStatus = signal<PortalStatusType>('active');
|
||||
const selectedContentType = signal<'live' | 'vod' | 'series'>('vod');
|
||||
const selectedCategoryId = signal<number | null>(null);
|
||||
const contentInitBlockReason =
|
||||
signal<XtreamContentInitBlockReason | null>(null);
|
||||
let hasUsableOfflineCache = false;
|
||||
@@ -93,6 +94,9 @@ describe('XtreamWorkspaceRouteSession', () => {
|
||||
selectedContentType.set(type);
|
||||
}
|
||||
),
|
||||
setSelectedCategory: jest.fn((categoryId: number | null) => {
|
||||
selectedCategoryId.set(categoryId);
|
||||
}),
|
||||
setContentInitBlockReason: jest.fn(
|
||||
(reason: XtreamContentInitBlockReason | null) => {
|
||||
contentInitBlockReason.set(reason);
|
||||
@@ -114,6 +118,7 @@ describe('XtreamWorkspaceRouteSession', () => {
|
||||
playlistId.set(PLAYLIST_ID);
|
||||
portalStatus.set('active');
|
||||
selectedContentType.set('vod');
|
||||
selectedCategoryId.set(null);
|
||||
contentInitBlockReason.set(null);
|
||||
hasUsableOfflineCache = false;
|
||||
|
||||
@@ -138,6 +143,7 @@ describe('XtreamWorkspaceRouteSession', () => {
|
||||
xtreamStore.hasUsableOfflineCache.mockClear();
|
||||
xtreamStore.initializeContent.mockClear();
|
||||
xtreamStore.setSelectedContentType.mockClear();
|
||||
xtreamStore.setSelectedCategory.mockClear();
|
||||
xtreamStore.setContentInitBlockReason.mockClear();
|
||||
|
||||
await TestBed.configureTestingModule({
|
||||
|
||||
Reference in new issue
Block a user