Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ import { SurveyService } from 'app/services/survey/survey.service';
import {
DialogData,
DialogType,
JobDialogComponent,
} from '../job-dialog/job-dialog.component';
DialogComponent,
} from 'app/components/shared/dialog/dialog.component';

describe('EditDetailsComponent', () => {
let component: EditDetailsComponent;
Expand All @@ -56,15 +56,15 @@ describe('EditDetailsComponent', () => {
);
const newSurveyId = 'newSurveyId';
let dialogRefSpy: jasmine.SpyObj<
MatDialogRef<JobDialogComponent, DialogData>
MatDialogRef<DialogComponent, DialogData>
>;
let dialogSpy: jasmine.SpyObj<MatDialog>;
let navigationServiceSpy: jasmine.SpyObj<NavigationService>;
let surveyServiceSpy: jasmine.SpyObj<SurveyService>;

beforeEach(async () => {
dialogRefSpy = jasmine.createSpyObj<
MatDialogRef<JobDialogComponent, DialogData>
MatDialogRef<DialogComponent, DialogData>
>('MatDialogRef', ['afterClosed', 'close']);
dialogSpy = jasmine.createSpyObj<MatDialog>('MatDialog', ['open']);
dialogSpy.open.and.returnValue(dialogRefSpy);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import { SurveyService } from 'app/services/survey/survey.service';
import {
DialogData,
DialogType,
JobDialogComponent,
} from '../job-dialog/job-dialog.component';
DialogComponent,
} from 'app/components/shared/dialog/dialog.component';

interface DataSharingTermsDetails {
description: string;
Expand Down Expand Up @@ -87,7 +87,7 @@ export class EditDetailsComponent implements OnInit {

openDeleteSurveyDialog() {
this.dialog
.open(JobDialogComponent, {
.open(DialogComponent, {
data: { dialogType: DialogType.DeleteSurvey },
panelClass: 'small-width-dialog',
})
Expand All @@ -103,7 +103,7 @@ export class EditDetailsComponent implements OnInit {

openCopySurveyDialog() {
this.dialog
.open(JobDialogComponent, {
.open(DialogComponent, {
data: { dialogType: DialogType.CopySurvey },
panelClass: 'small-width-dialog',
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ import { SurveyService } from 'app/services/survey/survey.service';
import {
DialogData,
DialogType,
JobDialogComponent,
} from './job-dialog/job-dialog.component';
DialogComponent,
} from 'app/components/shared/dialog/dialog.component';

describe('EditSurveyComponent', () => {
let fixture: ComponentFixture<EditSurveyComponent>;
Expand All @@ -52,7 +52,7 @@ describe('EditSurveyComponent', () => {
let jobServiceSpy: jasmine.SpyObj<JobService>;
let dataStoreServiceSpy: jasmine.SpyObj<DataStoreService>;
let dialogRefSpy: jasmine.SpyObj<
MatDialogRef<JobDialogComponent, DialogData>
MatDialogRef<DialogComponent, DialogData>
>;
let dialogSpy: jasmine.SpyObj<MatDialog>;
let initResolve: (value: void | PromiseLike<void>) => void;
Expand Down Expand Up @@ -144,7 +144,7 @@ describe('EditSurveyComponent', () => {
dataStoreServiceSpy.tasks$.and.returnValue(new Subject<List<Task>>());

dialogRefSpy = jasmine.createSpyObj<
MatDialogRef<JobDialogComponent, DialogData>
MatDialogRef<DialogComponent, DialogData>
>('MatDialogRef', ['afterClosed', 'close']);
dialogSpy = jasmine.createSpyObj<MatDialog>('MatDialog', ['open']);
dialogSpy.open.and.returnValue(dialogRefSpy);
Expand Down
8 changes: 4 additions & 4 deletions web/src/app/components/edit-survey/edit-survey.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ import { Environment } from 'environments/environment-interface';
import {
DialogData,
DialogType,
JobDialogComponent,
} from './job-dialog/job-dialog.component';
DialogComponent,
} from 'app/components/shared/dialog/dialog.component';
import { toObservable, toSignal } from '@angular/core/rxjs-interop';
import { switchMap } from 'rxjs';
import { SurveyService } from 'app/services/survey/survey.service';
Expand Down Expand Up @@ -135,9 +135,9 @@ export class EditSurveyComponent {
}

openDialog(dialogType: DialogType, job: Job): void {
const dialogRef = this.dialog.open(JobDialogComponent, {
const dialogRef = this.dialog.open(DialogComponent, {
autoFocus: [DialogType.AddJob, DialogType.RenameJob].includes(dialogType)
? `#${JobDialogComponent.JOB_NAME_FIELD_ID}`
? `#${DialogComponent.JOB_NAME_FIELD_ID}`
: 'first-tabbable',
data: { dialogType, jobName: job.name ?? '' },
panelClass: 'small-width-dialog',
Expand Down

This file was deleted.

Loading
Loading