Fix for dialogs

This commit is contained in:
piotrpekala7 2020-08-26 13:13:01 +02:00
parent 910ddb9955
commit cb133d9525
2 changed files with 7 additions and 3 deletions

View File

@ -78,7 +78,7 @@ describe('AddBlankProjectDialogComponent', () => {
],
providers: [
{ provide: MatDialogRef, useValue: dialogRef },
{ provide: MAT_DIALOG_DATA },
{ provide: MAT_DIALOG_DATA, useValue: [] },
{ provide: ProjectService, useClass: MockedProjectService },
{ provide: ToasterService, useValue: toaster },
{ provide: Router, useValue: router }

View File

@ -62,6 +62,10 @@ describe('ImportProjectDialogComponent', () => {
let debugElement: DebugElement;
let fileSelectDirective: FileSelectDirective;
let dialogRef = {
close: jasmine.createSpy('close')
};
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
@ -79,8 +83,8 @@ describe('ImportProjectDialogComponent', () => {
RouterTestingModule.withRoutes([])
],
providers: [
{ provide: MatDialogRef },
{ provide: MAT_DIALOG_DATA },
{ provide: MatDialogRef, useValue: dialogRef },
{ provide: MAT_DIALOG_DATA, useValue: [] },
{ provide: ProjectService, useClass: MockedProjectService }
],
declarations: [ImportProjectDialogComponent]