Commit f0f4a709 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰

[#164] Missing imports added (failing tests 11 of 38)

parent 4dbd8991
......@@ -6,7 +6,7 @@ import { HaStatusComponent } from '../ha-status/ha-status.component'
import { TableModule } from 'primeng/table'
import { TabViewModule } from 'primeng/tabview'
import { LocaltimePipe } from '../localtime.pipe'
import { DHCPService } from '../backend'
import { DHCPService, ServicesService } from '../backend'
import { HttpClient, HttpHandler } from '@angular/common/http'
import { PanelModule } from 'primeng/panel'
import { TooltipModule } from 'primeng/tooltip'
......@@ -23,6 +23,7 @@ describe('KeaAppTabComponent', () => {
DHCPService,
HttpClient,
HttpHandler,
ServicesService,
LocationStrategy,
{
provide: ActivatedRoute,
......
import { HttpClient, HttpHandler } from '@angular/common/http'
import { async, ComponentFixture, TestBed } from '@angular/core/testing'
import { ActivatedRoute } from '@angular/router'
import { ServicesService } from '../backend'
import { LogViewPageComponent } from './log-view-page.component'
describe('LogViewPageComponent', () => {
......@@ -8,6 +10,13 @@ describe('LogViewPageComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
providers: [
ServicesService, HttpClient, HttpHandler,
{
provide: ActivatedRoute,
useValue: {},
}
],
declarations: [LogViewPageComponent],
}).compileComponents()
}))
......
......@@ -28,6 +28,7 @@ describe('MachinesPageComponent', () => {
ServicesService,
HttpClient,
HttpHandler,
UsersService,
],
declarations: [MachinesPageComponent],
}).compileComponents()
......
......@@ -2,7 +2,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'
import { ProfilePageComponent } from './profile-page.component'
import { HttpClient, HttpHandler } from '@angular/common/http'
import { UsersService } from '../backend'
import { ServicesService, UsersService } from '../backend'
import { Router } from '@angular/router'
import { MessageService } from 'primeng/api'
import { AuthService } from '../auth.service'
......@@ -17,6 +17,7 @@ describe('ProfilePageComponent', () => {
providers: [
MessageService,
UsersService,
ServicesService,
HttpClient,
HttpHandler,
{ provide: Router, useValue: {} },
......
import { TestBed } from '@angular/core/testing'
import { ServerDataService } from './server-data.service'
import { HttpClient, HttpHandler } from '@angular/common/http'
import { Router } from '@angular/router'
import { ServicesService, UsersService } from './backend'
import { MessageService } from 'primeng/api'
describe('ServerDataService', () => {
let service: ServerDataService
beforeEach(() => {
TestBed.configureTestingModule({})
TestBed.configureTestingModule({
providers: [HttpClient, HttpHandler, UsersService, MessageService, ServicesService,
{
provide: Router,
useValue: {}
}]
})
service = TestBed.inject(ServerDataService)
})
......
import { TestBed } from '@angular/core/testing'
import { SettingService } from './setting.service'
import { SettingsService } from './backend'
import { SettingsService, UsersService } from './backend'
import { HttpClient, HttpHandler } from '@angular/common/http'
import { ActivatedRoute, Router } from '@angular/router'
import { MessageService } from 'primeng/api'
describe('SettingService', () => {
beforeEach(() =>
TestBed.configureTestingModule({
providers: [SettingsService, HttpClient, HttpHandler],
providers: [SettingsService, UsersService, MessageService, HttpClient, HttpHandler,
{
provide: Router,
useValue: {}
}],
})
)
......
......@@ -7,9 +7,10 @@ import { TableModule } from 'primeng/table'
import { SubnetBarComponent } from '../subnet-bar/subnet-bar.component'
import { TooltipModule } from 'primeng/tooltip'
import { RouterModule, ActivatedRoute, Router, convertToParamMap } from '@angular/router'
import { DHCPService, SettingsService } from '../backend'
import { DHCPService, SettingsService, UsersService } from '../backend'
import { HttpClient, HttpHandler } from '@angular/common/http'
import { of } from 'rxjs'
import { MessageService } from 'primeng/api'
class MockParamMap {
get(name: string): string | null {
......@@ -27,6 +28,8 @@ describe('SubnetsPageComponent', () => {
DHCPService,
HttpClient,
HttpHandler,
UsersService,
MessageService,
SettingsService,
{
provide: ActivatedRoute,
......
......@@ -3,7 +3,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'
import { UsersPageComponent } from './users-page.component'
import { ActivatedRoute, Router } from '@angular/router'
import { FormBuilder } from '@angular/forms'
import { UsersService } from '../backend'
import { ServicesService, UsersService } from '../backend'
import { HttpClient, HttpHandler } from '@angular/common/http'
import { MessageService } from 'primeng/api'
import { of } from 'rxjs'
......@@ -27,6 +27,7 @@ describe('UsersPageComponent', () => {
UsersService,
HttpClient,
HttpHandler,
ServicesService,
MessageService,
{
provide: ActivatedRoute,
......
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