definma-ui/src/app/samples/samples.component.spec.ts
2020-08-17 14:51:02 +02:00

78 lines
3.4 KiB
TypeScript

// import { async, ComponentFixture, TestBed } from '@angular/core/testing';
//
// import { SamplesComponent } from './samples.component';
// import {ApiService} from '../services/api.service';
// import {AutocompleteService} from '../services/autocomplete.service';
// import {DataService} from '../services/data.service';
// import {LoginService} from '../services/login.service';
// import {LocalStorageService} from 'angular-2-local-storage';
// import {ModalService, RbUiComponentsModule} from '@inst-iot/bosch-angular-ui-components';
// import {ValidationService} from '../services/validation.service';
// import {RbCustomInputsModule} from '../rb-custom-inputs/rb-custom-inputs.module';
// import {FormsModule} from '@angular/forms';
//
// // TODO
//
// let apiServiceSpy: jasmine.SpyObj<ApiService>;
// let autocompleteServiceSpy: jasmine.SpyObj<AutocompleteService>;
// let modalServiceSpy: jasmine.SpyObj<ModalService>;
// let dataServiceSpy: jasmine.SpyObj<DataService>;
// let loginServiceSpy: jasmine.SpyObj<LoginService>;
// let localStorageServiceSpy: jasmine.SpyObj<LocalStorageService>;
// let windowServiceSpy: jasmine.SpyObj<Window>;
//
//
//
// describe('SamplesComponent', () => {
// let component: SamplesComponent;
// let fixture: ComponentFixture<SamplesComponent>;
//
// beforeEach(async(() => {
// const apiSpy = jasmine.createSpyObj('ApiService', ['post', 'put']);
// const autocompleteSpy = jasmine.createSpyObj('AutocompleteService', ['bind']);
// const loginSpy = jasmine.createSpyObj('LoginService', ['login', 'isLevel']);
// const modalSpy = jasmine.createSpyObj('ModalService', ['open']);
// const dataSpy = jasmine.createSpyObj('DataService', ['load', 'idReload']);
// const localStorageSpy = jasmine.createSpyObj('LocalStorageService', ['set', 'remove']);
// const windowSpy = jasmine.createSpyObj('Window', ['location']);
//
// TestBed.configureTestingModule({
// declarations: [ SamplesComponent ],
// imports: [
// RbUiComponentsModule,
// RbCustomInputsModule,
// FormsModule
// ],
// providers: [
// {provide: ApiService, useValue: apiSpy},
// {provide: AutocompleteService, useValue: autocompleteSpy},
// {provide: ModalService, useValue: modalSpy},
// {provide: DataService, useValue: dataSpy},
// {provide: LoginService, useValue: loginSpy},
// {provide: LocalStorageService, useValue: localStorageSpy},
// {provide: Window, useValue: windowSpy}
// ]
// })
// .compileComponents();
//
// apiServiceSpy = TestBed.inject(ApiService) as jasmine.SpyObj<ApiService>;
// autocompleteServiceSpy = TestBed.inject(AutocompleteService) as jasmine.SpyObj<AutocompleteService>;
// modalServiceSpy = TestBed.inject(ModalService) as jasmine.SpyObj<ModalService>;
// dataServiceSpy = TestBed.inject(DataService) as jasmine.SpyObj<DataService>;
// loginServiceSpy = TestBed.inject(LoginService) as jasmine.SpyObj<LoginService>;
// localStorageServiceSpy = TestBed.inject(LocalStorageService) as jasmine.SpyObj<LocalStorageService>;
// windowServiceSpy = TestBed.inject(Window) as jasmine.SpyObj<Window>;
// }));
//
// beforeEach(() => {
// fixture = TestBed.createComponent(SamplesComponent);
// component = fixture.componentInstance;
// component.ngOnInit();
// fixture.detectChanges();
// });
//
// it('should create', () => {
// expect(component).toBeTruthy();
// });
// });