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