mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-05-06 02:28:25 +00:00
Fix tests for AppComponent
This commit is contained in:
parent
2e0eae5602
commit
9c2f8eeda6
@ -59,8 +59,8 @@ describe('AppComponent', () => {
|
|||||||
component.ngOnInit();
|
component.ngOnInit();
|
||||||
settingsService.set('crash_reports', false);
|
settingsService.set('crash_reports', false);
|
||||||
expect(spy.send).toHaveBeenCalled();
|
expect(spy.send).toHaveBeenCalled();
|
||||||
expect(spy.send.calls.first().args[0]).toEqual('settings.changed');
|
expect(spy.send.calls.mostRecent().args[0]).toEqual('settings.changed');
|
||||||
expect(spy.send.calls.first().args[1].crash_reports).toEqual(false);
|
expect(spy.send.calls.mostRecent().args[1].crash_reports).toEqual(false);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should receive changed settings and do not forward to electron', async(() => {
|
it('should receive changed settings and do not forward to electron', async(() => {
|
||||||
|
@ -25,7 +25,6 @@ export class AppComponent implements OnInit {
|
|||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
if (this.electronService.isElectronApp) {
|
if (this.electronService.isElectronApp) {
|
||||||
this.settingsService.subscribe((settings) => {
|
this.settingsService.subscribe((settings) => {
|
||||||
console.log("settings changed on angular");
|
|
||||||
this.electronService.ipcRenderer.send('settings.changed', settings);
|
this.electronService.ipcRenderer.send('settings.changed', settings);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user