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

import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { BciLoaderComponent } from './bci-loader.component';

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

  beforeEach(
    waitForAsync(() => {
      TestBed.configureTestingModule({
        declarations: [BciLoaderComponent],
      }).compileComponents();
    })
  );

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

  afterEach(() => {
    document.body.removeChild(fixture.debugElement.nativeElement);
    fixture.destroy();
    expect(document.querySelectorAll('.loader-background-container').length).toBe(0);
  });

  it('should be created', () => {
    expect(component).toBeTruthy();
    expect(document.querySelectorAll('.loader-background-container').length).toBe(1);
  });
});
