...
 
Commits (3)
......@@ -84,7 +84,7 @@ describe('SubsystemListComponent', () => {
fixture = TestBed.createComponent(SubsystemListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
expect(TestBed.get(Router).navigateByUrl).toHaveBeenCalledWith('/DEFINST');
expect(TestBed.get(Router).navigateByUrl).toHaveBeenCalledWith('/DEFINST', Object({ replaceUrl: true }));
});
it('should detect when instance is not selected', () => {
......
......@@ -109,7 +109,7 @@ export class SubsystemListComponent implements OnInit, AfterViewInit, OnDestroy
// Redirect to default instance if instance is empty or invalid
if (!this.subsystemsService.getInstances().includes(params.instance)) {
this.router.navigateByUrl('/' + this.subsystemsService.getDefaultInstance());
this.router.navigateByUrl('/' + this.subsystemsService.getDefaultInstance(), { replaceUrl: true });
return;
}
......