solve conflicts

pull/24/head
Manuel Aranda Rosales 2025-06-02 08:34:39 +02:00
commit 6c40d78f15
1 changed files with 15 additions and 29 deletions

View File

@ -1,50 +1,36 @@
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ChangeParentComponent } from './change-parent.component'; import { ChangeParentComponent } from './change-parent.component';
import {ManageClientComponent} from "../clients/manage-client/manage-client.component"; import { HttpClientTestingModule } from '@angular/common/http/testing';
import {HttpClientTestingModule} from "@angular/common/http/testing"; import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
import {FormsModule, ReactiveFormsModule} from "@angular/forms"; import { ToastrService } from 'ngx-toastr';
import {MAT_DIALOG_DATA, MatDialogModule, MatDialogRef} from "@angular/material/dialog"; import { ConfigService } from '@services/config.service';
import {MatSnackBarModule} from "@angular/material/snack-bar"; import { MatFormFieldModule } from '@angular/material/form-field';
import {ToastrModule} from "ngx-toastr"; import { MatSelectModule } from '@angular/material/select';
import {TranslateModule} from "@ngx-translate/core"; import { FormsModule } from '@angular/forms';
import {MatProgressSpinnerModule} from "@angular/material/progress-spinner"; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import {ConfigService} from "@services/config.service";
import {DataService} from "../../services/data.service";
import {MatFormFieldModule} from "@angular/material/form-field";
import {MatSelectModule} from "@angular/material/select";
import {NoopAnimationsModule} from "@angular/platform-browser/animations";
describe('ChangeParentComponent', () => { describe('ChangeParentComponent', () => {
let component: ChangeParentComponent; let component: ChangeParentComponent;
let fixture: ComponentFixture<ChangeParentComponent>; let fixture: ComponentFixture<ChangeParentComponent>;
beforeEach(async () => { beforeEach(async () => {
const mockConfigService = { const mockConfigService = { apiUrl: 'http://mock-api-url' };
apiUrl: 'http://mock-api-url',
mercureUrl: 'http://mock-mercure-url'
};
await TestBed.configureTestingModule({ await TestBed.configureTestingModule({
declarations: [ChangeParentComponent], declarations: [ChangeParentComponent],
imports: [ imports: [
HttpClientTestingModule, HttpClientTestingModule,
ReactiveFormsModule,
MatDialogModule, MatDialogModule,
MatFormFieldModule, MatFormFieldModule,
MatSnackBarModule, MatSelectModule,
FormsModule , FormsModule,
MatSelectModule , BrowserAnimationsModule
ToastrModule.forRoot(),
TranslateModule.forRoot(),
NoopAnimationsModule,
MatProgressSpinnerModule
], ],
providers: [ providers: [
{ provide: MatDialogRef, useValue: {} }, { provide: MatDialogRef, useValue: {} },
{ provide: MAT_DIALOG_DATA, useValue: { data: { id: 123 } } }, { provide: MAT_DIALOG_DATA, useValue: { clients: [] } },
{ provide: ConfigService, useValue: mockConfigService }, { provide: ToastrService, useValue: { success: () => { }, error: () => { } } },
DataService { provide: ConfigService, useValue: mockConfigService }
] ]
}) })
.compileComponents(); .compileComponents();