Skip to content
Snippets Groups Projects
Commit 80214bc0 authored by Albert Bruns's avatar Albert Bruns
Browse files

OZG-7974 naming

parent 84117396
Branches
No related tags found
1 merge request!116OZG-7974-Validierung-onSubmit
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<ods-checkbox-editor <ods-checkbox-editor
[formControlName]="UserFormService.LOESCHEN" [formControlName]="UserFormService.LOESCHEN"
(inputChange)="updateOtherAlfaCheckboxes(UserFormService.LOESCHEN, $event)" (inputChange)="updateAlfaCheckboxes(UserFormService.LOESCHEN, $event)"
label="Löschen" label="Löschen"
inputId="delete" inputId="delete"
data-test-id="checkbox-loeschen" data-test-id="checkbox-loeschen"
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<ods-checkbox-editor <ods-checkbox-editor
[formControlName]="UserFormService.USER" [formControlName]="UserFormService.USER"
(inputChange)="updateOtherAlfaCheckboxes(UserFormService.USER, $event)" (inputChange)="updateAlfaCheckboxes(UserFormService.USER, $event)"
label="User" label="User"
inputId="user" inputId="user"
data-test-id="checkbox-user" data-test-id="checkbox-user"
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<ods-checkbox-editor <ods-checkbox-editor
[formControlName]="UserFormService.POSTSTELLE" [formControlName]="UserFormService.POSTSTELLE"
(inputChange)="updateOtherAlfaCheckboxes(UserFormService.POSTSTELLE, $event)" (inputChange)="updateAlfaCheckboxes(UserFormService.POSTSTELLE, $event)"
label="Poststelle" label="Poststelle"
inputId="post_office" inputId="post_office"
data-test-id="checkbox-poststelle" data-test-id="checkbox-poststelle"
......
...@@ -97,12 +97,12 @@ describe('UserFormRolesComponent', () => { ...@@ -97,12 +97,12 @@ describe('UserFormRolesComponent', () => {
}); });
}); });
describe('update all other alfa checkboxes', () => { describe('update alfa checkboxes', () => {
it('should call form service updateAlfaCheckboxes', () => { it('should call form service updateAlfaCheckboxes', () => {
const formControlName: string = 'dummy'; const formControlName: string = 'dummy';
const value: boolean = true; const value: boolean = true;
component.updateOtherAlfaCheckboxes(formControlName, value); component.updateAlfaCheckboxes(formControlName, value);
expect(formService.updateAlfaCheckboxes).toHaveBeenCalledWith(formControlName, value); expect(formService.updateAlfaCheckboxes).toHaveBeenCalledWith(formControlName, value);
}); });
...@@ -131,7 +131,7 @@ describe('UserFormRolesComponent', () => { ...@@ -131,7 +131,7 @@ describe('UserFormRolesComponent', () => {
describe('checkbox loeschen', () => { describe('checkbox loeschen', () => {
it('should call updateOtherAlfaCheckboxes on inputChange emit', () => { it('should call updateOtherAlfaCheckboxes on inputChange emit', () => {
component.updateOtherAlfaCheckboxes = jest.fn(); component.updateAlfaCheckboxes = jest.fn();
triggerEvent({ triggerEvent({
fixture, fixture,
...@@ -140,13 +140,13 @@ describe('UserFormRolesComponent', () => { ...@@ -140,13 +140,13 @@ describe('UserFormRolesComponent', () => {
data: true, data: true,
}); });
expect(component.updateOtherAlfaCheckboxes).toHaveBeenCalledWith(UserFormService.LOESCHEN, true); expect(component.updateAlfaCheckboxes).toHaveBeenCalledWith(UserFormService.LOESCHEN, true);
}); });
}); });
describe('checkbox user', () => { describe('checkbox user', () => {
it('should call updateOtherAlfaCheckboxes on inputChange emit', () => { it('should call updateOtherAlfaCheckboxes on inputChange emit', () => {
component.updateOtherAlfaCheckboxes = jest.fn(); component.updateAlfaCheckboxes = jest.fn();
triggerEvent({ triggerEvent({
fixture, fixture,
...@@ -155,13 +155,13 @@ describe('UserFormRolesComponent', () => { ...@@ -155,13 +155,13 @@ describe('UserFormRolesComponent', () => {
data: true, data: true,
}); });
expect(component.updateOtherAlfaCheckboxes).toHaveBeenCalledWith(UserFormService.USER, true); expect(component.updateAlfaCheckboxes).toHaveBeenCalledWith(UserFormService.USER, true);
}); });
}); });
describe('checkbox poststelle', () => { describe('checkbox poststelle', () => {
it('should call updateOtherAlfaCheckboxes on inputChange emit', () => { it('should call updateOtherAlfaCheckboxes on inputChange emit', () => {
component.updateOtherAlfaCheckboxes = jest.fn(); component.updateAlfaCheckboxes = jest.fn();
triggerEvent({ triggerEvent({
fixture, fixture,
...@@ -170,7 +170,7 @@ describe('UserFormRolesComponent', () => { ...@@ -170,7 +170,7 @@ describe('UserFormRolesComponent', () => {
data: true, data: true,
}); });
expect(component.updateOtherAlfaCheckboxes).toHaveBeenCalledWith(UserFormService.POSTSTELLE, true); expect(component.updateAlfaCheckboxes).toHaveBeenCalledWith(UserFormService.POSTSTELLE, true);
}); });
}); });
}); });
......
...@@ -40,7 +40,7 @@ export class UserFormRolesComponent implements OnInit { ...@@ -40,7 +40,7 @@ export class UserFormRolesComponent implements OnInit {
); );
} }
updateOtherAlfaCheckboxes(formControlName: string, value: boolean) { updateAlfaCheckboxes(formControlName: string, value: boolean) {
this.formService.updateAlfaCheckboxes(formControlName, value); this.formService.updateAlfaCheckboxes(formControlName, value);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment