mirror of
https://github.com/fabioformosa/quartz-manager.git
synced 2026-05-14 22:00:30 +09:00
fixed tests
This commit is contained in:
@@ -2,7 +2,6 @@ import { TestBed, async } from '@angular/core/testing';
|
|||||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||||
import { RouterTestingModule } from '@angular/router/testing';
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { HomeComponent } from './home';
|
|
||||||
import { ManagerComponent } from './manager';
|
import { ManagerComponent } from './manager';
|
||||||
import { LoginComponent } from './login';
|
import { LoginComponent } from './login';
|
||||||
import { MockApiService } from './service/mocks/api.service.mock';
|
import { MockApiService } from './service/mocks/api.service.mock';
|
||||||
@@ -10,7 +9,6 @@ import { MockApiService } from './service/mocks/api.service.mock';
|
|||||||
import { LoginGuard } from './guard';
|
import { LoginGuard } from './guard';
|
||||||
import { NotFoundComponent } from './not-found';
|
import { NotFoundComponent } from './not-found';
|
||||||
import {
|
import {
|
||||||
ApiCardComponent,
|
|
||||||
FooterComponent,
|
FooterComponent,
|
||||||
GithubComponent,
|
GithubComponent,
|
||||||
} from './component';
|
} from './component';
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ describe('AdminGuard', () => {
|
|||||||
{
|
{
|
||||||
provide: Router,
|
provide: Router,
|
||||||
useClass: RouterStub
|
useClass: RouterStub
|
||||||
}
|
},
|
||||||
{
|
{
|
||||||
provide: UserService,
|
provide: UserService,
|
||||||
useClass: MockUserService
|
useClass: MockUserService
|
||||||
|
|||||||
@@ -1,6 +1,21 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
|
import {
|
||||||
|
MatCardModule, MatInputModule, MatProgressSpinnerModule, MatProgressBarModule
|
||||||
|
} from '@angular/material';
|
||||||
import { SignupComponent } from './signup.component';
|
import { SignupComponent } from './signup.component';
|
||||||
|
import { ReactiveFormsModule } from '@angular/forms';
|
||||||
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
|
import {
|
||||||
|
MockUserService,
|
||||||
|
MockApiService
|
||||||
|
} from 'app/service/mocks';
|
||||||
|
import {
|
||||||
|
UserService,
|
||||||
|
AuthService,
|
||||||
|
ApiService,
|
||||||
|
ConfigService
|
||||||
|
} from 'app/service';
|
||||||
|
|
||||||
describe('SignupComponent', () => {
|
describe('SignupComponent', () => {
|
||||||
let component: SignupComponent;
|
let component: SignupComponent;
|
||||||
@@ -8,7 +23,25 @@ describe('SignupComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [ SignupComponent ]
|
declarations: [ SignupComponent ],
|
||||||
|
imports : [RouterTestingModule,
|
||||||
|
BrowserAnimationsModule,
|
||||||
|
MatCardModule,
|
||||||
|
MatInputModule,
|
||||||
|
MatProgressSpinnerModule,
|
||||||
|
MatProgressBarModule,
|
||||||
|
ReactiveFormsModule],
|
||||||
|
providers: [
|
||||||
|
{
|
||||||
|
provide: UserService,
|
||||||
|
useClass: MockUserService
|
||||||
|
},
|
||||||
|
{
|
||||||
|
provide: ApiService,
|
||||||
|
useClass: MockApiService
|
||||||
|
},
|
||||||
|
AuthService,
|
||||||
|
ConfigService]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|||||||
Reference in New Issue
Block a user