mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-22 14:22:21 +00:00
Fixing unit tests
This commit is contained in:
parent
cc1d255de9
commit
5b621e9468
@ -36,6 +36,7 @@ import { MapDrawingToDrawingConverter } from '../../cartography/converters/map/m
|
|||||||
import { MapLabelToLabelConverter } from '../../cartography/converters/map/map-label-to-label-converter';
|
import { MapLabelToLabelConverter } from '../../cartography/converters/map/map-label-to-label-converter';
|
||||||
import { SelectionManager } from '../../cartography/managers/selection-manager';
|
import { SelectionManager } from '../../cartography/managers/selection-manager';
|
||||||
import { SelectionTool } from '../../cartography/tools/selection-tool';
|
import { SelectionTool } from '../../cartography/tools/selection-tool';
|
||||||
|
import { RecentlyOpenedProjectService } from '../../services/recentlyOpenedProject.service';
|
||||||
|
|
||||||
export class MockedProgressService {
|
export class MockedProgressService {
|
||||||
public activate() {}
|
public activate() {}
|
||||||
@ -149,7 +150,11 @@ describe('ProjectMapComponent', () => {
|
|||||||
{ provide: SettingsService, useClass: MockedSettingsService },
|
{ provide: SettingsService, useClass: MockedSettingsService },
|
||||||
{ provide: ToolsService },
|
{ provide: ToolsService },
|
||||||
{ provide: SelectionManager },
|
{ provide: SelectionManager },
|
||||||
{ provide: SelectionTool }
|
{ provide: SelectionTool },
|
||||||
|
{
|
||||||
|
provide: RecentlyOpenedProjectService,
|
||||||
|
useClass: RecentlyOpenedProjectService
|
||||||
|
},
|
||||||
],
|
],
|
||||||
declarations: [ProjectMapComponent, D3MapComponent, ...ANGULAR_MAP_DECLARATIONS],
|
declarations: [ProjectMapComponent, D3MapComponent, ...ANGULAR_MAP_DECLARATIONS],
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
|
@ -10,13 +10,14 @@ import { ServerManagementService, ServerStateEvent } from '../../services/server
|
|||||||
import { ToasterService } from '../../services/toaster.service';
|
import { ToasterService } from '../../services/toaster.service';
|
||||||
import { MockedToasterService } from '../../services/toaster.service.spec';
|
import { MockedToasterService } from '../../services/toaster.service.spec';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
|
import { RecentlyOpenedProjectService } from '../../services/recentlyOpenedProject.service';
|
||||||
|
|
||||||
|
|
||||||
class ElectronServiceMock {
|
class ElectronServiceMock {
|
||||||
public isElectronApp: boolean;
|
public isElectronApp: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
fdescribe('DefaultLayoutComponent', () => {
|
describe('DefaultLayoutComponent', () => {
|
||||||
let component: DefaultLayoutComponent;
|
let component: DefaultLayoutComponent;
|
||||||
let fixture: ComponentFixture<DefaultLayoutComponent>;
|
let fixture: ComponentFixture<DefaultLayoutComponent>;
|
||||||
let electronServiceMock: ElectronServiceMock;
|
let electronServiceMock: ElectronServiceMock;
|
||||||
@ -44,6 +45,10 @@ fdescribe('DefaultLayoutComponent', () => {
|
|||||||
provide: ToasterService,
|
provide: ToasterService,
|
||||||
useClass: MockedToasterService
|
useClass: MockedToasterService
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
provide: RecentlyOpenedProjectService,
|
||||||
|
useClass: RecentlyOpenedProjectService
|
||||||
|
},
|
||||||
ProgressService
|
ProgressService
|
||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
Loading…
Reference in New Issue
Block a user