mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
committed by
Eugenio Romano
parent
f731988ca6
commit
2def8d0557
@@ -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(() => {
|
||||
|
@@ -86,6 +86,5 @@ export class DateCloudWidgetComponent extends WidgetComponent implements OnInit,
|
||||
} else {
|
||||
this.field.value = null;
|
||||
}
|
||||
this.onFieldChanged(this.field);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user