/*
 * Copyright (C) 2018 Robert Bosch GmbH Copyright (C) 2018 Robert Bosch Manufacturing Solutions GmbH, Germany. All rights reserved.
 */

import { OverlayModule } from '@angular/cdk/overlay';
import { PortalModule } from '@angular/cdk/portal';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { MatBadgeModule } from '@angular/material/badge';
import { MatExpansionModule } from '@angular/material/expansion';
import { MatIconModule } from '@angular/material/icon';
import { MatListModule } from '@angular/material/list';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatTooltipModule } from '@angular/material/tooltip';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { of } from 'rxjs';
import { BreadcrumbsModule } from '../../../shared/breadcrumbs/breadcrumbs.module';
import { BreadcrumbsService } from '../../breadcrumbs.service';
import { BciBannerComponent } from '../bci-banner/bci-banner.component';
import { BciBurgerComponent } from '../bci-burger/bci-burger.component';
import { BciContentComponent } from '../bci-content/bci-content.component';
import { BciHeaderComponent } from '../bci-header/bci-header.component';
import { BciLoaderComponent } from '../bci-loader/bci-loader.component';
import { BciLoaderService } from '../bci-loader/bci-loader.service';
import { BciSidebarExpanderComponent } from '../bci-sidebar-expander/bci-sidebar-expander.component';
import { BciSidebarFooterComponent } from '../bci-sidebar-footer/bci-sidebar-footer.component';
import { BciSidebarNavItemComponent } from '../bci-sidebar-nav-item/bci-sidebar-nav-item.component';
import { BciSidebarNavListComponent } from '../bci-sidebar-nav-list/bci-sidebar-nav-list.component';
import { BciSidebarComponent } from '../bci-sidebar/bci-sidebar.component';
import { BciSidebarService } from '../bci-sidebar/bci-sidebar.service';
import { BCI_LAYOUT_INTL_PROVIDER } from '../layout-intl';

import { BciAppComponent } from './bci-app.component';

describe('BciAppComponent', () => {
  let component: BciAppComponent;
  let fixture: ComponentFixture<BciAppComponent>;

  beforeEach(
    waitForAsync(() => {
      TestBed.configureTestingModule({
        imports: [
          NoopAnimationsModule,
          RouterTestingModule,
          BreadcrumbsModule,
          /* Angular Material */
          MatSidenavModule,
          MatExpansionModule,
          MatIconModule,
          MatListModule,
          MatBadgeModule,
          MatTooltipModule,
          /* CDK */
          OverlayModule,
          PortalModule,
        ],
        declarations: [
          BciHeaderComponent,
          BciContentComponent,
          BciBurgerComponent,
          BciSidebarComponent,
          BciSidebarFooterComponent,
          BciSidebarExpanderComponent,
          BciLoaderComponent,
          BciSidebarNavItemComponent,
          BciSidebarNavListComponent,
          BciBannerComponent,
          BciAppComponent,
        ],
        providers: [
          BciLoaderService,
          BciSidebarService,
          BCI_LAYOUT_INTL_PROVIDER,
      { provide: BreadcrumbsService, useValue: { breadcrumbs: of([]), getShowOrHideBreadcrumbs: () => {return false}, 
      // eslint-disable-next-line no-empty-function
      setShowOrHideBreadcrumbs: () => {}} },
        ],
      }).compileComponents();
    })
  );

  beforeEach(() => {
    fixture = TestBed.createComponent(BciAppComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
