import { ComponentFixture, TestBed } from '@angular/core/testing';
import { HttpClientModule } from '@angular/common/http'; 
import { PxeBootFilesComponent } from './pxe-boot-files.component';
import { ToastrModule } from 'ngx-toastr';
import { MatAccordion, MatExpansionPanel, MatExpansionPanelHeader, MatExpansionPanelTitle, MatExpansionPanelDescription } from '@angular/material/expansion';
import { MatIcon } from '@angular/material/icon';
import { MatDivider } from '@angular/material/divider';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatSelectModule } from '@angular/material/select'; 
import { MatPaginatorModule } from '@angular/material/paginator';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FormsModule, NgControl, ReactiveFormsModule } from '@angular/forms';
import { MatInputModule } from '@angular/material/input';
import { MatTableModule } from '@angular/material/table'; 
import { TranslateModule } from '@ngx-translate/core';
import { JoyrideModule } from 'ngx-joyride';
import { ConfigService } from '@services/config.service';

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

  beforeEach(async () => {
    const mockConfigService = {
      apiUrl: 'http://mock-api-url',
      mercureUrl: 'http://mock-mercure-url'
    };

    await TestBed.configureTestingModule({
      declarations: [PxeBootFilesComponent],
      imports: [
        HttpClientModule, 
        ToastrModule.forRoot(),
        MatAccordion,
        MatExpansionPanel,
        MatExpansionPanelHeader,
        MatExpansionPanelTitle,
        MatExpansionPanelDescription,
        MatIcon,
        MatDivider,
        MatFormFieldModule, 
        MatSelectModule,  
        MatPaginatorModule,  
        BrowserAnimationsModule,
        FormsModule,
        MatInputModule,
        MatTableModule,
        ReactiveFormsModule,
        TranslateModule.forRoot(),
        JoyrideModule.forRoot(),      
      ],
      providers: [NgControl, { provide: ConfigService, useValue: mockConfigService }]
    })
    .compileComponents();

    fixture = TestBed.createComponent(PxeBootFilesComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

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