mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-04-18 23:36:53 +00:00
Fix tests
This commit is contained in:
parent
e9487c5ada
commit
de058e175b
@ -215,6 +215,7 @@ import { DefaultLayoutComponent } from './layouts/default-layout/default-layout.
|
||||
import { MATERIAL_IMPORTS } from './material.imports';
|
||||
import { ServerResolve } from './resolvers/server-resolve';
|
||||
import { ApplianceService } from './services/appliances.service';
|
||||
import { ProtocolHandlerService } from './services/protocol-handler.service';
|
||||
import { BuiltInTemplatesConfigurationService } from './services/built-in-templates-configuration.service';
|
||||
import { BuiltInTemplatesService } from './services/built-in-templates.service';
|
||||
import { ComputeService } from './services/compute.service';
|
||||
@ -238,7 +239,6 @@ import { NodeService } from './services/node.service';
|
||||
import { NodeConsoleService } from './services/nodeConsole.service';
|
||||
import { NotificationService } from './services/notification.service';
|
||||
import { PacketCaptureService } from './services/packet-capture.service';
|
||||
import { ProtocolHandlerService } from './services/protocol-handler.service';
|
||||
import { PlatformService } from './services/platform.service';
|
||||
import { ProjectService } from './services/project.service';
|
||||
import { QemuConfigurationService } from './services/qemu-configuration.service';
|
||||
|
@ -6,6 +6,7 @@ import { MatMenuModule } from '@angular/material/menu';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { ToasterService } from '../../../services/toaster.service';
|
||||
import { ProtocolHandlerService } from '../../../services/protocol-handler.service';
|
||||
import { of } from 'rxjs';
|
||||
import { NodesDataSource } from '../../../cartography/datasources/nodes-datasource';
|
||||
import { ProjectWebServiceHandler, WebServiceMessage } from '../../../handlers/project-web-service-handler';
|
||||
@ -38,6 +39,7 @@ describe('LogConsoleComponent', () => {
|
||||
let nodeConsoleService: NodeConsoleService;
|
||||
let mapSettingsService: MapSettingsService;
|
||||
let toasterService: ToasterService;
|
||||
let protocolHandlerService: ProtocolHandlerService;
|
||||
|
||||
let httpServer = new HttpServer({} as HttpClient, {} as ServerErrorHandler);
|
||||
|
||||
@ -52,6 +54,7 @@ describe('LogConsoleComponent', () => {
|
||||
{ provide: HttpServer, useValue: httpServer },
|
||||
NodeConsoleService,
|
||||
ToasterService,
|
||||
ProtocolHandlerService,
|
||||
MapSettingsService
|
||||
],
|
||||
declarations: [LogConsoleComponent],
|
||||
@ -59,6 +62,7 @@ describe('LogConsoleComponent', () => {
|
||||
}).compileComponents();
|
||||
|
||||
toasterService = TestBed.inject(ToasterService);
|
||||
protocolHandlerService = TestBed.inject(ProtocolHandlerService);
|
||||
mapSettingsService = TestBed.inject(MapSettingsService);
|
||||
nodeConsoleService = TestBed.inject(NodeConsoleService);
|
||||
}));
|
||||
|
@ -17,6 +17,7 @@ import { ToasterService } from '../../../../services/toaster.service';
|
||||
import { MockedToasterService } from '../../../../services/toaster.service.spec';
|
||||
import { MockedLinkService, MockedNodesDataSource } from '../../project-map.component.spec';
|
||||
import { StartCaptureDialogComponent } from './start-capture.component';
|
||||
import { ProtocolHandlerService } from '../../../../services/protocol-handler.service';
|
||||
|
||||
describe('StartCaptureDialogComponent', () => {
|
||||
let component: StartCaptureDialogComponent;
|
||||
@ -25,6 +26,8 @@ describe('StartCaptureDialogComponent', () => {
|
||||
let mockedToasterService = new MockedToasterService();
|
||||
let mockedLinkService = new MockedLinkService();
|
||||
let mockedNodesDataSource = new MockedNodesDataSource();
|
||||
let protocolHandlerService: ProtocolHandlerService;
|
||||
|
||||
let dialogRef = {
|
||||
close: jasmine.createSpy('close'),
|
||||
};
|
||||
@ -49,10 +52,13 @@ describe('StartCaptureDialogComponent', () => {
|
||||
{ provide: LinkService, useValue: mockedLinkService },
|
||||
{ provide: NodesDataSource, useValue: mockedNodesDataSource },
|
||||
{ provide: PacketCaptureService },
|
||||
ProtocolHandlerService,
|
||||
],
|
||||
declarations: [StartCaptureDialogComponent],
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
}).compileComponents();
|
||||
|
||||
protocolHandlerService = TestBed.inject(ProtocolHandlerService);
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user