diff --git a/src/app/pages/directory-service/components/active-directory/active-directory.component.spec.ts b/src/app/pages/directory-service/components/active-directory/active-directory.component.spec.ts index cf67416916e..5ab57709718 100644 --- a/src/app/pages/directory-service/components/active-directory/active-directory.component.spec.ts +++ b/src/app/pages/directory-service/components/active-directory/active-directory.component.spec.ts @@ -84,7 +84,7 @@ describe('ActiveDirectoryComponent', () => { }), mockProvider(DialogService, { jobDialog: jest.fn(() => ({ - afterClosed: () => of(null), + afterClosed: () => of({}), })), }), mockProvider(SnackbarService), diff --git a/src/app/pages/directory-service/components/ldap/ldap.component.spec.ts b/src/app/pages/directory-service/components/ldap/ldap.component.spec.ts index 92d3f4a9f8d..9a3c9b40d64 100644 --- a/src/app/pages/directory-service/components/ldap/ldap.component.spec.ts +++ b/src/app/pages/directory-service/components/ldap/ldap.component.spec.ts @@ -74,7 +74,7 @@ describe('LdapComponent', () => { }), mockProvider(DialogService, { jobDialog: jest.fn(() => ({ - afterClosed: () => of(null), + afterClosed: () => of({}), })), }), mockProvider(SnackbarService), @@ -134,7 +134,7 @@ describe('LdapComponent', () => { const rebuildCacheButton = await loader.getHarness(MatButtonHarness.with({ text: 'Rebuild Directory Service Cache' })); await rebuildCacheButton.click(); - expect(spectator.inject(SystemGeneralService).refreshDirServicesCache).toHaveBeenCalled(); + expect(spectator.inject(DialogService).jobDialog).toHaveBeenCalled(); expect(spectator.inject(SnackbarService).success).toHaveBeenCalledWith( helptextLdap.ldap_custactions_clearcache_dialog_message, );