test: fix tests

This commit is contained in:
4gray committed 2021-01-13 22:33:54 +01:00
1 parent e896af0373
commit c69698ec84
2 files changed
+17 -22

No files matched your search

+15 -20
View File
@@ -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' ||
@@ -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;