mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ACS-5857] added unit tests for formatLabel
This commit is contained in:
+16
@@ -541,4 +541,20 @@ describe('DateWidgetComponent', () => {
|
||||
expect(element.querySelector('.adf-invalid')).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
describe('format label', () => {
|
||||
beforeEach(() => {
|
||||
widget.field = new FormFieldModel(new FormModel({ taskId: '<id>' }), {
|
||||
name: 'Date Field',
|
||||
dateDisplayFormat: 'd-M-yyyy'
|
||||
});
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should format label correctly', () => {
|
||||
const result = widget.formatLabel(widget.field);
|
||||
|
||||
expect(result).toBe('Date Field (D-M-YYYY)');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user