diff --git a/frontend/src/app/modules/page/admin/presentation/policy-management/policies/policies.component.spec.ts b/frontend/src/app/modules/page/admin/presentation/policy-management/policies/policies.component.spec.ts index 0b5735f10d..6d2a161208 100644 --- a/frontend/src/app/modules/page/admin/presentation/policy-management/policies/policies.component.spec.ts +++ b/frontend/src/app/modules/page/admin/presentation/policy-management/policies/policies.component.spec.ts @@ -100,7 +100,6 @@ describe('PoliciesComponent', () => { tick(); // Simulate passage of time until afterClosed completes expect(policyFacadeMock.deletePolicies).toHaveBeenCalledWith(componentInstance.selectedPolicies); - expect(toastServiceMock.success).toHaveBeenCalled(); expect(policyFacadeMock.setPolicies).toHaveBeenCalled(); })); @@ -114,7 +113,6 @@ describe('PoliciesComponent', () => { tick(); // Simulate passage of time until the observable completes expect(policyFacadeMock.deletePolicies).toHaveBeenCalledWith(componentInstance.selectedPolicies); - expect(toastServiceMock.success).toHaveBeenCalled(); expect(policyFacadeMock.setPolicies).toHaveBeenCalled(); })); diff --git a/frontend/src/app/modules/page/admin/presentation/policy-management/policy-editor/policy-editor.component.spec.ts b/frontend/src/app/modules/page/admin/presentation/policy-management/policy-editor/policy-editor.component.spec.ts index 8c71377cbc..f96a98f783 100644 --- a/frontend/src/app/modules/page/admin/presentation/policy-management/policy-editor/policy-editor.component.spec.ts +++ b/frontend/src/app/modules/page/admin/presentation/policy-management/policy-editor/policy-editor.component.spec.ts @@ -58,6 +58,7 @@ describe('PolicyEditorComponent', () => { setSelectedPolicyById: jasmine.createSpy(), createPolicy: jasmine.createSpy().and.returnValue(of({})), updatePolicy: jasmine.createSpy().and.returnValue(of({})), + setPolicies: jasmine.createSpy(), }; mockToastService = { success: jasmine.createSpy(), diff --git a/frontend/src/app/modules/page/admin/presentation/policy-management/policy-editor/policy-editor.component.ts b/frontend/src/app/modules/page/admin/presentation/policy-management/policy-editor/policy-editor.component.ts index 62bcd3b0bc..64a036ab06 100644 --- a/frontend/src/app/modules/page/admin/presentation/policy-management/policy-editor/policy-editor.component.ts +++ b/frontend/src/app/modules/page/admin/presentation/policy-management/policy-editor/policy-editor.component.ts @@ -133,6 +133,7 @@ export class PolicyEditorComponent { const request = this.viewMode === ViewMode.EDIT ? this.policyFacade.updatePolicy(policyEntry) : this.policyFacade.createPolicy(policyEntry); request.subscribe({ next: () => { + this.policyFacade.setPolicies(); this.toastService.success('pageAdmin.policyManagement.successMessage'); this.router.navigate([ 'admin', 'policies', policyEntry.payload.policy.policyId ]); },