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

import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { FormsModule } from '@angular/forms';
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { AlertService, BciComponentModule, ModalWindowService } from '@bci-web-core/core';
import { of } from 'rxjs';
import { ModalWindowDemoAllFeaturesModalComponent } from './modal-window-demo-all-features-modal.component';

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

  beforeEach(
    waitForAsync(() => {
      TestBed.configureTestingModule({
        imports: [
          NoopAnimationsModule,
          MatDialogModule,
          BciComponentModule,
          MatIconModule,
          FormsModule,
          MatInputModule,
        ],
        providers: [
          { provide: MAT_DIALOG_DATA, useValue: {} },
          {
            provide: MatDialogRef,
            useValue: {
              _containerInstance: {
                _config: {},
              },
              // eslint-disable-next-line no-empty-function
              close: () => {},
              backdropClick: () => of(''),
              keydownEvents: () => of(''),
            },
          },
          AlertService,
          ModalWindowService,
        ],
        declarations: [ModalWindowDemoAllFeaturesModalComponent],
      }).compileComponents();
    })
  );

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

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