Commit 7a31a106 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰

[#164] Several imports in tests added

parent 1b9a4882
......@@ -6,7 +6,7 @@ import { MenubarModule } from 'primeng/menubar'
import { SplitButtonModule } from 'primeng/splitbutton'
import { ProgressSpinnerModule } from 'primeng/progressspinner'
import { ToastModule } from 'primeng/toast'
import { GeneralService, UsersService, SettingsService } from './backend'
import { GeneralService, UsersService, SettingsService, ServicesService } from './backend'
import { HttpClient, HttpHandler } from '@angular/common/http'
import { MessageService } from 'primeng/api'
......@@ -22,7 +22,7 @@ describe('AppComponent', () => {
ToastModule,
],
declarations: [AppComponent],
providers: [GeneralService, HttpClient, HttpHandler, UsersService, MessageService, SettingsService],
providers: [GeneralService, HttpClient, HttpHandler, UsersService, MessageService, ServicesService, SettingsService],
}).compileComponents()
}))
......
......@@ -4,7 +4,7 @@ import { DashboardComponent } from './dashboard.component'
import { PanelModule } from 'primeng/panel'
import { ButtonModule } from 'primeng/button'
import { Router, RouterModule, ActivatedRoute } from '@angular/router'
import { ServicesService, DHCPService, SettingsService } from '../backend'
import { ServicesService, DHCPService, SettingsService, UsersService } from '../backend'
import { HttpClient, HttpHandler } from '@angular/common/http'
import { MessageService } from 'primeng/api'
import { LocationStrategy } from '@angular/common'
......@@ -24,6 +24,7 @@ describe('DashboardComponent', () => {
LocationStrategy,
DHCPService,
MessageService,
UsersService,
SettingsService,
{
provide: Router,
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing'
import { ActivatedRoute } from '@angular/router'
import { EventsPageComponent } from './events-page.component'
import { EventsService } from '../backend/api/events.service'
describe('EventsPageComponent', () => {
let component: EventsPageComponent
......@@ -8,6 +10,10 @@ describe('EventsPageComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
providers: [ EventsService, {
provide: ActivatedRoute,
useValue: {}
}],
declarations: [EventsPageComponent],
}).compileComponents()
}))
......
......@@ -2,7 +2,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'
import { MachinesPageComponent } from './machines-page.component'
import { ActivatedRoute, Router } from '@angular/router'
import { ServicesService } from '../backend'
import { ServicesService, UsersService } from '../backend'
import { HttpClient, HttpHandler } from '@angular/common/http'
import { MessageService } from 'primeng/api'
import { of } from 'rxjs'
......
import { TestBed } from '@angular/core/testing'
import { ServerDataService } from './server-data.service'
import { HttpClient, HttpHandler } from '@angular/common/http'
describe('ServerDataService', () => {
let service: ServerDataService
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment