Skip to content

Commit

Permalink
[DSC-1091] Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
atarix83 committed Jul 27, 2023
1 parent 5a26a32 commit ae5a22e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/app/shared/form/form.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<ng-template modelType="SCROLLABLE_DROPDOWN" let-model="model">
<div *ngIf="!isTheOnlyFieldInArrayGroup(model)"
class="col-xs-2 d-flex flex-column justify-content-start align-items-end"
[style.padding]="'0 5px 0 10px'"
[class]="arrayButtonsStyle">
<button type="button" class="btn btn-secondary" role="button"
title="{{'form.remove' | translate}}"
Expand Down
15 changes: 8 additions & 7 deletions src/app/shared/form/form.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,14 @@ describe('FormComponent test suite', () => {

expect(formComp.formGroup.reset).toHaveBeenCalled();
});

it('should emit removeArrayItem Event when an scrollable dropdown field has been cleaned', inject([FormBuilderService], (service: FormBuilderService) => {
spyOn(formComp.removeArrayItem, 'emit');

formComp.clearScrollableDropdown(new Event('click'), formComp.formModel[0] as DynamicFormControlModel);

expect(formComp.removeArrayItem.emit).toHaveBeenCalled();
}));
});

describe('', () => {
Expand Down Expand Up @@ -441,13 +449,6 @@ describe('FormComponent test suite', () => {
expect(formComp.removeArrayItem.emit).toHaveBeenCalled();
}));

it('should emit removeArrayItem Event when an scrollable dropdown field has been cleaned', inject([FormBuilderService], (service: FormBuilderService) => {
spyOn(formComp.removeArrayItem, 'emit');

formComp.clearScrollableDropdown(new Event('click'), formComp.formModel[0] as DynamicFormControlModel);

expect(formComp.removeArrayItem.emit).toHaveBeenCalled();
}));
});

describe('isArrayGroupEmpty', () => {
Expand Down

0 comments on commit ae5a22e

Please sign in to comment.