test: fix tests

This commit is contained in:
4gray committed 2021-01-31 23:25:36 +01:00
1 parent 2e861b6a1f
commit cb7786a98d
4 files changed
+26 -18

No files matched your search

@@ -99,12 +99,14 @@ describe('ChannelListContainerComponent', () => {
component.groupedChannels[
MOCKED_PLAYLIST.playlist.items[0].group.title
][0]
).toEqual({
id: MOCKED_PLAYLIST.playlist.items[0].url,
name: MOCKED_PLAYLIST.playlist.items[0].name,
group: MOCKED_PLAYLIST.playlist.items[0].group,
url: MOCKED_PLAYLIST.playlist.items[0].url,
});
).toEqual(
expect.objectContaining({
id: MOCKED_PLAYLIST.playlist.items[0].url,
name: MOCKED_PLAYLIST.playlist.items[0].name,
group: MOCKED_PLAYLIST.playlist.items[0].group,
url: MOCKED_PLAYLIST.playlist.items[0].url,
})
);
// check second group
expect(
@@ -116,12 +118,14 @@ describe('ChannelListContainerComponent', () => {
component.groupedChannels[
MOCKED_PLAYLIST.playlist.items[2].group.title
][0]
).toEqual({
id: MOCKED_PLAYLIST.playlist.items[2].url,
name: MOCKED_PLAYLIST.playlist.items[2].name,
group: MOCKED_PLAYLIST.playlist.items[2].group,
url: MOCKED_PLAYLIST.playlist.items[2].url,
});
).toEqual(
expect.objectContaining({
id: MOCKED_PLAYLIST.playlist.items[2].url,
name: MOCKED_PLAYLIST.playlist.items[2].name,
group: MOCKED_PLAYLIST.playlist.items[2].group,
url: MOCKED_PLAYLIST.playlist.items[2].url,
})
);
});
it('should set favorites list', () => {
@@ -4,7 +4,7 @@ import { EpgProgram } from '../../models/epg-program.model';
import * as moment from 'moment';
import { ElectronService } from '../../../services/electron.service';
import { EPG_GET_PROGRAM_DONE } from '../../../shared/ipc-commands';
import { ChannelStore } from 'app/state';
import { ChannelStore } from '../../../state';
interface EpgData {
channel: EpgChannel;
+1 -1
View File
@@ -4,7 +4,7 @@ import { EPG_GET_PROGRAM } from '../shared/ipc-commands';
import { ElectronService } from '../services/electron.service';
import { Channel } from './channel.model';
import * as moment from 'moment';
import { EpgProgram } from 'app/player/models/epg-program.model';
import { EpgProgram } from '../player/models/epg-program.model';
export interface ChannelState extends EntityState<Channel> {
active: Channel;
+8 -4
View File
@@ -18,7 +18,8 @@
"language": "",
"country": "",
"logo": "",
"url": ""
"url": "",
"rec": ""
},
"group": {
"title": "news\r"
@@ -38,7 +39,8 @@
"language": "",
"country": "",
"logo": "",
"url": ""
"url": "",
"rec": ""
},
"group": {
"title": "news\r"
@@ -58,7 +60,8 @@
"language": "",
"country": "",
"logo": "",
"url": ""
"url": "",
"rec": ""
},
"group": {
"title": "category 2\r"
@@ -78,7 +81,8 @@
"language": "",
"country": "",
"logo": "",
"url": ""
"url": "",
"rec": ""
},
"group": {
"title": "category 2\r"