Skip to content

Commit

Permalink
#24163 [Containers] : Clicking up or down arrows in Max Contents fiel…
Browse files Browse the repository at this point in the history
…d is not working (#24177)

* #24163 show content type on change of max contentsc

* #24163 update test case
  • Loading branch information
zulqarnainvd committed Feb 28, 2023
1 parent 87a5a8e commit 90fc9db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Expand Up @@ -338,6 +338,10 @@ describe('DotContainerPropertiesComponent', () => {
it('should render content types when max-content greater then zero', fakeAsync(() => {
spyOn(fixture.componentInstance, 'showContentTypeAndCode');
fixture.componentInstance.form.get('maxContentlets').setValue(0);
fixture.componentInstance.form.get('maxContentlets').valueChanges.subscribe((value) => {
expect(value).toBe(5);
});
expect(fixture.componentInstance.form.get('maxContentlets').updateOn).toBe('change');
fixture.componentInstance.form.get('maxContentlets').setValue(5);
tick();
fixture.detectChanges();
Expand Down
Expand Up @@ -54,8 +54,7 @@ export class DotContainerPropertiesComponent implements OnInit, AfterViewInit {
title: new FormControl(container?.title ?? '', [Validators.required]),
friendlyName: new FormControl(container?.friendlyName ?? ''),
maxContentlets: new FormControl(container?.maxContentlets ?? 0, {
validators: [Validators.required],
updateOn: 'blur'
validators: [Validators.required]
}),
code: new FormControl(
container?.code ?? '',
Expand Down

0 comments on commit 90fc9db

Please sign in to comment.