diff --git a/src/app/shared/resource-policies/create/resource-policy-create.component.spec.ts b/src/app/shared/resource-policies/create/resource-policy-create.component.spec.ts index 1c41280bab..d7453fcf0e 100644 --- a/src/app/shared/resource-policies/create/resource-policy-create.component.spec.ts +++ b/src/app/shared/resource-policies/create/resource-policy-create.component.spec.ts @@ -152,29 +152,33 @@ describe('ResourcePolicyCreateComponent test suite', () => { fixture.destroy(); }); - it('should init component properly', () => { + it('should init component properly', (done) => { fixture.detectChanges(); expect(compAsAny.targetResourceUUID).toBe('itemUUID'); expect(compAsAny.targetResourceName).toBe('test item'); + done(); }); - it('should redirect to authorizations page', () => { + it('should redirect to authorizations page', (done) => { comp.redirectToAuthorizationsPage(); expect(compAsAny.router.navigate).toHaveBeenCalled(); + done(); }); - it('should return true when is Processing', () => { + it('should return true when is Processing', (done) => { compAsAny.processing$.next(true); expect(comp.isProcessing()).toBeObservable(cold('a', { a: true })); + done(); }); - it('should return false when is not Processing', () => { + it('should return false when is not Processing', (done) => { compAsAny.processing$.next(false); expect(comp.isProcessing()).toBeObservable(cold('a', { a: false })); + done(); }); describe('when target type is group', () => { diff --git a/src/app/shared/resource-policies/edit/resource-policy-edit.component.spec.ts b/src/app/shared/resource-policies/edit/resource-policy-edit.component.spec.ts index b124da0219..366f705fd6 100644 --- a/src/app/shared/resource-policies/edit/resource-policy-edit.component.spec.ts +++ b/src/app/shared/resource-policies/edit/resource-policy-edit.component.spec.ts @@ -137,28 +137,32 @@ describe('ResourcePolicyEditComponent test suite', () => { fixture.destroy(); }); - it('should init component properly', () => { + it('should init component properly', (done) => { fixture.detectChanges(); expect(compAsAny.resourcePolicy).toEqual(resourcePolicy); + done(); }); - it('should redirect to authorizations page', () => { + it('should redirect to authorizations page', (done) => { comp.redirectToAuthorizationsPage(); expect(compAsAny.router.navigate).toHaveBeenCalled(); + done(); }); - it('should return true when is Processing', () => { + it('should return true when is Processing', (done) => { compAsAny.processing$.next(true); expect(comp.isProcessing()).toBeObservable(cold('a', { a: true })); + done(); }); - it('should return false when is not Processing', () => { + it('should return false when is not Processing', (done) => { compAsAny.processing$.next(false); expect(comp.isProcessing()).toBeObservable(cold('a', { a: false })); + done(); }); describe('', () => {