diff --git a/apps/metadata-editor/src/app/edit/edit-page.component.spec.ts b/apps/metadata-editor/src/app/edit/edit-page.component.spec.ts index e06c44c5d..e9fd2794a 100644 --- a/apps/metadata-editor/src/app/edit/edit-page.component.spec.ts +++ b/apps/metadata-editor/src/app/edit/edit-page.component.spec.ts @@ -165,22 +165,6 @@ describe('EditPageComponent', () => { }) }) - describe('new record', () => { - beforeEach(() => { - const activatedRoute = TestBed.inject(ActivatedRoute) - activatedRoute.snapshot.routeConfig.path = '/create' - fixture.detectChanges() - }) - it('navigate from /create to /edit/uuid on first change', () => { - const router = TestBed.inject(Router) - const navigateSpy = jest.spyOn(router, 'navigate') - ;(facade.draftSaveSuccess$ as any).next() - expect(navigateSpy).toHaveBeenCalledWith(['edit', 'my-dataset-001'], { - replaceUrl: true, - }) - }) - }) - describe('unique identifier of the current record changes', () => { beforeEach(() => { fixture.detectChanges() diff --git a/apps/metadata-editor/src/app/edit/edit-page.component.ts b/apps/metadata-editor/src/app/edit/edit-page.component.ts index 6e6753275..9babe0aa3 100644 --- a/apps/metadata-editor/src/app/edit/edit-page.component.ts +++ b/apps/metadata-editor/src/app/edit/edit-page.component.ts @@ -137,16 +137,6 @@ export class EditPageComponent implements OnInit, OnDestroy { ) }) ) - - // if we're on the /create route, go to /edit/{uuid} on first change - if (this.route.snapshot.routeConfig?.path.includes('create')) { - this.facade.draftSaveSuccess$.pipe(take(1)).subscribe(() => { - this.router.navigate(['edit', currentRecord.uniqueIdentifier], { - replaceUrl: true, - }) - }) - } - // if the record unique identifier changes, navigate to /edit/newUuid this.facade.record$ .pipe(