Skip to content

Commit 8917ec7

Browse files
[duracom-383] remove log from test & fix dependency
1 parent d1aef11 commit 8917ec7

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/app/item-page/edit-item-page/item-delete/item-delete.component.spec.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ describe('ItemDeleteComponent', () => {
207207
beforeEach(() => {
208208
fixture = TestBed.createComponent(ItemDeleteComponent);
209209
comp = fixture.componentInstance;
210-
expect(comp.router).toBe(router);
210+
expect(comp['router']).toBe(router);
211211
fixture.detectChanges();
212212
});
213213

@@ -228,8 +228,6 @@ describe('ItemDeleteComponent', () => {
228228
Object.assign(new ProcessParameter(), { name: '-i', value: mockItem.uuid }),
229229
];
230230
scriptDataService.invoke.and.returnValue(createSuccessfulRemoteDataObject$({ processId: '123' }));
231-
console.log('Before performAction - scriptDataService.invoke:', scriptDataService.invoke);
232-
console.log('Before performAction - isSpy:', jasmine.isSpy(scriptDataService.invoke));
233231
comp.performAction();
234232
setTimeout(() => {
235233
expect(scriptDataService.invoke).toHaveBeenCalledWith(DSPACE_OBJECT_DELETION_SCRIPT_NAME, parameterValues, []);
@@ -243,8 +241,8 @@ describe('ItemDeleteComponent', () => {
243241
scriptDataService.invoke.and.returnValue(createFailedRemoteDataObject$('Error', 500));
244242
comp.performAction();
245243
setTimeout(() => {
246-
expect(comp.notificationsService.error).toHaveBeenCalled();
247-
expect(comp.router.navigate).toHaveBeenCalledWith([getItemEditRoute(mockItem)]);
244+
expect(comp['notificationsService'].error).toHaveBeenCalled();
245+
expect(comp['router'].navigate).toHaveBeenCalledWith([getItemEditRoute(mockItem)]);
248246
done();
249247
}, 0);
250248
});

0 commit comments

Comments
 (0)