From 434d93f12cc5a38ec2fafabee653371abd129cbc Mon Sep 17 00:00:00 2001 From: Yanick Minder Date: Mon, 23 Dec 2024 14:12:23 +0100 Subject: [PATCH] fix naming of team management --- .../add-edit-team-dialog.component.scss | 3 --- .../add-edit-team-dialog.component.spec.ts | 9 ++++---- ...dd-member-to-team-dialog.component.spec.ts | 4 ++-- .../add-user-team.component.html | 8 +++---- .../add-user-team.component.spec.ts | 22 +++++++++---------- .../add-user-team/add-user-team.component.ts | 6 ++--- .../delete-user/delete-user.component.spec.ts | 8 +++---- .../delete-user/delete-user.component.ts | 4 ++-- .../invite-user-dialog.component.spec.ts | 10 ++++----- .../member-detail.component.html | 2 +- .../member-detail/member-detail.component.ts | 6 ++--- .../member-list-table.component.spec.ts | 8 +++---- .../search-team-management.component.spec.ts | 1 + .../show-edit-role.component.scss | 1 + .../show-edit-role.component.spec.ts | 1 + 15 files changed, 47 insertions(+), 46 deletions(-) diff --git a/frontend/src/app/team-management/add-edit-team-dialog/add-edit-team-dialog.component.scss b/frontend/src/app/team-management/add-edit-team-dialog/add-edit-team-dialog.component.scss index 004d42b7c7..f499fd6810 100644 --- a/frontend/src/app/team-management/add-edit-team-dialog/add-edit-team-dialog.component.scss +++ b/frontend/src/app/team-management/add-edit-team-dialog/add-edit-team-dialog.component.scss @@ -1,8 +1,5 @@ @import "../style/variables"; -.input-fields { - margin-bottom: 0.5rem; -} mat-select { outline: 1px solid #a4a4af; diff --git a/frontend/src/app/team-management/add-edit-team-dialog/add-edit-team-dialog.component.spec.ts b/frontend/src/app/team-management/add-edit-team-dialog/add-edit-team-dialog.component.spec.ts index 767eb28010..9ea356182c 100644 --- a/frontend/src/app/team-management/add-edit-team-dialog/add-edit-team-dialog.component.spec.ts +++ b/frontend/src/app/team-management/add-edit-team-dialog/add-edit-team-dialog.component.spec.ts @@ -98,17 +98,18 @@ describe('TeamManagementComponent', () => { }); it('should call service method to update team if data input is not null', async () => { + jest.spyOn(teamServiceMock, 'updateTeam').mockReturnValue(of(teamFormObject)); + component.data = { team: marketingTeamWriteable }; component.teamForm.setValue(teamFormObject); - jest.spyOn(teamServiceMock, 'updateTeam').mockReturnValue(of(teamFormObject)); fixture.detectChanges(); component.saveTeam(); + expect(teamServiceMock.updateTeam).toHaveBeenCalled(); - expect(teamServiceMock.updateTeam).toHaveBeenCalledWith({ - ...teamFormObject, + expect(teamServiceMock.updateTeam).toHaveBeenCalledWith(expect.objectContaining({ id: marketingTeamWriteable.id, version: marketingTeamWriteable.version, - } as Team); + })); }); it('should set team values in from on init if data is not null', async () => { diff --git a/frontend/src/app/team-management/add-member-to-team-dialog/add-member-to-team-dialog.component.spec.ts b/frontend/src/app/team-management/add-member-to-team-dialog/add-member-to-team-dialog.component.spec.ts index 37eaa25ba9..97fd031172 100644 --- a/frontend/src/app/team-management/add-member-to-team-dialog/add-member-to-team-dialog.component.spec.ts +++ b/frontend/src/app/team-management/add-member-to-team-dialog/add-member-to-team-dialog.component.spec.ts @@ -98,11 +98,11 @@ describe('AddMemberToTeamDialogComponent', () => { }); }); - it('should set teamname correctly', () => { + it('should set team name correctly im title', () => { expect(component.getDialogTitle()).toBe(`Members zu Team ${team1.name} hinzufügen`); }); - it('should return correct display value', () => { + it('should return correct display value for given user', () => { expect(component.getDisplayValue(users[0])).toBe(`${users[0].firstName} ${users[0].lastName} (${users[0].email})`); }); diff --git a/frontend/src/app/team-management/add-user-team/add-user-team.component.html b/frontend/src/app/team-management/add-user-team/add-user-team.component.html index b3cdb9f0a4..5b940902e0 100644 --- a/frontend/src/app/team-management/add-user-team/add-user-team.component.html +++ b/frontend/src/app/team-management/add-user-team/add-user-team.component.html @@ -2,21 +2,21 @@