import 'hammerjs';
import { TranslateLoaderMock, TokenServiceMock, HeaderServiceMock, UserServiceMock } from '../../mocks';
import { async,
     TestBed } from '@angular/core/testing';

import { AppComponent } from './app.component';
import { TranslateLoader, TranslateModule, TranslateService } from '@ngx-translate/core';
import { CoreModule } from '../core';
import { FooterComponent } from '../footer';
import { HeaderComponent } from '../core/components';
import { HeaderService, IMenuItem, LoaderService, TokenService, UserService } from '../core/shared';
import { KnkMaterialModule } from '../knk-material';
import { RouterTestingModule } from '@angular/router/testing';
// import { Router } from '@angular/router/src/router';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

describe('AppComponent', () => {

  // let translateService: TranslateService;
  beforeEach(async(() => {
    // jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
    TestBed.configureTestingModule({
      declarations: [
        AppComponent,
        FooterComponent,
        HeaderComponent
      ],
      imports: [
        TranslateModule.forRoot({
        loader: {
            provide: TranslateLoader,
            useClass: TranslateLoaderMock
        }
        }),
        KnkMaterialModule,
        RouterTestingModule,
        BrowserAnimationsModule
      ],
      providers: [
        { provide: HeaderService, useValue: new HeaderServiceMock() },
        { provide: LoaderService, useValue: new LoaderService() },
        { provide: TokenService, useValue: new TokenServiceMock() },
        { provide: UserService, useValue: new UserServiceMock() }
      ]
    }).compileComponents();
    // translateService = TestBed.get(TranslateService);
  }));
  // it('should create the app', async(() => {
  //    const fixture: any = TestBed.createComponent(AppComponent);
  //    const app: any = fixture.debugElement.componentInstance;
  //   //  expect(app).toBeTruthy();
  // }));
  /*
  it(`should have as title 'app'`, async(() => {
    const fixture = TestBed.createComponent(AppComponent);
    const app = fixture.debugElement.componentInstance;
    expect(app.title).toEqual('app');
  }));
  */
  /*
  it('should render title in a h1 tag', async(() => {
    const fixture = TestBed.createComponent(AppComponent);
    fixture.detectChanges();
    const compiled = fixture.debugElement.nativeElement;
    expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!');
  }));
  */
});
