Skip to content

Commit

Permalink
fix tests of add-edit team dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 committed Nov 4, 2024
1 parent b469621 commit 88c26f3
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AddEditTeamDialog } from './add-edit-team-dialog.component';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { HarnessLoader } from '@angular/cdk/testing';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { provideHttpClientTesting } from '@angular/common/http/testing';
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
import { MatIconModule } from '@angular/material/icon';
import { MatFormFieldModule } from '@angular/material/form-field';
Expand All @@ -10,15 +10,17 @@ import { ReactiveFormsModule } from '@angular/forms';
import { MatInputModule } from '@angular/material/input';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { RouterTestingModule } from '@angular/router/testing';
import { DialogHeaderComponent } from '../../shared/custom/dialog-header/dialog-header.component';
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
import { TeamService } from '../../services/team.service';
import { of } from 'rxjs';
import { marketingTeamWriteable, teamFormObject } from '../../shared/testData';
import { Team } from '../../shared/types/model/Team';
import { TranslateService } from '@ngx-translate/core';
import { DialogService } from '../../services/dialog.service';
import { provideRouter } from '@angular/router';
import { provideHttpClient } from '@angular/common/http';
import { DialogTemplateCoreComponent } from '../../shared/custom/dialog-template-core/dialog-template-core.component';
import { MatDividerModule } from '@angular/material/divider';

const dialogRefMock = {
close: jest.fn(),
Expand All @@ -42,7 +44,6 @@ describe('TeamManagementComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
HttpClientTestingModule,
MatDialogModule,
MatIconModule,
MatFormFieldModule,
Expand All @@ -51,10 +52,13 @@ describe('TeamManagementComponent', () => {
MatInputModule,
NoopAnimationsModule,
MatCheckboxModule,
RouterTestingModule,
MatDividerModule,
],
declarations: [AddEditTeamDialog, DialogHeaderComponent],
declarations: [AddEditTeamDialog, DialogTemplateCoreComponent],
providers: [
provideRouter([]),
provideHttpClient(),
provideHttpClientTesting(),
{
provide: DialogService,
useValue: dialogServiceMock,
Expand Down

0 comments on commit 88c26f3

Please sign in to comment.