import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FeatureFlagsPage } from 'src/app/modules/admin/administration/feature-flags/feature-flags.page';
import { FeatureFlagsDataService } from 'src/app/modules/admin/administration/feature-flags/feature-flags.data.service';
import { AuthService } from 'src/app/service/auth.service';
import { KeycloakService } from 'keycloak-angular';
import { ErrorHandlingService } from 'src/app/service/error-handling.service';
import { ToastService } from 'src/app/service/toast.service';
import { ConfirmationService, MessageService } from 'primeng/api';
import { ActivatedRoute } from '@angular/router';
import { of } from 'rxjs';
import { SharedModule } from 'src/app/modules/shared/shared.module';
import { TranslateModule } from '@ngx-translate/core';

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

  beforeEach(async () => {
    await TestBed.configureTestingModule({
      declarations: [FeatureFlagsPage],
      imports: [SharedModule, TranslateModule.forRoot()],
      providers: [
        AuthService,
        KeycloakService,
        ErrorHandlingService,
        ToastService,
        MessageService,
        ConfirmationService,
        {
          provide: ActivatedRoute,
          useValue: {
            snapshot: { params: of({}) },
          },
        },
        FeatureFlagsDataService,
      ],
    }).compileComponents();

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

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