mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-09 18:51:34 +00:00
Tests added
This commit is contained in:
parent
b4bbd97a40
commit
6dbce19481
@ -185,6 +185,7 @@ describe('ProjectMapComponent', () => {
|
|||||||
let nodesDataSource = new MockedNodesDataSource();
|
let nodesDataSource = new MockedNodesDataSource();
|
||||||
let linksDataSource = new MockedLinksDataSource();
|
let linksDataSource = new MockedLinksDataSource();
|
||||||
let nodeCreatedLabelStylesFixer;
|
let nodeCreatedLabelStylesFixer;
|
||||||
|
let mapSettingService = new MapSettingService();
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
nodeCreatedLabelStylesFixer = {
|
nodeCreatedLabelStylesFixer = {
|
||||||
@ -222,7 +223,7 @@ describe('ProjectMapComponent', () => {
|
|||||||
useClass: RecentlyOpenedProjectService
|
useClass: RecentlyOpenedProjectService
|
||||||
},
|
},
|
||||||
{ provide: NodeCreatedLabelStylesFixer, useValue: nodeCreatedLabelStylesFixer},
|
{ provide: NodeCreatedLabelStylesFixer, useValue: nodeCreatedLabelStylesFixer},
|
||||||
{ provide: MapSettingService }
|
{ provide: MapSettingService, useValue: mapSettingService }
|
||||||
],
|
],
|
||||||
declarations: [ProjectMapComponent, D3MapComponent, ...ANGULAR_MAP_DECLARATIONS],
|
declarations: [ProjectMapComponent, D3MapComponent, ...ANGULAR_MAP_DECLARATIONS],
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
@ -261,4 +262,12 @@ describe('ProjectMapComponent', () => {
|
|||||||
|
|
||||||
expect(component.resetDrawToolChoice).toHaveBeenCalled();
|
expect(component.resetDrawToolChoice).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should call map settings service when lock value was changed', () => {
|
||||||
|
spyOn(mapSettingService, 'changeMapLockValue');
|
||||||
|
|
||||||
|
component.changeLockValue();
|
||||||
|
|
||||||
|
expect(mapSettingService.changeMapLockValue).toHaveBeenCalled();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user