import { NgxSpinnerModule } from 'ngx-spinner';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { provideHttpClient } from '@angular/common/http';
import { TestBed, waitForAsync } from '@angular/core/testing';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { DatePipe, DecimalPipe, CommonModule } from '@angular/common';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { AlertComponent } from '../components/alert';
import { LoginComponent } from './login.component';
import { AppRoutesModule } from '../app.routes.module';
import { BreadcrumbService } from '../breadcrumb.service';
import { ChangePwdComponent } from './changepwd.component';
import { IdleMonitorService } from '../idleMonitor.service';
import { ServicesModule } from '../../providers/services.module';
import { FunctionService } from '../components/models/function.service';

describe('LoginComponent', () =>
{
  beforeEach(waitForAsync(() =>
  {
    TestBed.configureTestingModule({
      imports: [
        BrowserAnimationsModule,
        AppRoutesModule,
        FormsModule,
        ReactiveFormsModule,
        CommonModule,
        ServicesModule,
        AlertComponent,
        NgbModule,
        NgxSpinnerModule,
        LoginComponent,
        ChangePwdComponent
      ],
      providers: [
        provideHttpClient(),
        DatePipe,
        DecimalPipe,
        FunctionService,
        BreadcrumbService,
        IdleMonitorService
      ]
    }).compileComponents();
  }));
  it('Component created successfully...', waitForAsync(() =>
  {
    const fixture = TestBed.createComponent(LoginComponent);
    const app = fixture.debugElement.componentInstance;
    expect(app).toBeTruthy();
  }));
});
