From c69698ec84208d33bd877f1cc286f77584532e4e Mon Sep 17 00:00:00 2001 From: 4gray Date: Wed, 13 Jan 2021 22:33:54 +0100 Subject: [PATCH] test: fix tests --- src/app/app.component.ts | 35 ++++++++----------- .../epg-list/epg-list.component.spec.ts | 4 +-- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 3d75f3318..9af594cf6 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -59,31 +59,26 @@ export class AppComponent { }); }); - this.electronService.ipcRenderer - .on(EPG_FETCH_DONE, () => { - this.ngZone.run(() => { - this.channelStore.update((store) => ({ - ...store, - epgAvailable: true, - })); - this.snackBar.open( - 'EPG was successfully downloaded!', - null, - { - duration: 2000, - verticalPosition: 'bottom', - horizontalPosition: 'right', - } - ); - }); - }) - .on(EPG_ERROR, () => { - this.snackBar.open('EPG Error: something went wrong...', null, { + this.electronService.ipcRenderer.on(EPG_FETCH_DONE, () => { + this.ngZone.run(() => { + this.channelStore.update((store) => ({ + ...store, + epgAvailable: true, + })); + this.snackBar.open('EPG was successfully downloaded!', null, { duration: 2000, verticalPosition: 'bottom', horizontalPosition: 'right', }); }); + }); + this.electronService.ipcRenderer.on(EPG_ERROR, () => { + this.snackBar.open('EPG Error: something went wrong...', null, { + duration: 2000, + verticalPosition: 'bottom', + horizontalPosition: 'right', + }); + }); if ( (this.electronService.remote.process.platform === 'linux' || diff --git a/src/app/player/components/epg-list/epg-list.component.spec.ts b/src/app/player/components/epg-list/epg-list.component.spec.ts index c1e974cd8..9a1859ae1 100644 --- a/src/app/player/components/epg-list/epg-list.component.spec.ts +++ b/src/app/player/components/epg-list/epg-list.component.spec.ts @@ -2,8 +2,8 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { EpgListComponent } from './epg-list.component'; import { MatListModule } from '@angular/material/list'; import { MockModule } from 'ng-mocks'; -import { ElectronService } from 'app/services/electron.service'; -import { ElectronServiceStub } from 'app/home/home.component.spec'; +import { ElectronService } from '../../../services/electron.service'; +import { ElectronServiceStub } from '../../../home/home.component.spec'; describe('EpgListComponent', () => { let component: EpgListComponent;