Fix label of added node (when GUI is not running). Fixes #292

This commit is contained in:
ziajka
2019-04-29 06:38:41 +02:00
parent a4c3bd254b
commit d04aea0f25
5 changed files with 32 additions and 13 deletions

View File

@ -42,6 +42,7 @@ import { Link } from '../../models/link';
import { Project } from '../../models/project';
import { CapturingSettings } from '../../models/capturingSettings';
import { LinkWidget } from '../../cartography/widgets/link';
import { NodeCreatedLabelStylesFixer } from './helpers/node-created-label-styles-fixer';
export class MockedProgressService {
public activate() {}
@ -182,8 +183,13 @@ describe('ProjectMapComponent', () => {
let drawingsDataSource = new MockedDrawingsDataSource();
let nodesDataSource = new MockedNodesDataSource();
let linksDataSource = new MockedLinksDataSource();
let nodeCreatedLabelStylesFixer;
beforeEach(async(() => {
nodeCreatedLabelStylesFixer = {
fix: (node) => node
};
TestBed.configureTestingModule({
imports: [MatIconModule, MatToolbarModule, MatMenuModule, MatCheckboxModule, CommonModule, NoopAnimationsModule],
providers: [
@ -214,6 +220,7 @@ describe('ProjectMapComponent', () => {
provide: RecentlyOpenedProjectService,
useClass: RecentlyOpenedProjectService
},
{ provide: NodeCreatedLabelStylesFixer, useValue: nodeCreatedLabelStylesFixer}
],
declarations: [ProjectMapComponent, D3MapComponent, ...ANGULAR_MAP_DECLARATIONS],
schemas: [NO_ERRORS_SCHEMA]