Skip to content

Commit

Permalink
Merge pull request #1042 from eclipse-tractusx/feature/#832-enable-po…
Browse files Browse the repository at this point in the history
…licy-management

feature(policy): #832 add user manual
  • Loading branch information
ds-mwesener authored Jun 17, 2024
2 parents 28d7370 + 3b2bb92 commit a4f049a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}));

Expand All @@ -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();
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]);
},
Expand Down

0 comments on commit a4f049a

Please sign in to comment.