mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-23 23:02:22 +00:00
Update project-map.component.spec.ts
This commit is contained in:
parent
46ef26931d
commit
2f1f6b5a35
@ -1,7 +1,7 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ProjectMapComponent } from './project-map.component';
|
||||
import { MatIconModule, MatToolbarModule, MatMenuModule, MatCheckboxModule } from '@angular/material';
|
||||
import { MatIconModule, MatToolbarModule, MatMenuModule, MatCheckboxModule, MatDialogModule } from '@angular/material';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { ServerService } from '../../services/server.service';
|
||||
import { ProjectService } from '../../services/project.service';
|
||||
@ -20,7 +20,7 @@ import { DrawingsDataSource } from '../../cartography/datasources/drawings-datas
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { ANGULAR_MAP_DECLARATIONS } from '../../cartography/angular-map.imports';
|
||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { MockedSettingsService } from '../../services/settings.service.spec';
|
||||
import { MockedServerService } from '../../services/server.service.spec';
|
||||
import { MockedProjectService } from '../../services/project.service.spec';
|
||||
@ -52,6 +52,7 @@ import { MapSettingService } from '../../services/mapsettings.service';
|
||||
import { ProjectMapMenuComponent } from './project-map-menu/project-map-menu.component';
|
||||
import { MockedToasterService } from '../../services/toaster.service.spec';
|
||||
import { ToasterService } from '../../services/toaster.service';
|
||||
import { MockedActivatedRoute } from '../snapshots/list-of-snapshots/list-of-snaphshots.component.spec';
|
||||
|
||||
export class MockedProgressService {
|
||||
public activate() {}
|
||||
@ -202,6 +203,7 @@ describe('ProjectMapComponent', () => {
|
||||
let linksDataSource = new MockedLinksDataSource();
|
||||
let mockedToasterService = new MockedToasterService();
|
||||
let nodeCreatedLabelStylesFixer;
|
||||
let mockedRouter = new MockedActivatedRoute;
|
||||
|
||||
beforeEach(async(() => {
|
||||
nodeCreatedLabelStylesFixer = {
|
||||
@ -209,7 +211,7 @@ describe('ProjectMapComponent', () => {
|
||||
};
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatIconModule, MatToolbarModule, MatMenuModule, MatCheckboxModule, CommonModule, NoopAnimationsModule],
|
||||
imports: [MatIconModule, MatDialogModule, MatToolbarModule, MatMenuModule, MatCheckboxModule, CommonModule, NoopAnimationsModule],
|
||||
providers: [
|
||||
{ provide: ActivatedRoute },
|
||||
{ provide: ServerService, useClass: MockedServerService },
|
||||
@ -245,7 +247,8 @@ describe('ProjectMapComponent', () => {
|
||||
{ provide: NodeCreatedLabelStylesFixer, useValue: nodeCreatedLabelStylesFixer},
|
||||
{ provide: MapScaleService },
|
||||
{ provide: NodeCreatedLabelStylesFixer, useValue: nodeCreatedLabelStylesFixer},
|
||||
{ provide: ToasterService, useValue: mockedToasterService }
|
||||
{ provide: ToasterService, useValue: mockedToasterService },
|
||||
{ provide: Router, useValue: mockedRouter }
|
||||
],
|
||||
declarations: [ProjectMapComponent, ProjectMapMenuComponent, D3MapComponent, ...ANGULAR_MAP_DECLARATIONS],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
|
Loading…
Reference in New Issue
Block a user