[ADF-4861] Fix memory leak in Date widgets and Form Cloud Model (#5041)

* [ADF-4836] Fix memory leak in Date widgets and Form Cloud Model

* Remove unit tests based on old logic
This commit is contained in:
davidcanonieto
2019-10-10 11:01:06 +01:00
committed by Eugenio Romano
parent f731988ca6
commit 2def8d0557
7 changed files with 2 additions and 56 deletions

View File

@@ -80,23 +80,6 @@ describe('DateWidgetComponent', () => {
expect(widget.maxDate.isSame(expected)).toBeTruthy();
});
it('should eval visibility on date changed', () => {
spyOn(widget, 'onFieldChanged').and.callThrough();
const field = new FormFieldModel(new FormModel(), {
id: 'date-field-id',
name: 'date-name',
value: '9999-9-9',
type: 'date',
readOnly: 'false'
});
widget.field = field;
widget.onDateChanged({ value: moment('12/12/2012') });
expect(widget.onFieldChanged).toHaveBeenCalledWith(field);
});
describe('template check', () => {
afterEach(() => {

View File

@@ -86,6 +86,5 @@ export class DateCloudWidgetComponent extends WidgetComponent implements OnInit,
} else {
this.field.value = null;
}
this.onFieldChanged(this.field);
}
}