mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-24 07:06:38 +00:00
Tests added
This commit is contained in:
parent
b4bbd97a40
commit
6dbce19481
@ -185,6 +185,7 @@ describe('ProjectMapComponent', () => {
|
||||
let nodesDataSource = new MockedNodesDataSource();
|
||||
let linksDataSource = new MockedLinksDataSource();
|
||||
let nodeCreatedLabelStylesFixer;
|
||||
let mapSettingService = new MapSettingService();
|
||||
|
||||
beforeEach(async(() => {
|
||||
nodeCreatedLabelStylesFixer = {
|
||||
@ -222,7 +223,7 @@ describe('ProjectMapComponent', () => {
|
||||
useClass: RecentlyOpenedProjectService
|
||||
},
|
||||
{ provide: NodeCreatedLabelStylesFixer, useValue: nodeCreatedLabelStylesFixer},
|
||||
{ provide: MapSettingService }
|
||||
{ provide: MapSettingService, useValue: mapSettingService }
|
||||
],
|
||||
declarations: [ProjectMapComponent, D3MapComponent, ...ANGULAR_MAP_DECLARATIONS],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
@ -261,4 +262,12 @@ describe('ProjectMapComponent', () => {
|
||||
|
||||
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…
Reference in New Issue
Block a user