import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RoleFormPageComponent } from 'src/app/modules/admin/administration/roles/form-page/role-form-page.component';
import { SharedModule } from 'src/app/modules/shared/shared.module';
import { TranslateModule } from '@ngx-translate/core';
import { AuthService } from 'src/app/service/auth.service';
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 { UsersDataService } from 'src/app/modules/admin/administration/users/users.data.service';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

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

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

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

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