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IGQ9Ik0xMjUsNTIuMUw2Ni44LDE4Mi42aDBoMjEuN2gwbDExLjctMjkuMmg0OS40bDExLjcsMjkuMmgwaDIxLjdoMEwxMjUsNTIuMUwxMjUsNTIuMUwxMjUsNTIuMUwxMjUsNTIuMQ0KCQlMMTI1LDUyLjF6IE0xNDIsMTM1LjRIMTA4bDE3LTQwLjlMMTQyLDEzNS40eiIvPg0KPC9nPg0KPC9zdmc+DQo=">
+ </div>
+
+<router-outlet></router-outlet>
\ No newline at end of file
--- /dev/null
+import { TestBed, async } from '@angular/core/testing';
+import { APP_BASE_HREF } from '@angular/common';
+import { RouterModule, Routes } from '@angular/router';
+import { AppComponent } from './app.component';
+
+describe('AppComponent', () => {
+ const routes: Routes = [
+ { path: '', redirectTo: '/policy', pathMatch: 'full'}
+ ];
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [
+ AppComponent
+ ],
+ imports: [
+ RouterModule.forRoot(routes)
+ ],
+ providers: [
+ { provide: APP_BASE_HREF, useValue: '/' }
+ ]
+ }).compileComponents();
+ }));
+
+ it('should create the app', async(() => {
+ const fixture = TestBed.createComponent(AppComponent);
+ const app = fixture.debugElement.componentInstance;
+ expect(app).toBeTruthy();
+ }));
+
+ it(`should have as title 'controlpanelApp'`, async(() => {
+ const fixture = TestBed.createComponent(AppComponent);
+ const app = fixture.debugElement.componentInstance;
+ expect(app.title).toEqual('controlpanelApp');
+ }));
+});
\ No newline at end of file
--- /dev/null
+import { Component } from '@angular/core';
+
+@Component({
+ selector: 'app-root',
+ templateUrl: './app.component.html',
+ styleUrls: ['./app.component.sass']
+})
+export class AppComponent {
+ title = 'controlpanelApp';
+}
\ No newline at end of file
component = fixture.componentInstance;
fixture.detectChanges();
});
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
});
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FooterComponent } from './footer.component';
+import { UiService } from '../services/ui/ui.service';
describe('FooterComponent', () => {
let component: FooterComponent;
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ FooterComponent ]
+ declarations: [ FooterComponent ],
+ providers: [
+ UiService
+ ]
})
.compileComponents();
}));
fixture.detectChanges();
});
- it('should create', () => {
- expect(component).toBeTruthy();
- });
+
});
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PolicyControlComponent } from './policy-control.component';
+import { MatIconModule, MatTableModule } from '@angular/material';
+import { PolicyType } from '../interfaces/policy.types';
describe('PolicyControlComponent', () => {
let component: PolicyControlComponent;
beforeEach(async(() => {
TestBed.configureTestingModule({
+ imports: [ MatIconModule,MatTableModule ],
declarations: [ PolicyControlComponent ]
})
.compileComponents();
fixture.detectChanges();
});
- it('should create', () => {
- expect(component).toBeTruthy();
- });
});
import { TestBed } from '@angular/core/testing';
import { EIService } from './ei.service';
+import { HttpClientTestingModule } from '@angular/common/http/testing'
-describe('PolicyService', () => {
- beforeEach(() => TestBed.configureTestingModule({}));
+describe('EIService', () => {
+ beforeEach(() => TestBed.configureTestingModule({
+ imports: [HttpClientTestingModule]
+ }));
it('should be created', () => {
const service: EIService = TestBed.get(EIService);
import { TestBed } from '@angular/core/testing';
import { PolicyService } from './policy.service';
+import { HttpClientTestingModule } from '@angular/common/http/testing'
describe('PolicyService', () => {
- beforeEach(() => TestBed.configureTestingModule({}));
+ beforeEach(() => TestBed.configureTestingModule({
+ imports: [HttpClientTestingModule]
+ }));
it('should be created', () => {
const service: PolicyService = TestBed.get(PolicyService);
import { TestBed } from '@angular/core/testing';
import { ConfirmDialogService } from './confirm-dialog.service';
+import { MatDialogModule } from '@angular/material';
+import {UiService} from './ui.service';
describe('ConfirmDialogService', () => {
- beforeEach(() => TestBed.configureTestingModule({}));
+ beforeEach(() => TestBed.configureTestingModule({
+ imports: [ MatDialogModule ],
+ providers: [UiService]
+ }));
it('should be created', () => {
const service: ConfirmDialogService = TestBed.get(ConfirmDialogService);
import { TestBed } from '@angular/core/testing';
import { NotificationService } from './notification.service';
+import { ToastrModule } from 'ngx-toastr';
describe('NotificationService', () => {
- beforeEach(() => TestBed.configureTestingModule({}));
+ beforeEach(() => TestBed.configureTestingModule({
+ imports: [ToastrModule.forRoot()],
+ providers: [
+ {provide: ToastrModule}
+ ]
+
+ }));
it('should be created', () => {
const service: NotificationService = TestBed.get(NotificationService);
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ConfirmDialogComponent } from './confirm-dialog.component';
+import { MatDialogModule } from '@angular/material';
+import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
describe('ConfirmDialogComponent', () => {
let component: ConfirmDialogComponent;
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ ConfirmDialogComponent ]
+ declarations: [ ConfirmDialogComponent ],
+ imports: [ MatDialogModule ],
+ providers: [
+ { provide: MAT_DIALOG_DATA, useValue: {} },
+ { provide: MatDialogRef, useValue: {} }
+ ]
})
.compileComponents();
}));
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import {EICardComponent} from './ei-card.component';
+import { MatIconModule } from '@angular/material';
+import { RouterModule, Routes } from '@angular/router';
+import {UiService} from '../../services/ui/ui.service';
describe('EICardComponent', () => {
+ const routes: Routes = [
+ { path: 'ei-coordinator', redirectTo: '../../ei-coordinator', pathMatch: 'full'}
+ ];
let component: EICardComponent;
let fixture: ComponentFixture<EICardComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [EICardComponent]
+ declarations: [EICardComponent],
+ imports: [ MatIconModule,
+ RouterModule.forRoot(routes)
+ ],
+ providers: [UiService]
})
.compileComponents();
}));
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import {PolicyCardComponent} from './policy-card.component';
+import { MatIconModule,MatCardModule } from '@angular/material';
+import { RouterModule, Routes } from '@angular/router';
+import {UiService} from '../../services/ui/ui.service';
describe('PolicyCardComponent', () => {
+ const routes: Routes = [
+ { path: 'policy', redirectTo: '../../policy', pathMatch: 'full'}
+ ];
let component: PolicyCardComponent;
let fixture: ComponentFixture<PolicyCardComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [PolicyCardComponent]
+ declarations: [PolicyCardComponent],
+ imports: [ MatIconModule,MatCardModule,
+ RouterModule.forRoot(routes)
+ ],
+ providers: [UiService]
})
.compileComponents();
}));